Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 462282

Summary: sys-devel/boost-m4-0.3 broken with LDFLAGS=-Wl,--as-needed
Product: Gentoo Linux Reporter: Martin von Gagern <Martin.vGagern>
Component: [OLD] DevelopmentAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://github.com/tsuna/boost.m4/commit/0c1ad6b40a28cc6d146782850b7792bae76a9ef3
Whiteboard:
Package list:
Runtime testing required: ---

Description Martin von Gagern 2013-03-19 09:27:28 UTC
The build log says:

checking for the toolset name used by Boost for x86_64-pc-linux-gnu-g++... gcc46 -gcc
checking boost/system/error_code.hpp usability... yes
checking boost/system/error_code.hpp presence... yes
checking for boost/system/error_code.hpp... yes
checking for the Boost system library... configure: error: Unable to determine whether to use -R or -rpath

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/media-gfx/povray-3.7.0_rc7/work/povray-3.7.0_rc7_build/config.log
 * ERROR: media-gfx/povray-3.7.0_rc7 failed (configure phase):
 *   econf failed


And from the config.log:

configure:18895: re-using the existing conftest.o
configure:18901: x86_64-pc-linux-gnu-g++ -o conftest -march=amdfam10 -O2 -ggdb -pipe -pthread  -DPOVLIBDIR=\"/usr/share/povray\" -DPOVCONFDIR=\"/etc/povray\"  -Wl,--as-needed -lboost_system-mt -L/usr/local/lib -Wl,-R,/usr/local/lib conftest.o  -pthread  >&5
conftest.o: In function `error_code':
/usr/include/boost/system/error_code.hpp:315: undefined reference to `boost::system::system_category()'
conftest.o: In function `boost::system::error_code::clear()':
/usr/include/boost/system/error_code.hpp:343: undefined reference to `boost::system::system_category()'
conftest.o: In function `__static_initialization_and_destruction_0':
/usr/include/boost/system/error_code.hpp:214: undefined reference to `boost::system::generic_category()'
/usr/include/boost/system/error_code.hpp:215: undefined reference to `boost::system::generic_category()'
/usr/include/boost/system/error_code.hpp:216: undefined reference to `boost::system::system_category()'
collect2: ld returned 1 exit status
configure:18910: $? = 1
configure:18895: re-using the existing conftest.o
configure:18901: x86_64-pc-linux-gnu-g++ -o conftest -march=amdfam10 -O2 -ggdb -pipe -pthread  -DPOVLIBDIR=\"/usr/share/povray\" -DPOVCONFDIR=\"/etc/povray\"  -Wl,--as-needed -lboost_system-mt -L/usr/local/lib -Wl,-rpath,/usr/local/lib conftest.o  -pthread  >&5
conftest.o: In function `error_code':
/usr/include/boost/system/error_code.hpp:315: undefined reference to `boost::system::system_category()'
conftest.o: In function `boost::system::error_code::clear()':
/usr/include/boost/system/error_code.hpp:343: undefined reference to `boost::system::system_category()'
conftest.o: In function `__static_initialization_and_destruction_0':
/usr/include/boost/system/error_code.hpp:214: undefined reference to `boost::system::generic_category()'
/usr/include/boost/system/error_code.hpp:215: undefined reference to `boost::system::generic_category()'
/usr/include/boost/system/error_code.hpp:216: undefined reference to `boost::system::system_category()'
collect2: ld returned 1 exit status
configure:18910: $? = 1
configure:18934: error: Unable to determine whether to use -R or -rpath

The problem here seems to be the incorrect order of arguments: conftest.o should go BEFORER -lboost_system-mt.
Comment 1 Martin von Gagern 2013-03-19 10:30:53 UTC
The media-gfx/povray-3.7.0_rc6 which I have installed on my system will fail configure with the same reason. So this is not due to povray, but instead to something related to boost, and in particular to the boost.m4 file from sys-devel/boost-m4-0.3. There appears to be a fix for this in the git repository:
https://github.com/tsuna/boost.m4/commit/0c1ad6b40a28cc6d146782850b7792bae76a9ef3
With this fix applied to my boost.m4, things work as expected.
Comment 2 Martin von Gagern 2013-03-19 10:34:38 UTC

*** This bug has been marked as a duplicate of bug 461748 ***