OCL Compile Error

Hello all,

I'm having trouble compiling OCL 1.8.1. Any help would be much appreciated!

yamokosk@borelli:~/src/orocos-ocl-1.8.1$ sudo make Orocos Component Library version (1.8.1) Build type set to 'OCL' by user. -- Looking for doxygen... -- Looking for doxygen... - found /usr/bin/doxygen -- Looking for dot tool... -- Looking for dot tool... - found /usr/bin/dot Found Doxygen -- documentation can be built -- Detecting RTT Searching RTT in /usr/local: Found flavors: orocos-rtt-gnulinux.pc;orocos-rtt-corba-xenomai.pc;orocos-rtt-xenomai.pc -- Looking for orocos-rtt-gnulinux >= 1.3.0 -- found

 Using: gnulinux . Set OROCOS_TARGET variable to another one to change the compile target.
-- Looking for orocos-rtt-gnulinux >= 1.0.0 -- found
   Includes in: /usr/local/include
   Libraries in: /usr/local/lib
   Libraries: orocos-rtt-gnulinux;pthread
   Defines:  -DOROCOS_TARGET=gnulinux
-- Looking for orocos-rtt-corba-xenomai >= 1.3.0 -- found Detected CORBA build for gnulinux -- Looking for orocos-rtt-corba-xenomai -- found
   Includes in: /usr/realtime/include/xenomai;/usr/include/orbsvcs;/usr/local/include/rtt/corba;/usr/local/include
   Libraries in: /usr/local/lib;/usr/realtime/lib
   Libraries: orocos-rtt-corba-xenomai;orocos-rtt-xenomai;native;pthread
   Defines:  -DOROCOS_TARGET=xenomai
-- Looking for orocos-rtt-xenomai >= 1.3.0 -- found -- Detecting KDL Looking for KDL in: /usr/local -- Looking for orocos-kdl >= 0.99 -- found
   Includes in: /usr/local/include;/usr/include/eigen2
   Libraries in: /usr/local/lib
   Libraries: orocos-kdl
   Defines: 
-- Detecting BFL Looking for BFL in: /usr/local -- Looking for orocos-bfl >= 0.4.2 -- not found Looking for comedilib headers in /usr/local/include -- Looking for comedilib >= 0.7.0 -- not found Manually looking for comedilib headers in /usr/local/include Looking for netcdf in /usr/local
  Can't find NETCDF
