Linking typelib

Hi,

I have found some interested behaviour. If I build typelib with this options:

mkdir build
cd build
CXXFLAGS=$CFLAGS LDFLAGS="-Wl,-z,defs" cmake ../
make

I got this error when try wit link with boost:

MakeFiles/typeLib.dir/typename.o: In function
`__static_initialization_and_destruction_0(int, int)':
typename.cc:(.text+0xb70): undefined reference to
`boost::system::get_system_category()'
typename.cc:(.text+0xb7c): undefined reference to
`boost::system::get_generic_category()'
typename.cc:(.text+0xb88): undefined reference to
`boost::system::get_generic_category()'
typename.cc:(.text+0xb94): undefined reference to
`boost::system::get_generic_category()'
typename.cc:(.text+0xba0): undefined reference to
`boost::system::get_system_category()'
CMakeFiles/typeLib.dir/exporter.o: In function
`__static_initialization_and_destruction_0(int, int)':
exporter.cc:(.text+0x1101): undefined reference to
`boost::system::get_system_category()'
exporter.cc:(.text+0x110d): undefined reference to
`boost::system::get_generic_category()'
exporter.cc:(.text+0x1119): undefined reference to
`boost::system::get_generic_category()'
exporter.cc:(.text+0x1125): undefined reference to
`boost::system::get_generic_category()'
exporter.cc:(.text+0x1131): undefined reference to
`boost::system::get_system_category()'
CMakeFiles/typeLib.dir/pluginmanager.o: In function
`__static_initialization_and_destruction_0(int, int)':
pluginmanager.cc:(.text+0x17ff): undefined reference to
`boost::system::get_system_category()'
pluginmanager.cc:(.text+0x180b): undefined reference to
`boost::system::get_generic_category()'
pluginmanager.cc:(.text+0x1817): undefined reference to
`boost::system::get_generic_category()'
pluginmanager.cc:(.text+0x1823): undefined reference to
`boost::system::get_generic_category()'
pluginmanager.cc:(.text+0x182f): undefined reference to
`boost::system::get_system_category()'
CMakeFiles/typeLib.dir/pluginmanager.o: In function
`boost::system::error_code::error_code()':
pluginmanager.cc:
(.text._ZN5boost6system10error_codeC1Ev[boost::system::error_code::error_code()]+0x17):
undefined reference to `boost::system::get_system_category()'
CMakeFiles/typeLib.dir/pluginmanager.o: In function
`boost::enable_if<boost::filesystem::is_basic_path std::char_traits boost::filesystem::path_traits> >, bool>::type
boost::filesystem::exists<boost::filesystem::basic_path std::char_traits boost::filesystem::path_traits>
>(boost::filesystem::basic_path<std::basic_string std::char_traits boost::filesystem::path_traits> const&)':
pluginmanager.cc:
(.text._ZN5boost10filesystem6existsINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEbE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path std::char_traits boost::filesystem::path_traits> >, bool>::type
boost::filesystem::exists<boost::filesystem::basic_path std::char_traits boost::filesystem::path_traits>
>(boost::filesystem::basic_path<std::basic_string std::char_traits boost::filesystem::path_traits> const&)]+0x46): undefined reference to
`boost::filesystem::detail::status_api(std::basic_string<char,
std::char_traits boost::system::error_code&)'
CMakeFiles/typeLib.dir/pluginmanager.o: In function
`boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path std::char_traits boost::filesystem::path_traits>
>::m_init(boost::filesystem::basic_path<std::basic_string std::char_traits boost::filesystem::path_traits> const&)':
pluginmanager.cc:
(.text._ZN5boost10filesystem24basic_directory_iteratorINS0_10basic_pathISsNS0_11path_traitsEEEE6m_initERKS4_[boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path std::char_traits boost::filesystem::path_traits>
>::m_init(boost::filesystem::basic_path<std::basic_string std::char_traits boost::filesystem::path_traits> const&)]+0x3f): undefined reference to
`boost::filesystem::detail::not_found_error()'
pluginmanager.cc:
(.text._ZN5boost10filesystem24basic_directory_iteratorINS0_10basic_pathISsNS0_11path_traitsEEEE6m_initERKS4_[boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path std::char_traits boost::filesystem::path_traits>
>::m_init(boost::filesystem::basic_path<std::basic_string std::char_traits boost::filesystem::path_traits> const&)]+0x103): undefined reference to
`boost::filesystem::detail::dir_itr_first(void*&, void*&,
std::basic_string<char, std::char_traits const&, std::basic_string<char, std::char_traits >&, boost::filesystem::file_status&, boost::filesystem::file_status&)'
CMakeFiles/typeLib.dir/pluginmanager.o: In function
`boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path std::char_traits boost::filesystem::path_traits> >::increment()':
pluginmanager.cc:
(.text._ZN5boost10filesystem24basic_directory_iteratorINS0_10basic_pathISsNS0_11path_traitsEEEE9incrementEv[boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path std::char_traits boost::filesystem::path_traits> >::increment()]+0x115): undefined reference
to `boost::filesystem::detail::dir_itr_increment(void*&, void*&,
std::basic_string<char, std::char_traits boost::filesystem::file_status&, boost::filesystem::file_status&)'
CMakeFiles/typeLib.dir/pluginmanager.o: In function
`boost::filesystem::detail::dir_itr_imp<boost::filesystem::basic_path std::char_traits boost::filesystem::path_traits> >::~dir_itr_imp()':
pluginmanager.cc:
(.text._ZN5boost10filesystem6detail11dir_itr_impINS0_10basic_pathISsNS0_11path_traitsEEEED1Ev[boost::filesystem::detail::dir_itr_imp<boost::filesystem::basic_path std::char_traits boost::filesystem::path_traits> >::~dir_itr_imp()]+0x26): undefined reference
to `boost::filesystem::detail::dir_itr_close(void*&, void*&)'
CMakeFiles/typeLib.dir/csvoutput.o: In function
`__static_initialization_and_destruction_0(int, int)':
csvoutput.cc:(.text+0x1543): undefined reference to
`boost::system::get_system_category()'
csvoutput.cc:(.text+0x154f): undefined reference to
`boost::system::get_generic_category()'
csvoutput.cc:(.text+0x155b): undefined reference to
`boost::system::get_generic_category()'
csvoutput.cc:(.text+0x1567): undefined reference to
`boost::system::get_generic_category()'
csvoutput.cc:(.text+0x1573): undefined reference to
`boost::system::get_system_category()'
collect2: ld returned 1 exit status
make[2]: *** [typelib/libtypeLib.so.1.1] Error 1
make[1]: *** [typelib/CMakeFiles/typeLib.dir/all] Error 2
make: *** [all] Error 2

it fails with debian lenny and squeeze and boost 1.40 and 1.42. This
parameters are the ones that orocos uses to create the debian package. Just
curiosity.

Regards,

Leo