Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 461542 - media-gfx/povray-3.7.0_rc6 - configure: conftest.cpp:(.text.startup+0x5): undefined reference to `boost::system::system_category()'
Summary: media-gfx/povray-3.7.0_rc6 - configure: conftest.cpp:(.text.startup+0x5): und...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-12 17:16 UTC by Olaf Leidinger
Modified: 2013-03-18 10:16 UTC (History)
0 users

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


Attachments
config.log of not working case (config.log,171.37 KB, text/plain)
2013-03-13 16:45 UTC, Olaf Leidinger
Details
output of emerge --info (emerge.info,5.74 KB, text/plain)
2013-03-13 16:47 UTC, Olaf Leidinger
Details
config.log of bumped version rc7 (config.log,171.63 KB, text/plain)
2013-03-18 08:46 UTC, Olaf Leidinger
Details
config.log of working case with same CFLAGS using gold linker (config.log.gold,423.43 KB, text/plain)
2013-03-18 09:06 UTC, Olaf Leidinger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olaf Leidinger 2013-03-12 17:16:02 UTC
Installing povray-3.7.0_rc6 fails with an error reading:

checking for the Boost system library... configure: error: Unable to determine whether to use -R or -rpath

Running configure with the same options manually works fine. I found out, that the only difference are the cflags and the ldflags.

In config.log, I find such compiler calls:

x86_64-pc-linux-gnu-g++ -o conftest -O2 -pipe -mtune=generic  -fomit-frame-pointer -pthread  -DPOVLIBDIR=\"/usr/share/povray\" -DPOVCONFDIR=\"/etc/povray\"  -Wl,-O1 -Wl,--as-needed -lboost_system-mt -L/usr/lib -Wl,-R,/usr/lib conftest.o  -pthread  >&5

So CXXFLAGS="-O2 -pipe -mtune=generic  -fomit-frame-pointer", LDFLAGS="-Wl,-O1 -Wl,--as-needed". As soon as I set the same LDFLAGS when compiling manually, I can reproduce the error I get when compiling using portage.

As these are the default LDFLAGS -- I didn't touch them in my make.conf -- I suggest, that those flags should be disabled for this ebuild.

This is a diff of config.log for the working (LDFLAGS="") and non-working (default LDFLAGS) case:

-configure:18901: x86_64-pc-linux-gnu-g++ -o conftest -O2 -pipe -mtune=generic  -fomit-frame-pointer -pthread  -DPOVLIBDIR=\"/usr/share/povray\" -DPOVCONFDIR=\"/etc/povray\"  -Wl,-O1 -Wl,--as-needed -lboost_system-mt -L/usr/lib -Wl,-R,/usr/lib conftest.o  -pthread  >&5
-conftest.o: In function `main':
-conftest.cpp:(.text.startup+0x5): undefined reference to `boost::system::system_category()'
-conftest.cpp:(.text.startup+0xa): undefined reference to `boost::system::system_category()'
-conftest.o: In function `_GLOBAL__sub_I_main':
-conftest.cpp:(.text.startup+0x43): undefined reference to `boost::system::generic_category()'
-conftest.cpp:(.text.startup+0x4f): undefined reference to `boost::system::generic_category()'
-conftest.cpp:(.text.startup+0x5b): undefined reference to `boost::system::system_category()'
+configure:18901: x86_64-pc-linux-gnu-g++ -o conftest -O2 -pipe -mtune=generic -DPOVLIBDIR=\"/usr/share/\" -DPOVCONFDIR=\"/etc/\" -pthread    -lboost_system-mt -L/usr/lib -Wl,-R,/usr/lib conftest.o  -pthread  >&5
+configure:18910: $? = 0
+configure:18955: result: yes

By the way, the system is amd64~ with latest updates.
-Wl,-O1 -Wl,--as-needed

Reproducible: Always
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2013-03-13 16:34:51 UTC
1) Please post your `emerge --info' output in a comment.
2) Please attach the entire config.log to this bug report.
Comment 2 Olaf Leidinger 2013-03-13 16:45:45 UTC
Created attachment 341910 [details]
config.log of not working case
Comment 3 Olaf Leidinger 2013-03-13 16:47:28 UTC
Created attachment 341912 [details]
output of emerge --info

One note: This is a chroot environment on a gentoo-hardened system. Yet, the install in the chroot env isn't hardened.
Comment 4 Olaf Leidinger 2013-03-14 07:09:16 UTC
More observations wich might be important:

1. It doesn't work when compiling on the machine I supply with binary files, which has a non-hardened kernel.

2. It DOES work on the very machine AND in the chroot when using the gold linker instead of the default one (bfd)
   
   binutils-config --linker ld.gold
Comment 5 Justin Lecher (RETIRED) gentoo-dev 2013-03-14 07:14:59 UTC
Which boost do you have installed and with which USE?
Comment 6 Olaf Leidinger 2013-03-14 07:22:23 UTC
Here you are:

dev-libs/boost-1.52.0-r6:0/1.52  USE="nls threads -debug -doc -icu -mpi -python -static-libs -tools" 

sys-devel/binutils-2.23.1  USE="cxx nls zlib -multislot -multitarget -static-libs {-test} -vanilla"

sys-devel/gcc-4.7.2-r1:4.7  USE="cxx fortran gcj graphite mudflap (multilib) nls nptl openmp (-altivec) -doc (-fixed-point) -go -gtk (-hardened) (-libssp) -multislot -nopie -nossp -objc -objc++ -objc-gc {-test} -vanilla"
Comment 7 Justin Lecher (RETIRED) gentoo-dev 2013-03-14 07:53:26 UTC
+*povray-3.7.0_rc7 (14 Mar 2013)
+
+  14 Mar 2013; Justin Lecher <jlec@gentoo.org> +povray-3.7.0_rc7.ebuild,
+  +files/povray-3.7.0_rc7-boost-1.50.patch,
+  +files/povray-3.7.0_rc7-user-conf.patch, metadata.xml:
+  Version Bump; fixes compilation problems with boost, #461542
+
Comment 8 Olaf Leidinger 2013-03-18 08:45:07 UTC
I'm sorry to report, that the bump doesn't solve the problem for me. media-gfx/povray-3.7.0_rc7 shows the very same error. Logs are following.
Comment 9 Olaf Leidinger 2013-03-18 08:46:55 UTC
Created attachment 342472 [details]
config.log of bumped version rc7
Comment 10 Olaf Leidinger 2013-03-18 09:06:10 UTC
Created attachment 342474 [details]
config.log of working case with same CFLAGS using gold linker
Comment 11 Olaf Leidinger 2013-03-18 10:16:56 UTC
Confirmed that the problem is gone when downgrading boost-m4 to something < 0.3