Skip Menu |

This queue is for tickets about the Inline-CPP CPAN distribution.

Report information
The Basics
Id: 96348
Status: rejected
Priority: 0/
Queue: Inline-CPP

People
Owner: Nobody in particular
Requestors: NERDVANA [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Need extra lib path on gentoo
Inline::CPP won't install on any Gentoo system I've tried. After some diagnosing, it seems that Inline::CPP needs the additional library path like "/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/" which is where "libstdc++.so" is found. So, it would seem that there just needs to be more logic in the makefile. I'm not sure how to properly add this, but if I alter my Config.pm to say our $libs = '-L/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/ -lstdc++' it works. If you want a gentoo system to test with, you can get a bare-minimal chroot pretty easily: wget http://distfiles.gentoo.org/releases/amd64/autobuilds/current-stage3-amd64-nomultilib/stage3-amd64-nomultilib-20140529.tar.bz2 mkdir gentoo-chroot tar -xjf stage3-amd64-nomultilib-20140529.tar.bz2 -C gentoo-chroot mount --rbind /dev gentoo-chroot/dev mount --bind /proc gentoo-chroot/proc cp /etc/resolv.conf gentoo-chroot/etc/ chroot gentoo-chroot /bin/bash source /etc/profile sed -ie 's/^#en_US/en_US/' /etc/locale.gen locale-gen cpan App::cpanminus cpanm Inline --force # will fail on test 8, which is reported already cpanm Inline::CPP # will fail with unresolved symbol errors, needing the above fix
On Mon Jun 09 17:27:15 2014, NERDVANA wrote: Show quoted text
> I'm not sure how to properly add this, but if I alter my Config.pm to > say > our $libs = '-L/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/ -lstdc++' > it works.
I think this means that perl really should have been configured with /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3 as one of the directories specified in $Config{libpth} (perl -V:libpth). If that had been done, I don't think there would have been any problem with Inlibe::CPP. But I'm not an expert on this - especially when it comes to apportioning blame. In addition to the workaround you've used, I think you could alternatively have added /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3 to the directories being searched via the LIBRARY_PATH environment variable (at least if you're using gcc): export LIBRARY_PATH=$LIBRARY_PATH:/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3 Cheers, Rob
This is a copy-paste from an email discussion on this topic on the Inline mailing list: inline@perl.org: Show quoted text
> Date: Thu, 12 Jun 2014 09:33:23 -0500 > From: Reini Urban <reini@cpanel.net> > To: inline@perl.org > Subject: Re: Inline::CPP: Looking for suggestions on Gentoo > > This is not gentoo specific, rather g++. > g++ has a spec to find its hostpath without any need to add it to -L or > the LD env. > > Somehow the path is stripped or the spec is wrong. > > A c++ which does not find its own libstdc++ is not worth it.
I can confirm that the library is not being found. But I also believe that RURBAN is correct; g++ must be configured to find its own libstdc++ library. Given this comment, and the fact that there are work-arounds, I'm inclined to believe that this is not an Inline::CPP bug, and will be closing the report. However, if anyone has a patch that will resolve this issue portably, without bringing down the house of cards with respect to other operating systems, I'd be happy to apply it. Just fork the Github repo, and issue a pull request with the patch.