zsh-workers
 help / color / mirror / code / Atom feed
From: Kamil Dudka <kdudka@redhat.com>
To: zsh-workers@zsh.org
Subject: loading of module's dependencies broken with '-z now' in LDFLAGS
Date: Thu, 05 Nov 2015 11:59:42 +0100	[thread overview]
Message-ID: <5256226.5racBSergM@kdudka.brq.redhat.com> (raw)

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


             reply	other threads:[~2015-11-05 11:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-05 10:59 Kamil Dudka [this message]
2015-11-05 11:58 ` Peter Stephenson
2015-11-05 12:17   ` Peter Stephenson
2015-11-05 12:39     ` Kamil Dudka
2015-11-05 12:47       ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5256226.5racBSergM@kdudka.brq.redhat.com \
    --to=kdudka@redhat.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).