Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 353656 - unable to build dev-lang/perl without a /lib/ directory
Summary: unable to build dev-lang/perl without a /lib/ directory
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-04 04:54 UTC by Matt Turner
Modified: 2011-02-15 21:07 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Turner gentoo-dev 2011-02-04 04:54:15 UTC
I'm building N32 ABI MIPS stages, and N32 binaries go in /lib32/, so I don't have a /lib/ directory.

dev-lang/perl won't compile, failing ultimately with undefined references to floor, atan2, fmod, and other libm math functions.

This has been reported at least twice before on the gentoo bugzilla,
http://bugs.gentoo.org/104509
http://bugs.gentoo.org/112243

with minor changes to (incompletely) resolve the problem.

As noted in bug 104509#c8, while you can work around the problem by adding -lm to the linker flags, the root of the problem is that dlopen() isn't detected.

This problem has been reported in many other places:
http://mail-index.netbsd.org/pkgsrc-users/2006/11/11/0009.html
https://bugs.busybox.net/show_bug.cgi?id=2503
http://freebsd.monkey.org/freebsd-perl/200701/msg00019.html

but most relevantly on perl-porters:
http://www.gossamer-threads.com/lists/perl/porters/205526

I'm happy to help test. It might be reproducible on amd64-no-multilib profiles (I think they don't have /lib?).

I'm completely unfamiliar with the perl build system, so can someone take a look and help me understand why it's not detecting dlopen()? Hacks like manually linking against -lm aren't acceptable, because without dlopen() all perl modules have to be statically linked.
Comment 1 Matt Turner gentoo-dev 2011-02-12 22:14:05 UTC
The problem appears to be a little different than I initially though.

Even on a mips system where LIBDIR=lib dlopen is not found.

Anyone know what the heck's going on here? It'd be fantastic if I could get this fixed. It's holding up my stage builds.
Comment 2 Torsten Veller (RETIRED) gentoo-dev 2011-02-13 08:01:03 UTC
I don't know the right questions for your problem.

Maybe you start with attaching your buildlog and emerge --info.
Comment 3 Matt Turner gentoo-dev 2011-02-15 21:07:23 UTC
This was somehow caused by compiling glibc without the explicit -mabi=n32 flag. I don't quite understand why, so I'll just remember to always have this flag, even if gcc generates n32 binaries by default.