-- Looking for libftd2xx - not found -- Looking for canlib - not found -- Looking for Qt4 >= 4.1 - not found -- Checking GNUCXX version 3/4 to determine OpenCV /opt/net/ path -- Looking for OpenCV - found -- Looking for libncurses - found -- Looking for readline/readline.h - found -- Looking for Boost Ublas - found -- Looking for boost::program_options - found -- Looking for boost::program_options library - found Building Shared library for orocos-ocl-common Building Shared library for orocos-taskbrowser Building Shared library for orocos-timer Building Shared library for orocos-helloworld Building Shared library for orocos-reporting Building Shared library for orocos-io Building Shared library for orocos-axes Building Shared library for orocos-naxes Building Shared library for orocos-cartesian Building Shared library for orocos-viewer Building Shared library for orocos-deployment Building Shared library for orocos-deployment-corba Selected Libraries: -lorocos-deployment-corba-gnulinux -lorocos-deployment-gnulinux -lorocos-viewer-gnulinux -lorocos-cartesian-gnulinux -lorocos-naxes-gnulinux -lorocos-axes-gnulinux -lorocos-io-gnulinux -lorocos-reporting-gnulinux -lorocos-helloworld-gnulinux -lorocos-timer-gnulinux -lorocos-taskbrowser-gnulinux -lorocos-ocl-common-gnulinux Disabling packaging for version 2.6 -- Configuring done -- Generating done -- Build files have been written to: /home/yamokosk/src/orocos-ocl-1.8.1 Use: make\ docapi\ dochtml\ docpdf to build the documentation. [ 0%] Built target message [ 4%] Built target orocos-ocl-common-gnulinux [ 6%] Built target orocos-taskbrowser-gnulinux [ 8%] Built target orocos-timer-gnulinux Linking CXX executable helloworld CMakeFiles/helloworld.dir/HelloWorld.o: In function `RTT::OS::Mutex::trylock()': HelloWorld.cpp:(.text._ZN3RTT2OS5Mutex7trylockEv[RTT::OS::Mutex::trylock()]+0x20): undefined reference to `rt_mutex_lock' CMakeFiles/helloworld.dir/HelloWorld.o: In function `RTT::OS::Mutex::lock()': HelloWorld.cpp:(.text._ZN3RTT2OS5Mutex4lockEv[RTT::OS::Mutex::lock()]+0x20): undefined reference to `rt_mutex_lock' CMakeFiles/helloworld.dir/HelloWorld.o: In function `RTT::OS::Mutex::unlock()': HelloWorld.cpp:(.text._ZN3RTT2OS5Mutex6unlockEv[RTT::OS::Mutex::unlock()]+0x9): undefined reference to `rt_mutex_unlock' CMakeFiles/helloworld.dir/HelloWorld.o: In function `RTT::OS::Mutex::~Mutex()': HelloWorld.cpp:(.text._ZN3RTT2OS5MutexD0Ev[RTT::OS::Mutex::~Mutex()]+0x2c): undefined reference to `rt_mutex_lock' HelloWorld.cpp:(.text._ZN3RTT2OS5MutexD0Ev[RTT::OS::Mutex::~Mutex()]+0x34): undefined reference to `rt_mutex_unlock' HelloWorld.cpp:(.text._ZN3RTT2OS5MutexD0Ev[RTT::OS::Mutex::~Mutex()]+0x3c): undefined reference to `rt_mutex_delete' CMakeFiles/helloworld.dir/HelloWorld.o: In function `RTT::OS::Mutex::~Mutex()': HelloWorld.cpp:(.text._ZN3RTT2OS5MutexD1Ev[RTT::OS::Mutex::~Mutex()]+0x2c): undefined reference to `rt_mutex_lock' HelloWorld.cpp:(.text._ZN3RTT2OS5MutexD1Ev[RTT::OS::Mutex::~Mutex()]+0x34): undefined reference to `rt_mutex_unlock' HelloWorld.cpp:(.text._ZN3RTT2OS5MutexD1Ev[RTT::OS::Mutex::~Mutex()]+0x3c): undefined reference to `rt_mutex_delete' CMakeFiles/helloworld.dir/HelloWorld.o: In function `RTT::DataObjectLocked<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::DataObjectLocked(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': HelloWorld.cpp:(.text._ZN3RTT16DataObjectLockedISsEC1ERKSsS3_[RTT::DataObjectLocked<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::DataObjectLocked(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)]+0x44): undefined reference to `rt_mutex_create' CMakeFiles/helloworld.dir/HelloWorld.o: In function `RTT::DataObjectLocked<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~DataObjectLocked()': HelloWorld.cpp:(.text._ZN3RTT16DataObjectLockedISsED0Ev[RTT::DataObjectLocked<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~DataObjectLocked()]+0x45): undefined reference to `rt_mutex_lock' HelloWorld.cpp:(.text._ZN3RTT16DataObjectLockedISsED0Ev[RTT::DataObjectLocked<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~DataObjectLocked()]+0x4d): undefined reference to `rt_mutex_unlock' HelloWorld.cpp:(.text._ZN3RTT16DataObjectLockedISsED0Ev[RTT::DataObjectLocked<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~DataObjectLocked()]+0x55): undefined reference to `rt_mutex_delete' CMakeFiles/helloworld.dir/HelloWorld.o: In function `RTT::BufferLocked<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~BufferLocked()': HelloWorld.cpp:(.text._ZN3RTT12BufferLockedISsED0Ev[RTT::BufferLocked<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~BufferLocked()]+0x57): undefined reference to `rt_mutex_lock' HelloWorld.cpp:(.text._ZN3RTT12BufferLockedISsED0Ev[RTT::BufferLocked<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~BufferLocked()]+0x5f): undefined reference to `rt_mutex_unlock' HelloWorld.cpp:(.text._ZN3RTT12BufferLockedISsED0Ev[RTT::BufferLocked<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~BufferLocked()]+0x67): undefined reference to `rt_mutex_delete' CMakeFiles/helloworld.dir/HelloWorld.o: In function `RTT::BufferLocked<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~BufferLocked()': HelloWorld.cpp:(.text._ZN3RTT12BufferLockedISsED1Ev[RTT::BufferLocked<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~BufferLocked()]+0x57): undefined reference to `rt_mutex_lock' HelloWorld.cpp:(.text._ZN3RTT12BufferLockedISsED1Ev[RTT::BufferLocked<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~BufferLocked()]+0x5f): undefined reference to `rt_mutex_unlock' HelloWorld.cpp:(.text._ZN3RTT12BufferLockedISsED1Ev[RTT::BufferLocked<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~BufferLocked()]+0x67): undefined reference to `rt_mutex_delete' CMakeFiles/helloworld.dir/HelloWorld.o: In function `RTT::DataObjectLocked<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~DataObjectLocked()': HelloWorld.cpp:(.text._ZN3RTT16DataObjectLockedISsED1Ev[RTT::DataObjectLocked<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~DataObjectLocked()]+0x45): undefined reference to `rt_mutex_lock' HelloWorld.cpp:(.text._ZN3RTT16DataObjectLockedISsED1Ev[RTT::DataObjectLocked<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~DataObjectLocked()]+0x4d): undefined reference to `rt_mutex_unlock' HelloWorld.cpp:(.text._ZN3RTT16DataObjectLockedISsED1Ev[RTT::DataObjectLocked<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~DataObjectLocked()]+0x55): undefined reference to `rt_mutex_delete' CMakeFiles/helloworld.dir/HelloWorld.o: In function `RTT::DataObjectLocked<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::clone() const': HelloWorld.cpp:(.text._ZNK3RTT16DataObjectLockedISsE5cloneEv[RTT::DataObjectLocked<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::clone() const]+0x5f): undefined reference to `rt_mutex_create' CMakeFiles/helloworld.dir/HelloWorld.o: In function `RTT::ConnectionFactory<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::createBuffer(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, RTT::ConnectionTypes::ConnectionType)': HelloWorld.cpp:(.text._ZN3RTT17ConnectionFactoryISsE12createBufferEiRKSsNS_15ConnectionTypes14ConnectionTypeE[RTT::ConnectionFactory<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::createBuffer(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, RTT::ConnectionTypes::ConnectionType)]+0x440): undefined reference to `rt_mutex_create' collect2: ld returned 1 exit status make[2]: *** [helloworld/helloworld] Error 1 make[1]: *** [helloworld/CMakeFiles/helloworld.dir/all] Error 2 make: *** [all] Error 2

