Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Portable rootless ZSH

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: Reverse Date, Date, Thread, Author