Zsh Mailing List Archive
Messages sorted by:
Re: Portable rootless ZSH
- X-seq: zsh-workers 44829
- From: Coden <codenb@xxxxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Portable rootless ZSH
- Date: Sun, 13 Oct 2019 00:13:45 +0000
- Cc: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=default; t=1570925633; bh=iZrq7MCzG4/NGD3poy+W0t0JdUHn7jch1N0Qnr22DQA=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References: Feedback-ID:From; b=mYQ1Nwpg+hlF9bkMbI5kF0Ekm8nZbsuKXekrSFGn+K4ZyBGkoBh4iARs/9o4vhIgv b8jOHjVLsg69JJoOk5zVa0CJIKOeMwGZ7cyROD5OLuvQack1V/aP2iNw4Oi43iJ65D I23+ziLf5CW8CQg35QWl8SKCoLQFySP8fA+XYcpQ=
- Feedback-id: 1g_EZM5cadEHcIg82x2qZXWXT-U_XXBlI7kN837NwaZpram7G2oom_E1e2DIYhFQFmC50rpRJhWFHjVSm_Y7-w==:Ext:ProtonMail
- In-reply-to: <CAH+w=7adjhaYy1-p4sSC6M_zHo+DtksQ-Zebz-VKThdowZrwBw@mail.gmail.com>
- List-help: <mailto:firstname.lastname@example.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:email@example.com>
- List-unsubscribe: <mailto:firstname.lastname@example.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <X8SiYN2toMZ5PPVZksUCEHWuP_LQiWjl_7pgD9MKXK3U7uS1TRvB1SjBAiZChh_o1t-wZg_wZI-OsnJ_GAKbf_VSFaZ7DrIySgPQbd9kYp0email@example.com> <20191008204722.GU6761@ming.fruitbat.org> <TDwB1Iqe7IWM9v3ll1xTQHtjYH-dEp5OMRUBA341L7O4rccNO-nh6lUSKnXV-6HKFJ4yUlkmfrPeVBqNMxdr6_pIYXR6z40GWl3r3-S_QlMfirstname.lastname@example.org> <-1Pz0W4MKe73f-nCkejafEE_SNaTME3zWtRpz26zC_wtj9KNc0hpsLeZA60x2YG1GSs5D7RW10p5kfmsy5HRFiXl3oHHx3wt2NHVKUGfX_0email@example.com> <FG_5iNx0DPNq-a1zqxGntg3hmpbHyJ_zHKFQZKw-LyXw5ee11rRK_98EM8usgD307Kld2pofl-KsvmWOeMBiQ37j_fwRxcA0oZbNM_6NZ2Ufirstname.lastname@example.org> <q9STAY5-iaqPtJEpUF1qCIiTR8Oc-8p6fuuvMvSuAlI_PE0gRpzNeAzg8bjdaTT6lDm4lIufqeqVSuqVbj0RLszcohztg3kmVBlLykeyPcsemail@example.com> <CAH+w=7adjhaYy1-p4sSC6M_zHo+DtksQ-Zebz-VKThdowZrwBw@mail.gmail.com>
- Reply-to: Coden <codenb@xxxxxxxxxxxxxx>
Thank you for the response Bart!
I passed thru pipeline you described before and your clarifications have helped me to understand the details now.
I don't understand one thing. I want to build rootless binary.
* When I wrote that there is a way to build the binary on old version of packages I mean that library version checking raises the error only if the current packages version is older than used when compile. This workaround allows me to imitate "rootless" and I've tested my binary on modern linux distros versions and it works.
* But when you wrote about prefix-like flags I think you understand that prefix-like flags requres absolute path from root like /usr/share. It's not rootless behaviour. Yes we can change prefixes for lib paths on building but we can't make it relative. I'm wrong?
What step in your way gives us relativity?
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Sunday, October 13, 2019 2:22 AM, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Sat, Oct 12, 2019 at 2:23 PM Coden codenb@xxxxxxxxxxxxxx wrote:
> > > ./zsh: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by ./zsh)
> > The solution is to build zsh on older version of packages (in Ubuntu 14 for example).
> I don't think that's actually the solution you want. You should be
> able to static-link the glibc from whatever packages you are building.
> I'm surprised nobody mentioned the following miscellaneous details
> yet, but they are all things you should be doing if you are building a
> standalone zsh:
> First, you will want to run configure with the --disable-dynamic
> option. You should also look at other configure options such as:
> Set all of those options to the appropriate paths from which you want
> your standalone shell to be run, find its function library, etc.
> Also at configure time you should make sure that LDFLAGS is set to the
> appropriate value to to static linking. That will solve your glibc
> issue. You may also be able to set this at the time you run "make".
> AFTER running "configure" but before "make" you should edit
> config.modules and change all of the "link=dynamic" entries to either
> "link=static" if you want that module included in your standalone
> shell, or to "link=no" if you want to exclude the module entirely.
> There are additional instructions at the top of the config.modules
> When you run "make" to build the shell, watch the loading step to be
> sure the correct LDFLAGS has been used.
> If you've done all the static linking stuff right, "./zsh" should run
> fine, but still probably won't find its function library (e.g.
> completions). For that to work, you need to "make install" and test
> running that installed binary. You should then be able to build a
> tarball or similar package from the finished install tree (including
> all the function directories etc.), copy that to any binary-compatible
> system, unpack it, and zsh should run there as well.
> If everything so far has worked, you may want to rebuild with maximum
> compiler optimization and "strip" the resulting binary to make the
> package as small as possible. Even so a standalone zsh is going to be
> several times larger than bash.
Messages sorted by: