Incompatible boost libraries between target gnuLinux and Xenomai?

Dear developers & users,

I have a full installation of Orocos 2.4.0 on my desktop computer ( Ubuntu 10.04 ) with gnulinux as target. It's success full environment to develop components without problems, it was installed correctly.

Days after, I try to install Orocos 2.4.0 with xenomai target on different folder on my computer, but it surprised me that shows an error on installation when try to compile the RTT module.

[ 45%] Building CXX object rtt/CMakeFiles/orocos-rtt-xenomai_dynamic.dir/extras/dev/SensorInterface.cpp.o
Linking CXX shared library liborocos-rtt-xenomai.so
CMakeFiles/orocos-rtt-xenomai_dynamic.dir/plugin/PluginLoader.cpp.o: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:208: undefined reference to `boost::system::get_system_category()'
/usr/local/include/boost/system/error_code.hpp:209: undefined reference to `boost::system::get_generic_category()'
/usr/local/include/boost/system/error_code.hpp:214: undefined reference to `boost::system::get_generic_category()'
/usr/local/include/boost/system/error_code.hpp:215: undefined reference to `boost::system::get_generic_category()'
/usr/local/include/boost/system/error_code.hpp:216: undefined reference to `boost::system::get_system_category()'
CMakeFiles/orocos-rtt-xenomai_dynamic.dir/plugin/PluginLoader.cpp.o: In function `~dir_itr_imp':
/usr/local/include/boost/filesystem/operations.hpp:877: undefined reference to `boost::filesystem::detail::dir_itr_close(void*&, void*&)'

Is strange, because the boost library version is the same and the gnulinux-orocos installation is compiling fine.¿? I have an installation on Debian 6.0.2 Virtual machine with Xenomai and all is compiling fine (except my test component, but it is another question launched in my prior message for the forum today).

Any idea¿? Thanks in advance

Note: To compile RTT, I was needed to execute first :  cmake .. -DOROCOS_TARGET=xenomai -DCMAKE_PREFIX_PATH=/usr/xenomai on rtt/build folder, in other case appear an error by not xenomai dir found

Incompatible boost libraries between target gnuLinux and Xenomai

On Friday 21 October 2011 13:34:49 antonio [dot] castellon [..] ... wrote:
> Dear developers & users,
>
> I have a full installation of Orocos 2.4.0 on my desktop computer ( Ubuntu
> 10.04 ) with gnulinux as target. It's success full environment to develop
> components without problems, it was installed correctly.
>
> Days after, I try to install Orocos 2.4.0 with xenomai target on different
> folder on my computer, but it surprised me that shows an error on
> installation when try to compile the RTT module.
>
> 
> 
> [ 45%] Building CXX object
> rtt/CMakeFiles/orocos-rtt-xenomai_dynamic.dir/extras/dev/SensorInterface.c
> pp.o Linking CXX shared library liborocos-rtt-xenomai.so
> CMakeFiles/orocos-rtt-xenomai_dynamic.dir/plugin/PluginLoader.cpp.o: In
> function `__static_initialization_and_destruction_0':
> /usr/local/include/boost/system/error_code.hpp:208: undefined reference to
> `boost::system::get_system_category()'
> /usr/local/include/boost/system/error_code.hpp:209: undefined reference to
> `boost::system::get_generic_category()'
> /usr/local/include/boost/system/error_code.hpp:214: undefined reference to
> `boost::system::get_generic_category()'
> /usr/local/include/boost/system/error_code.hpp:215: undefined reference to
> `boost::system::get_generic_category()'
> /usr/local/include/boost/system/error_code.hpp:216: undefined reference to
> `boost::system::get_system_category()'
> CMakeFiles/orocos-rtt-xenomai_dynamic.dir/plugin/PluginLoader.cpp.o: In
> function `~dir_itr_imp':
> /usr/local/include/boost/filesystem/operations.hpp:877: undefined
> reference to `boost::filesystem::detail::dir_itr_close(void*&, void*&)'
> 
>

2.4.0 looks up the boost system library and links with it. It will refuse to
configure if boost system is not found. Look at your build/CMakeCache.txt file
to find out what it's linking with and how the include paths are because I
suspect that your setup is the cause, and not RTT.

Peter

enkulator's picture

Incompatible boost libraries between target gnuLinux and Xenomai

Dear Peter,

I search on *ccmake* of the Xenomai configuration and see that exists
reference to Boost library:

Boost_FILESYSTEM_LIBRARY */usr/local/lib/libboost_filesystem.so
*

Boost_FILESYSTEM_LIBRARY_DEBUG Boost_FILESYSTEM_LIBRARY_DEBUG-NOTFOUND

Boost_FILESYSTEM_LIBRARY_RELEA
*/usr/local/lib/libboost_filesystem.so *

Boost_INCLUDE_DIR */usr/local/include *

Boost_LIBRARY_DIRS */usr/local/lib*

Boost_SERIALIZATION_LIBRARY
*/usr/local/lib/libboost_serialization.so*

Boost_SERIALIZATION_LIBRARY_DE
Boost_SERIALIZATION_LIBRARY_DEBUG-NOTFOUND

Boost_SERIALIZATION_LIBRARY_RE */usr/local/lib/libboost_serialization.so
*

Boost_SYSTEM_LIBRARY */usr/local/lib/libboost_system.so*

Boost_SYSTEM_LIBRARY_DEBUG Boost_SYSTEM_LIBRARY_DEBUG-NOTFOUND

Boost_SYSTEM_LIBRARY_RELEASE */usr/local/lib/libboost_system.so*

Boost_THREAD_LIBRARY * /usr/local/lib/libboost_thread.so *

Boost_THREAD_LIBRARY_DEBUG Boost_THREAD_LIBRARY_DEBUG-NOTFOUND

Boost_THREAD_LIBRARY_RELEASE */usr/local/lib/libboost_thread.so*
Boost_UNIT_TEST_FRAMEWORK_LIBR
*/usr/local/lib/libboost_unit_test_framework.so
*

Boost_UNIT_TEST_FRAMEWORK_LIBR
Boost_UNIT_TEST_FRAMEWORK_LIBRARY_DEBUG-NOTFOUND

Boost_UNIT_TEST_FRAMEWORK_LIBR
*/usr/local/lib/libboost_unit_test_framework.so
*

¿Exists any possibility to use 2.4.0 xenomai instead of 2.5.0 ?

Best regards,

On Fri, Oct 21, 2011 at 14:38, Peter Soetens <peter [..] ...>wrote:

> On Friday 21 October 2011 13:34:49 antonio [dot] castellon [..] ... wrote:
> > Dear developers & users,
> >
> > I have a full installation of Orocos 2.4.0 on my desktop computer (
> Ubuntu
> > 10.04 ) with gnulinux as target. It's success full environment to develop
> > components without problems, it was installed correctly.
> >
> > Days after, I try to install Orocos 2.4.0 with xenomai target on
> different
> > folder on my computer, but it surprised me that shows an error on
> > installation when try to compile the RTT module.
> >
> > &#10;&gt; &gt;&#10;&gt; &gt; [ 45%] Building CXX object&#10;&gt; &gt;&#10;&gt; rtt/CMakeFiles/orocos-rtt-xenomai_dynamic.dir/extras/dev/SensorInterface.c&#10;&gt; &gt; pp.o Linking CXX shared library liborocos-rtt-xenomai.so&#10;&gt; &gt; CMakeFiles/orocos-rtt-xenomai_dynamic.dir/plugin/PluginLoader.cpp.o: In&#10;&gt; &gt; function `__static_initialization_and_destruction_0&#039;:&#10;&gt; &gt; /usr/local/include/boost/system/error_code.hpp:208: undefined reference&#10;&gt; to&#10;&gt; &gt; `boost::system::get_system_category()&#039;&#10;&gt; &gt; /usr/local/include/boost/system/error_code.hpp:209: undefined reference&#10;&gt; to&#10;&gt; &gt; `boost::system::get_generic_category()&#039;&#10;&gt; &gt; /usr/local/include/boost/system/error_code.hpp:214: undefined reference&#10;&gt; to&#10;&gt; &gt; `boost::system::get_generic_category()&#039;&#10;&gt; &gt; /usr/local/include/boost/system/error_code.hpp:215: undefined reference&#10;&gt; to&#10;&gt; &gt; `boost::system::get_generic_category()&#039;&#10;&gt; &gt; /usr/local/include/boost/system/error_code.hpp:216: undefined reference&#10;&gt; to&#10;&gt; &gt; `boost::system::get_system_category()&#039;&#10;&gt; &gt; CMakeFiles/orocos-rtt-xenomai_dynamic.dir/plugin/PluginLoader.cpp.o: In&#10;&gt; &gt; function `~dir_itr_imp&#039;:&#10;&gt; &gt; /usr/local/include/boost/filesystem/operations.hpp:877: undefined&#10;&gt; &gt; reference to `boost::filesystem::detail::dir_itr_close(void*&amp;, void*&amp;)&#039;&#10;&gt; &gt;&#10;&gt; &gt;
>
> 2.4.0 looks up the boost system library and links with it. It will refuse
> to
> configure if boost system is not found. Look at your build/CMakeCache.txt
> file
> to find out what it's linking with and how the include paths are because I
> suspect that your setup is the cause, and not RTT.
>
> Peter
>