OCL Compile Error

On Thursday 20 May 2010 00:54:38 elmoret [..] ... wrote:
> Hello all,
>
> I'm having trouble compiling OCL 1.8.1. Any help would be much appreciated!

Which Xenomai version are you using ?

It seems it's not linking correctly with the Xenomai libraries. In case you
have a file /usr/realtime/lib/libxenomai.so , you'll have to add -lxenomai to
the /usr/local/lib/pkgconfig/orocos-rtt-xenomai.pc file. Or put the attached
FindXenomai.cmake file in the orocos-rtt/config/ and do a rebuild of the
CMakeCache (ie rm CMakeCache.txt ; cmake .. -DOROCOS_TARGET=xenomai)
Which should fix this issue as well.

Hope this helps,
Peter

OCL Compile Error

Hello all,

I'm having trouble compiling OCL 1.8.1. Any help would be much appreciated!

yamokosk@borelli:~/src/orocos-ocl-1.8.1$ sudo make
Orocos Component Library version (1.8.1)
Build type set to 'OCL' by user.
-- Looking for doxygen...
-- Looking for doxygen... - found /usr/bin/doxygen
-- Looking for dot tool...
-- Looking for dot tool... - found /usr/bin/dot
Found Doxygen -- documentation can be built
-- Detecting RTT
Searching RTT in /usr/local:
Found flavors: orocos-rtt-gnulinux.pc;orocos-rtt-corba-xenomai.pc;orocos-rtt-xenomai.pc
-- Looking for orocos-rtt-gnulinux >= 1.3.0 -- found
Using: gnulinux . Set OROCOS_TARGET variable to another one to change the compile target.
-- Looking for orocos-rtt-gnulinux >= 1.0.0 -- found
Includes in: /usr/local/include
Libraries in: /usr/local/lib
Libraries: orocos-rtt-gnulinux;pthread
Defines: -DOROCOS_TARGET=gnulinux
-- Looking for orocos-rtt-corba-xenomai >= 1.3.0 -- found
Detected CORBA build for gnulinux
-- Looking for orocos-rtt-corba-xenomai -- found
Includes in: /usr/realtime/include/xenomai;/usr/include/orbsvcs;/usr/local/include/rtt/corba;/usr/local/include
Libraries in: /usr/local/lib;/usr/realtime/lib
Libraries: orocos-rtt-corba-xenomai;orocos-rtt-xenomai;native;pthread
Defines: -DOROCOS_TARGET=xenomai
-- Looking for orocos-rtt-xenomai >= 1.3.0 -- found
-- Detecting KDL
Looking for KDL in: /usr/local
-- Looking for orocos-kdl >= 0.99 -- found
Includes in: /usr/local/include;/usr/include/eigen2
Libraries in: /usr/local/lib
Libraries: orocos-kdl
Defines:
-- Detecting BFL
Looking for BFL in: /usr/local
-- Looking for orocos-bfl >= 0.4.2 -- not found
Looking for comedilib headers in /usr/local/include
-- Looking for comedilib >= 0.7.0 -- not found
Manually looking for comedilib headers in /usr/local/include
Looking for netcdf in /usr/local
Can't find NETCDF
-- Looking for libftd2xx - not found
-- Looking for canlib - not found
-- Looking for Qt4 >= 4.1 - not found
-- Checking GNUCXX version 3/4 to determine OpenCV /opt/net/ path
-- Looking for OpenCV - found
-- Looking for libncurses - found
-- Looking for readline/readline.h - found
-- Looking for Boost Ublas - found
-- Looking for boost::program_options - found
-- Looking for boost::program_options library - found
Building Shared library for orocos-ocl-common
Building Shared library for orocos-taskbrowser
Building Shared library for orocos-timer
Building Shared library for orocos-helloworld
Building Shared library for orocos-reporting
Building Shared library for orocos-io
Building Shared library for orocos-axes
Building Shared library for orocos-naxes
Building Shared library for orocos-cartesian
Building Shared library for orocos-viewer
Building Shared library for orocos-deployment
Building Shared library for orocos-deployment-corba
Selected Libraries: -lorocos-deployment-corba-gnulinux -lorocos-deployment-gnulinux -lorocos-viewer-gnulinux -lorocos-cartesian-gnulinux -lorocos-naxes-gnulinux -lorocos-axes-gnulinux -lorocos-io-gnulinux -lorocos-reporting-gnulinux -lorocos-helloworld-gnulinux -lorocos-timer-gnulinux -lorocos-taskbrowser-gnulinux -lorocos-ocl-common-gnulinux
Disabling packaging for version 2.6
-- Configuring done
-- Generating done
-- Build files have been written to: /home/yamokosk/src/orocos-ocl-1.8.1
Use: make\ docapi\ dochtml\ docpdf to build the documentation.
[ 0%] Built target message
[ 4%] Built target orocos-ocl-common-gnulinux
[ 6%] Built target orocos-taskbrowser-gnulinux
[ 8%] Built target orocos-timer-gnulinux
Linking CXX executable helloworld
CMakeFiles/helloworld.dir/HelloWorld.o: In function `RTT::OS::Mutex::trylock()':
HelloWorld.cpp:(.text._ZN3RTT2OS5Mutex7trylockEv[RTT::OS::Mutex::trylock()]+0x20): undefined reference to `rt_mutex_lock'
CMakeFiles/helloworld.dir/HelloWorld.o: In function `RTT::OS::Mutex::lock()':
HelloWorld.cpp:(.text._ZN3RTT2OS5Mutex4lockEv[RTT::OS::Mutex::lock()]+0x20): undefined reference to `rt_mutex_lock'
CMakeFiles/helloworld.dir/HelloWorld.o: In function `RTT::OS::Mutex::unlock()':
HelloWorld.cpp:(.text._ZN3RTT2OS5Mutex6unlockEv[RTT::OS::Mutex::unlock()]+0x9): undefined reference to `rt_mutex_unlock'
CMakeFiles/helloworld.dir/HelloWorld.o: In function `RTT::OS::Mutex::~Mutex()':
HelloWorld.cpp:(.text._ZN3RTT2OS5MutexD0Ev[RTT::OS::Mutex::~Mutex()]+0x2c): undefined reference to `rt_mutex_lock'
HelloWorld.cpp:(.text._ZN3RTT2OS5MutexD0Ev[RTT::OS::Mutex::~Mutex()]+0x34): undefined reference to `rt_mutex_unlock'
HelloWorld.cpp:(.text._ZN3RTT2OS5MutexD0Ev[RTT::OS::Mutex::~Mutex()]+0x3c): undefined reference to `rt_mutex_delete'
CMakeFiles/helloworld.dir/HelloWorld.o: In function `RTT::OS::Mutex::~Mutex()':
HelloWorld.cpp:(.text._ZN3RTT2OS5MutexD1Ev[RTT::OS::Mutex::~Mutex()]+0x2c): undefined reference to `rt_mutex_lock'
HelloWorld.cpp:(.text._ZN3RTT2OS5MutexD1Ev[RTT::OS::Mutex::~Mutex()]+0x34): undefined reference to `rt_mutex_unlock'
HelloWorld.cpp:(.text._ZN3RTT2OS5MutexD1Ev[RTT::OS::Mutex::~Mutex()]+0x3c): undefined reference to `rt_mutex_delete'
CMakeFiles/helloworld.dir/HelloWorld.o: In function `RTT::DataObjectLocked<std::basic_string HelloWorld.cpp:(.text._ZN3RTT16DataObjectLockedISsEC1ERKSsS3_[RTT::DataObjectLocked<std::basic_string CMakeFiles/helloworld.dir/HelloWorld.o: In function `RTT::DataObjectLocked<std::basic_string HelloWorld.cpp:(.text._ZN3RTT16DataObjectLockedISsED0Ev[RTT::DataObjectLocked<std::basic_string HelloWorld.cpp:(.text._ZN3RTT16DataObjectLockedISsED0Ev[RTT::DataObjectLocked<std::basic_string HelloWorld.cpp:(.text._ZN3RTT16DataObjectLockedISsED0Ev[RTT::DataObjectLocked<std::basic_string CMakeFiles/helloworld.dir/HelloWorld.o: In function `RTT::BufferLocked<std::basic_string HelloWorld.cpp:(.text._ZN3RTT12BufferLockedISsED0Ev[RTT::BufferLocked<std::basic_string HelloWorld.cpp:(.text._ZN3RTT12BufferLockedISsED0Ev[RTT::BufferLocked<std::basic_string HelloWorld.cpp:(.text._ZN3RTT12BufferLockedISsED0Ev[RTT::BufferLocked<std::basic_string CMakeFiles/helloworld.dir/HelloWorld.o: In function `RTT::BufferLocked<std::basic_string HelloWorld.cpp:(.text._ZN3RTT12BufferLockedISsED1Ev[RTT::BufferLocked<std::basic_string HelloWorld.cpp:(.text._ZN3RTT12BufferLockedISsED1Ev[RTT::BufferLocked<std::basic_string HelloWorld.cpp:(.text._ZN3RTT12BufferLockedISsED1Ev[RTT::BufferLocked<std::basic_string CMakeFiles/helloworld.dir/HelloWorld.o: In function `RTT::DataObjectLocked<std::basic_string HelloWorld.cpp:(.text._ZN3RTT16DataObjectLockedISsED1Ev[RTT::DataObjectLocked<std::basic_string HelloWorld.cpp:(.text._ZN3RTT16DataObjectLockedISsED1Ev[RTT::DataObjectLocked<std::basic_string HelloWorld.cpp:(.text._ZN3RTT16DataObjectLockedISsED1Ev[RTT::DataObjectLocked<std::basic_string CMakeFiles/helloworld.dir/HelloWorld.o: In function `RTT::DataObjectLocked<std::basic_string HelloWorld.cpp:(.text._ZNK3RTT16DataObjectLockedISsE5cloneEv[RTT::DataObjectLocked<std::basic_string CMakeFiles/helloworld.dir/HelloWorld.o: In function `RTT::ConnectionFactory<std::basic_string HelloWorld.cpp:(.text._ZN3RTT17ConnectionFactoryISsE12createBufferEiRKSsNS_15ConnectionTypes14ConnectionTypeE[RTT::ConnectionFactory<std::basic_string collect2: ld returned 1 exit status
make[2]: *** [helloworld/helloworld] Error 1
make[1]: *** [helloworld/CMakeFiles/helloworld.dir/all] Error 2
make: *** [all] Error 2