
On Thu, 24 Mar 2005 15:38:09 +0300, Vladimir Prus <ghost@cs.msu.su> wrote:
Maxim Yegorushkin wrote:
Hi,
I upgraded today to boost-1.32.0-5.fc3.i386.rpm and my projects stoped linking complaining about libboost_unit_test_framework.so: undefined reference to `init_unit_test_suite(int, char**)'.
I think the standard approach when using packages is to report the bug to the package maintainer. In particular, nobody but him know what version/CVS date that package corresponds too.
Understood.
I'm not a linker expert but it seems like libboost_unit_test_framework library does not have a weak symbol init_unit_test_suite anymore. I had to rollback to boost-1.32.0-3.i386.rpm.
Why should unit_test_framework define such a symbol? Especially 'weak'? If you link to libboost_unit_test_framework you are supposed to provide init_unit_test_suite function in your application, no? Do you provide one?
For details, here's output from 'readelf -W -a <unit_test_lib.so>' where the lib is produced with Boost.Build V2:
917: 00000000 0 NOTYPE GLOBAL DEFAULT UND _Z20init_unit_test_suiteiPPc
The symbol is underfined, not weak. And I get no link error for test/example/unit_test_example1.
I'm now pretty much sure I diagnosed the problem wrong (regarding the weak symbol). Thanks for the elaboration. -- Maxim Yegorushkin