Incompatible boost libraries between target gnuLinux and Xenomai

On Friday 21 October 2011 15:55:17 Antonio Castellon wrote:
> Dear Peter,
>
> I search on *ccmake* of the Xenomai configuration and see that exists
> reference to Boost library:
>
> Boost_FILESYSTEM_LIBRARY */usr/local/lib/libboost_filesystem.so
> *
>
>
> Boost_FILESYSTEM_LIBRARY_DEBUG Boost_FILESYSTEM_LIBRARY_DEBUG-NOTFOUND
>
>
>
> Boost_FILESYSTEM_LIBRARY_RELEA
> */usr/local/lib/libboost_filesystem.so *
>
>
> Boost_INCLUDE_DIR */usr/local/include *
>
>
>
> Boost_LIBRARY_DIRS */usr/local/lib*
>
>
>
> Boost_SERIALIZATION_LIBRARY
> */usr/local/lib/libboost_serialization.so*
>
>
> Boost_SERIALIZATION_LIBRARY_DE
> Boost_SERIALIZATION_LIBRARY_DEBUG-NOTFOUND
>
>
> Boost_SERIALIZATION_LIBRARY_RE */usr/local/lib/libboost_serialization.so
> *
>
>
> Boost_SYSTEM_LIBRARY */usr/local/lib/libboost_system.so*
>
>
>
> Boost_SYSTEM_LIBRARY_DEBUG Boost_SYSTEM_LIBRARY_DEBUG-NOTFOUND
>
>
>
> Boost_SYSTEM_LIBRARY_RELEASE */usr/local/lib/libboost_system.so*
>
>
>
> Boost_THREAD_LIBRARY * /usr/local/lib/libboost_thread.so *
>
>
>
> Boost_THREAD_LIBRARY_DEBUG Boost_THREAD_LIBRARY_DEBUG-NOTFOUND
>
>
>
> Boost_THREAD_LIBRARY_RELEASE */usr/local/lib/libboost_thread.so*
> Boost_UNIT_TEST_FRAMEWORK_LIBR
> */usr/local/lib/libboost_unit_test_framework.so
> *
>
>
> Boost_UNIT_TEST_FRAMEWORK_LIBR
> Boost_UNIT_TEST_FRAMEWORK_LIBRARY_DEBUG-NOTFOUND
>
>
> Boost_UNIT_TEST_FRAMEWORK_LIBR
> */usr/local/lib/libboost_unit_test_framework.so
> *
>
>
> ¿Exists any possibility to use 2.4.0 xenomai instead of 2.5.0 ?

It works on all our systems. The snippet of your cmake cache file shows at
least that the lib is found, but I see no include paths to /usr/local/include,
so I think that it is using the Boost headers in /usr/include and linking with
the libraries in /usr/local/lib.

If you're using multiple boost installations, and also ones in the standard
include path, make sure your cmake options are correctly set. This is not
trivial and very sensitive.

Peter