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

loading of module's dependencies broken with '-z now' in LDFLAGS



Hello,

the build system of Fedora recently started to call linker with '-z now'. 
The ld(1) man page regarding this option says:

    "When generating an executable or shared library, mark it to tell the
    dynamic linker to resolve all symbols when the program is started, or
    when the shared library is linked to using dlopen, instead of deferring
    function call resolution to the point when the function is first called."

This breaks loading of zsh modules that depend on other zsh modules.
For instance, the following command fails:

$ zsh -c 'zmodload zsh/zftp' 
zsh:1: failed to load module `zsh/zftp': /usr/lib64/zsh/5.1.1/zsh/zftp.so: 
undefined symbol: freehostent

... whereas the following command succeeds:

$ zsh -c 'zmodload zsh/net/tcp && zmodload zsh/zftp' 

Do I understand it correctly that the only solution is to tweak the build 
system not to use '-z now' while linking zsh modules?

The issue was originally reported here: https://bugzilla.redhat.com/1277996

Kamil



Messages sorted by: Reverse Date, Date, Thread, Author