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.
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.
I don't know the right questions for your problem. Maybe you start with attaching your buildlog and emerge --info.
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.