Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Portable rootless ZSH
- X-seq: zsh-workers 44828
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Coden <codenb@xxxxxxxxxxxxxx>
- Subject: Re: Portable rootless ZSH
- Date: Sat, 12 Oct 2019 16:22:41 -0700
- Cc: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=X7HO+GPnbjspYTxkwqQJCCEPsLfSh4OazKYEqVnnRzY=; b=W5uTl1BTihq98zryiAY7IhS/zqmuRyJeGRuCpSdwKpnAYDfjKDa0v1KTFrV8lQJHPE 8OlWKQXIna4DDuC5qSOZpL3mi4rWCvh/J/k192G0UMagfEjeuViyWHVPfIZ+jG8WPIp0 86GzSpK9LHmc/rbBiVOElkxDalO6VlI68sAMrBnIrfXaPEmTCN9TVgHu2QahV8X47Cqb mKthBkGGQpioP+dI8ZcNmP73DNdSSp1jqz5350DwiPBWdgh/3cE0Hsd24MaXHg2MZE3i gAS0Uc2OJlDJjhuAoMItOwwxyNmfPitntIzLA3tGYwsctFtUYIooHdYGW7rW8WWgLlbI pegw==
- In-reply-to: <q9STAY5-iaqPtJEpUF1qCIiTR8Oc-8p6fuuvMvSuAlI_PE0gRpzNeAzg8bjdaTT6lDm4lIufqeqVSuqVbj0RLszcohztg3kmVBlLykeyPcs=@protonmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <X8SiYN2toMZ5PPVZksUCEHWuP_LQiWjl_7pgD9MKXK3U7uS1TRvB1SjBAiZChh_o1t-wZg_wZI-OsnJ_GAKbf_VSFaZ7DrIySgPQbd9kYp0=@protonmail.com> <20191008204722.GU6761@ming.fruitbat.org> <TDwB1Iqe7IWM9v3ll1xTQHtjYH-dEp5OMRUBA341L7O4rccNO-nh6lUSKnXV-6HKFJ4yUlkmfrPeVBqNMxdr6_pIYXR6z40GWl3r3-S_QlM=@protonmail.com> <-1Pz0W4MKe73f-nCkejafEE_SNaTME3zWtRpz26zC_wtj9KNc0hpsLeZA60x2YG1GSs5D7RW10p5kfmsy5HRFiXl3oHHx3wt2NHVKUGfX_0=@protonmail.com> <FG_5iNx0DPNq-a1zqxGntg3hmpbHyJ_zHKFQZKw-LyXw5ee11rRK_98EM8usgD307Kld2pofl-KsvmWOeMBiQ37j_fwRxcA0oZbNM_6NZ2U=@protonmail.com> <q9STAY5-iaqPtJEpUF1qCIiTR8Oc-8p6fuuvMvSuAlI_PE0gRpzNeAzg8bjdaTT6lDm4lIufqeqVSuqVbj0RLszcohztg3kmVBlLykeyPcs=@protonmail.com>
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:
--bindir
--datadir
--enable-etcdir
--enable-fndir
--enable-scriptdir
--exec-prefix
--prefix
--program-prefix
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
file.
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:
Reverse Date,
Date,
Thread,
Author