[collectd] Bug#637875: collectd: FTBFS with ld that defaults to --as-needed: bad Perl linkage order

Sebastian Harl tokkee at debian.org
Thu May 17 16:42:58 CEST 2012


clone 637875 -1
reassign -1 perl
retitle -1 perl: please support splitting linker options and libraries in ldopts
forwarded 637875 collectd at verplant.org
thanks

Hi,

On Mon, Aug 15, 2011 at 12:24:16PM +0100, Colin Watson wrote:
> collectd fails to build with a linker that defaults to --as-needed, as
> explained in this Ubuntu bug report:
> 
>   https://bugs.launchpad.net/ubuntu/+source/collectd/+bug/796571
> 
>   http://people.canonical.com/~lamont/jamvm/logs/collectd_4.10.1-2.1ubuntu1-armel-20110612-1102
> 
>   /build/collectd-SQXwoT/collectd-4.10.1/conftest.c:202: undefined reference to `Perl_Gthr_key_ptr'
>   /build/collectd-SQXwoT/collectd-4.10.1/conftest.c:202: undefined reference to `pthread_getspecific'
>   /build/collectd-SQXwoT/collectd-4.10.1/conftest.c:203: undefined reference to `Perl_newSVpv'
>   /build/collectd-SQXwoT/collectd-4.10.1/conftest.c:203: undefined reference to `Perl_load_module_nocontext'
> 
> This happens because ExtUtils::Embed ldopts returns linker options and
> libraries all mixed together, but they need to be picked apart so that
> the libraries can correctly come after C files / objects.  For a similar
> case, see:
> 
>   http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=f2481f3df4521e731da36afe7f0fe19a5c93e46d

I'd prefer to see ExtUtils::Embed ldopts support splitting the output
rather than "parsing" its output (which, in theory, might be error
prone). I'm thus cloning this bug.

Perl maintainers / developers, what do you think about providing options
like -linker and -libs in order to be able to do something like the
following:

  perl -MExtUtils::Embed -e ldopts -- -linker
  perl -MExtUtils::Embed -e ldopts -- -libs

Also, I forwarding your patch upstream. Florian, what do you think about
applying the patch upstream? I'd like to avoid having to patch the build
system in the Debian packaging.

TIA,
Sebastian

-- 
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.         -- Benjamin Franklin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20120517/c8a91037/attachment.pgp>


More information about the collectd mailing list