[Bug 727] New: incorrect rtt-xenomai pkg-config file

https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=727

Summary: incorrect rtt-xenomai pkg-config file
Product: RTT
Version: 1.10.1
Platform: All
OS/Version: Xenomai 2.x
Status: NEW
Severity: normal
Priority: P3
Component: Build System
AssignedTo: orocos-dev [..] ...
ReportedBy: steven [dot] kauffmann [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0

Hi,

If I build Orocos for Xenomai, the generated pkg-config file is still not
correct and introduces errors when building OCL.

My generated pkg-config file looks like this:

Libs: -L${libdir} -lorocos-rtt-xenomai -L/usr/local/xenomai -l # 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
Cflags: -I${includedir} -DOROCOS_TARGET=xenomai -I/usr/local/xenomai/include

The -L flag points to the wrong directory should be -L/usr/local/xenomai/lib
(in my case) and -lnative is missing.

ldd shows that liborocos-rtt-xenomai.so is not linked with the xenomai native
library. I don't know if this is a problem but in older releases of RTT, the
rtt library is linked with libnative.

ldd liborocos-rtt-xenomai.so
linux-gate.so.1 => (0xffffe000)
libxerces-c.so.27 => /usr/lib/libxerces-depdom.so.27 (0xb6f2b000)
libpthread.so.0 => /lib/i686/cmov/libpthread.so.0 (0xb6f11000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb6e1f000)
libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb6df9000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb6dce000)
libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb6c6f000)
libicuuc.so.38 => /usr/lib/libicuuc.so.38 (0xb6b49000)
libicudata.so.38 => /usr/lib/libicudata.so.38 (0xb6071000)
/lib/ld-linux.so.2 (0xb7eee000)

After generating the makefiles in cmake, I get the following warnings:
WARNING: Target "orocos-rtt-dynamic_xenomai" requests linking to directory
"/usr/local/xenomai/lib". Targets may link only to libraries. CMake is
dropping the item.

When enabling the tests, I get more warnings:

WARNING: Target "core-test" requests linking to directory
"/usr/local/xenomai/lib". Targets may link only to libraries. CMake is
dropping the item.

WARNING: Target "dev-test" requests linking to directory
"/usr/local/xenomai/lib". Targets may link only to libraries. CMake is
dropping the item.

WARNING: Target "event-test" requests linking to directory
"/usr/local/xenomai/lib". Targets may link only to libraries. CMake is
dropping the item.

WARNING: Target "list-test" requests linking to directory
"/usr/local/xenomai/lib". Targets may link only to libraries. CMake is
dropping the item.

WARNING: Target "main-test" requests linking to directory
"/usr/local/xenomai/lib". Targets may link only to libraries. CMake is
dropping the item.

WARNING: Target "parser-test" requests linking to directory
"/usr/local/xenomai/lib". Targets may link only to libraries. CMake is
dropping the item.

WARNING: Target "program-test" requests linking to directory
"/usr/local/xenomai/lib". Targets may link only to libraries. CMake is
dropping the item.

WARNING: Target "state-test" requests linking to directory
"/usr/local/xenomai/lib". Targets may link only to libraries. CMake is
dropping the item.

WARNING: Target "task-test" requests linking to directory
"/usr/local/xenomai/lib". Targets may link only to libraries. CMake is
dropping the item.

WARNING: Target "taskcontext-test" requests linking to directory
"/usr/local/xenomai/lib". Targets may link only to libraries. CMake is
dropping the item.

Result is that I can't build the tests because of undefined references to
xenomai native functions.

Modifying the pkg-config file solves the build problem of OCL, but not the
problem of building the tests.

[Bug 727] incorrect rtt-xenomai pkg-config file

https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=727

Peter Soetens <peter [..] ...> changed:

What |Removed |Added
----------------------------------------------------------------------------
Resolution| |INVALID
Status|NEW |RESOLVED

--- Comment #6 from Peter Soetens <peter [..] ...> 2009-11-05 21:49:19 ---
Please mark the bug as resolved if you concluded the fix/solution.

Thanks,
Peter

[Bug 727] incorrect rtt-xenomai pkg-config file

https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=727

--- Comment #5 from Steven Kauffmann <steven [dot] kauffmann [..] ...> 2009-11-05 16:49:48 ---
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #1)
> > > (In reply to comment #0)
> > > > Hi,
> > > >
> > > > If I build Orocos for Xenomai, the generated pkg-config file is still not
> > > > correct and introduces errors when building OCL.
> > >
> > > Just to be sure: You did this from a fresh build directory, and from the
> > 1.10.1
> > > tar.gz ?
> >
> > Yes clean build directory + using the rtt-1.10 branch.
> >
> > > Can you attach your CMakeCache.txt file ?
> >
> > CmakeCache.txt is attached.
>
> What was your cmake command line ? Did you override/change the XENOMAI_LIBRARY
> variable yourself ?

Yes I did.

> Could you re-read the orocos-installation-manual to be sure that you used cmake
> correctly ? (cfr CMAKE_LIBARARY_PATH and CMAKE_INCLUDE_PATH)

If I set the CMAKE_LIBARARY_PATH and CMAKE_INCLUDE_PATH variables it works.

Steven

[Bug 727] incorrect rtt-xenomai pkg-config file

https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=727

--- Comment #4 from Peter Soetens <peter [..] ...> 2009-11-05 16:14:01 ---
(In reply to comment #3)
> (In reply to comment #1)
> > (In reply to comment #0)
> > > Hi,
> > >
> > > If I build Orocos for Xenomai, the generated pkg-config file is still not
> > > correct and introduces errors when building OCL.
> >
> > Just to be sure: You did this from a fresh build directory, and from the
> 1.10.1
> > tar.gz ?
>
> Yes clean build directory + using the rtt-1.10 branch.
>
> > Can you attach your CMakeCache.txt file ?
>
> CmakeCache.txt is attached.

What was your cmake command line ? Did you override/change the XENOMAI_LIBRARY
variable yourself ?

Could you re-read the orocos-installation-manual to be sure that you used cmake
correctly ? (cfr CMAKE_LIBARARY_PATH and CMAKE_INCLUDE_PATH)

Peter

[Bug 727] incorrect rtt-xenomai pkg-config file

https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=727

--- Comment #2 from Steven Kauffmann <steven [dot] kauffmann [..] ...> 2009-11-05 15:32:52 ---
Created an attachment (id=543)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=543)
CMakeCache.txt

[Bug 727] incorrect rtt-xenomai pkg-config file

https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=727

--- Comment #3 from Steven Kauffmann <steven [dot] kauffmann [..] ...> 2009-11-05 15:34:33 ---
(In reply to comment #1)
> (In reply to comment #0)
> > Hi,
> >
> > If I build Orocos for Xenomai, the generated pkg-config file is still not
> > correct and introduces errors when building OCL.
>
> Just to be sure: You did this from a fresh build directory, and from the 1.10.1
> tar.gz ?

Yes clean build directory + using the rtt-1.10 branch.

> Can you attach your CMakeCache.txt file ?

CmakeCache.txt is attached.

Steven

[Bug 727] incorrect rtt-xenomai pkg-config file

https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=727

--- Comment #1 from Peter Soetens <peter [..] ...> 2009-11-05 14:41:59 ---
(In reply to comment #0)
> Hi,
>
> If I build Orocos for Xenomai, the generated pkg-config file is still not
> correct and introduces errors when building OCL.

Just to be sure: You did this from a fresh build directory, and from the 1.10.1
tar.gz ?

Can you attach your CMakeCache.txt file ?

Peter