[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: transitive shared library dependencies and installation

From: wferi
Subject: Re: transitive shared library dependencies and installation
Date: Sun, 05 Jan 2020 18:41:02 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Roumen Petrov <address@hidden> writes:

> address@hidden wrote:
>>> So the right question is did reporter test with FSF version?
>> I'm the reporter, and I didn't test any other version, as I wasn't
>> even sure whether my example was correct and was supposed to work.
> You sample is correct .  One minor nit is AM_PROG_AR - it is not
> required for posted example. If you project requires use of this macro
> you should request automake 1.11.2 as minimum.

Hi Roumen,

Thanks for the confirmation.  Initially I didn't include AM_PROG_AR in
the sample, but then autoreconf emitted much noise like

/usr/share/automake-1.16/am/ warning: 'a/': linking libtool 
libraries using a non-POSIX
/usr/share/automake-1.16/am/ archiver requires 'AM_PROG_AR' in 
''   while processing Libtool library 'a/'

(and the same for libb), and eventually I gave in.

> Result on posted test case - pass:
> $ ./translib ; echo $?
> 12

Thanks for posting your results.  Meanwhile I also tested with FSF
libtool 2.4.6, and the final "make" indeed succeeds with it, unlike with
Debian's libtool.  The decisive difference is that with the FSF version
the full build path to is explicitly added to the final link
command, thus the linker needn't search for it by itself.

On the other hand, this overlinks the final binary:

$ objdump -p .libs/translib | fgrep NEEDED
  NEEDED      is unneeded here (but is present in the installed program as
well).  Coincidentally, the most prominent search result mentions that
"this is fixed using a patch from Debian" for libtool.

What's your position on this?  Is overlinking a problem or not?  (It
causes problems for distributions.)  Should everybody use --as-needed
globally to combat it?  Something else entirely?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]