[Bug 709] New: OCL build failed for Xenomai target
Submitted by Steven Kauffmann on Mon, 2009-10-12 07:45 |
https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=709
Summary: OCL build failed for Xenomai target
Product: OCL
Version: trunk
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P3
Component: Build system
AssignedTo: orocos-dev [..] ...
ReportedBy: steven [dot] kauffmann [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0
Hi,
When I try to build OCL for xenomai, I get the following error:
/usr/bin/ld: cannot find -lnative
collect2: ld returned 1 exit status
make[2]: *** [timer/liborocos-timer-xenomai.so.1.8.99] Error 1
make[1]: *** [timer/CMakeFiles/orocos-timer-xenomai.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Cmake reported that orocos rtt was found but the library path does not include
the lib folder of the xenomai install directory
-- Looking for orocos-rtt-xenomai >= 1.0.0 -- found
Includes in: /tmp/orocos-trunk/include;/usr/local/xenomai/include
Libraries in: /tmp/orocos-trunk/lib
Libraries: orocos-rtt-xenomai;native
Defines: -DOROCOS_TARGET=xenomai
If I look at the pkgconfig files there are some differences between 1.6 and
1.10 - trunk (have not looked at 1.8).
The orocos-rtt-xenomai.pc file in 1.6:
Libs: -L${libdir} -lorocos-rtt-xenomai -L/usr/local/xenomai/lib -lnative
-lpthread -lrtdm
Libs.private: -lxerces-c -lxerces-c
Cflags: -I${includedir} -DOROCOS_TARGET=xenomai
-I/usr/local/xenomai/include/xenomai
in 1.10 and trunk
Libs: -L${libdir} -lorocos-rtt-xenomai -lnative # If some RTT headers include
inline calls to other libraries, we need to specify these here too.
Libs.private: -lxerces-c -lxerces-depdom -L/usr/local/xenomai -l -lpthread
-ldl
Cflags: -I${includedir} -DOROCOS_TARGET=xenomai -I/usr/local/xenomai/include
Putting -L/usr/local/xenomai/lib in the Libs line instead of Libs.private
solves the problem.
[Bug 709] New: OCL build failed for Xenomai target
On Oct 12, 2009, at 03:43 , Steven Kauffmann wrote:
> https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=709
>
> Summary: OCL build failed for Xenomai target
> Product: OCL
> Version: trunk
> Platform: All
> OS/Version: All
> Status: NEW
> Severity: normal
> Priority: P3
> Component: Build system
> AssignedTo: orocos-dev [..] ...
> ReportedBy: steven [dot] kauffmann [..] ...
> CC: orocos-dev [..] ...
> Estimated Hours: 0.0
>
>
> Hi,
>
> When I try to build OCL for xenomai, I get the following error:
>
> /usr/bin/ld: cannot find -lnative
> collect2: ld returned 1 exit status
> make[2]: *** [timer/liborocos-timer-xenomai.so.1.8.99] Error 1
> make[1]: *** [timer/CMakeFiles/orocos-timer-xenomai.dir/all] Error 2
> make[1]: *** Waiting for unfinished jobs....
>
> Cmake reported that orocos rtt was found but the library path does
> not include
> the lib folder of the xenomai install directory
>
> -- Looking for orocos-rtt-xenomai >= 1.0.0 -- found
>
> Includes in: /tmp/orocos-trunk/include;/usr/local/xenomai/include
>
> Libraries in: /tmp/orocos-trunk/lib
>
> Libraries: orocos-rtt-xenomai;native
>
> Defines: -DOROCOS_TARGET=xenomai
>
> If I look at the pkgconfig files there are some differences between
> 1.6 and
> 1.10 - trunk (have not looked at 1.8).
>
> The orocos-rtt-xenomai.pc file in 1.6:
>
> Libs: -L${libdir} -lorocos-rtt-xenomai -L/usr/local/xenomai/lib -
> lnative
> -lpthread -lrtdm
> Libs.private: -lxerces-c -lxerces-c
> Cflags: -I${includedir} -DOROCOS_TARGET=xenomai
> -I/usr/local/xenomai/include/xenomai
>
> in 1.10 and trunk
> Libs: -L${libdir} -lorocos-rtt-xenomai -lnative # If some RTT
> headers include
> inline calls to other libraries, we need to specify these here too.
> Libs.private: -lxerces-c -lxerces-depdom -L/usr/local/xenomai -l -
> lpthread
> -ldl
> Cflags: -I${includedir} -DOROCOS_TARGET=xenomai -I/usr/local/
> xenomai/include
>
> Putting -L/usr/local/xenomai/lib in the Libs line instead of
> Libs.private
> solves the problem.
I think this is the same cause as the macosx problem with the boost
thread library. Dependant libraries like OCL don't use the contents
(or at least the -L items) from Libs.private. So if the dependant
library doesn't pick up one of the paths that RTT actually needs, then
the link of the dependant library fails.
My 2c
S