[Bug 587] New: package system does not work nicely

For more infomation about this bug, visit
Summary: package system does not work nicely
Product: RTT
Version: rtt-trunk
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Debian Packaging
AssignedTo: orocos-dev [..] ...
ReportedBy: ruben [dot] smits [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0

I have some remarks:

* For some reason the packaging system build orocos-rtt with the
CMAKE_BUILD_TYPE RTT:
During the package building process:
...
Build type set to 'None' by user.
...

* For some reason the packaging system does not use the --with-linux flag when
building for lxrt while it should. Since it results in compile errors:
[ 28%] Building CXX object
src/CMakeFiles/orocos-rtt-dynamic_lxrt.dir/os/lxrt/fosi_internal.o
In file included from /usr/realtime/include/rtai_lxrt.h:570,
from
/home/rsmits/orocos-deb/build-area/orocos-rtt-1.4.0-1ubuntu1-svn/src/os/lxrt/fosi.h:62,
from
/home/rsmits/orocos-deb/build-area/orocos-rtt-1.4.0-1ubuntu1-svn/src/os/fosi.h:46,
from
/home/rsmits/orocos-deb/build-area/orocos-rtt-1.4.0-1ubuntu1-svn/src/os/ThreadInterface.hpp:43,
from
/home/rsmits/orocos-deb/build-area/orocos-rtt-1.4.0-1ubuntu1-svn/src/os/lxrt/fosi_internal.cpp:45:
/usr/realtime/include/asm/rtai_lxrt.h:26:29: error: asm/asm-offsets.h: No
such file or directory

This file exists but is not found due to the missing -I

Ruben

[Bug 587] package system does not work nicely

For more infomation about this bug, visit

--- Comment #4 from Peter Soetens
<peter [dot] soetens [..] ...> 2008-09-04 08:55:49 ---
(In reply to comment #3)
> Created an attachment (id=348)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=348) [details]
> patch for rtt/debian/rules
>
> This patch solved the problem for me, I don't know if it is clean enough
> though.

(It isn't.) A I remember now again, the --with-linux flag is not needed because
we should detect your arch in src/rtt-config.h.in and use that in
rtt/src/os/oro_atomic.h which then selects the correct 'asm' files from the
rtt/src/os dir itself. The 'global' linux asm files are only used if
OROBLD_OS_AGNOSTIC is not set in the cmake configuration. I would fix that
first.

You patch requires that the linux headers are installed when the application is
built and are in the global include path. I doubt this is the case in Debian.

Ruben Smits's picture

[Bug 587] package system does not work nicely

On Thursday 04 September 2008 08:55:49 Peter Soetens wrote:
> For more infomation about this bug, visit
>
>
>
>
> --- Comment #4 from Peter Soetens
<peter [dot] soetens [..] ...> 2008-09-04
> 08:55:49 --- (In reply to comment #3)
>
> > Created an attachment (id=348)
>
> --> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=348) [details]
>
> > patch for rtt/debian/rules
> >
> > This patch solved the problem for me, I don't know if it is clean enough
> > though.
>
> (It isn't.) A I remember now again, the --with-linux flag is not needed
> because we should detect your arch in src/rtt-config.h.in and use that in
> rtt/src/os/oro_atomic.h which then selects the correct 'asm' files from the
> rtt/src/os dir itself. The 'global' linux asm files are only used if
> OROBLD_OS_AGNOSTIC is not set in the cmake configuration. I would fix that
> first.

Then why am i having this problem? Since this flag is default on.

Does this mean i should find a asm/asm-offsets.h file somewhere in rtt/src/os?
(Which i do not for the moment!)

The compile error was:

/home/rsmits/orocos-deb/build-area/orocos-rtt-1.4.0-1ubuntu1-
svn/src/os/lxrt/fosi_internal.cpp:45:
/usr/realtime/include/asm/rtai_lxrt.h:26:29: error: asm/asm-offsets.h: No
such file or directory

It is an include from a rtai-header not a rtt one.

Ruben

[Bug 587] package system does not work nicely

On Thursday 04 September 2008 09:27:33 Ruben Smits wrote:
> On Thursday 04 September 2008 08:55:49 Peter Soetens wrote:
> > For more infomation about this bug, visit
> >
> >
> >
> >
> > --- Comment #4 from Peter Soetens
<peter [dot] soetens [..] ...> 2008-09-04
> > 08:55:49 --- (In reply to comment #3)
> >
> > > Created an attachment (id=348)
> >
> > --> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=348)
> > [details]
> >
> > > patch for rtt/debian/rules
> > >
> > > This patch solved the problem for me, I don't know if it is clean
> > > enough though.
> >
> > (It isn't.) A I remember now again, the --with-linux flag is not needed
> > because we should detect your arch in src/rtt-config.h.in and use that in
> > rtt/src/os/oro_atomic.h which then selects the correct 'asm' files from
> > the rtt/src/os dir itself. The 'global' linux asm files are only used if
> > OROBLD_OS_AGNOSTIC is not set in the cmake configuration. I would fix
> > that first.
>
> Then why am i having this problem? Since this flag is default on.
>
> Does this mean i should find a asm/asm-offsets.h file somewhere in
> rtt/src/os? (Which i do not for the moment!)
>
> The compile error was:
>
> /home/rsmits/orocos-deb/build-area/orocos-rtt-1.4.0-1ubuntu1-
> svn/src/os/lxrt/fosi_internal.cpp:45:
> /usr/realtime/include/asm/rtai_lxrt.h:26:29: error: asm/asm-offsets.h: No
> such file or directory
>
> It is an include from a rtai-header not a rtt one.

My mistake. In that case, setting the flag is the only thing we can do. Also,
since it happened in fosi_internal.cpp, this means this header is not needed
for user code. So it looks fine to me after all.

Peter

Ruben Smits's picture

[Bug 587] package system does not work nicely

On Thursday 04 September 2008 09:35:14 Peter Soetens wrote:
> On Thursday 04 September 2008 09:27:33 Ruben Smits wrote:
> > On Thursday 04 September 2008 08:55:49 Peter Soetens wrote:
> > > For more infomation about this bug, visit
> > >
> > >
> > >
> > >
> > > --- Comment #4 from Peter Soetens
<peter [dot] soetens [..] ...> 2008-09-04
> > > 08:55:49 --- (In reply to comment #3)
> > >
> > > > Created an attachment (id=348)
> > >
> > > --> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=348)
> > > [details]
> > >
> > > > patch for rtt/debian/rules
> > > >
> > > > This patch solved the problem for me, I don't know if it is clean
> > > > enough though.
> > >
> > > (It isn't.) A I remember now again, the --with-linux flag is not needed
> > > because we should detect your arch in src/rtt-config.h.in and use that
> > > in rtt/src/os/oro_atomic.h which then selects the correct 'asm' files
> > > from the rtt/src/os dir itself. The 'global' linux asm files are only
> > > used if OROBLD_OS_AGNOSTIC is not set in the cmake configuration. I
> > > would fix that first.
> >
> > Then why am i having this problem? Since this flag is default on.
> >
> > Does this mean i should find a asm/asm-offsets.h file somewhere in
> > rtt/src/os? (Which i do not for the moment!)
> >
> > The compile error was:
> >
> > /home/rsmits/orocos-deb/build-area/orocos-rtt-1.4.0-1ubuntu1-
> > svn/src/os/lxrt/fosi_internal.cpp:45:
> > /usr/realtime/include/asm/rtai_lxrt.h:26:29: error: asm/asm-offsets.h:
> > No such file or directory
> >
> > It is an include from a rtai-header not a rtt one.
>
> My mistake. In that case, setting the flag is the only thing we can do.
> Also, since it happened in fosi_internal.cpp, this means this header is not
> needed for user code. So it looks fine to me after all.

So how do i fix this? The patch for debian/rules is fine then?

Ruben

[Bug 587] package system does not work nicely

On Thursday 04 September 2008 09:47:55 Ruben Smits wrote:
>
> So how do i fix this? The patch for debian/rules is fine then?

Yep, go ahead and apply it. Close the bug as well. (for backports, use
svnmerge !)

Thanks,
Peter

Ruben Smits's picture

[Bug 587] package system does not work nicely

For more infomation about this bug, visit

--- Comment #3 from Ruben Smits <ruben [dot] smits [..] ...> 2008-09-02 16:30:20 ---
Created an attachment (id=348)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=348)
patch for rtt/debian/rules

This patch solved the problem for me, I don't know if it is clean enough
though.

Ruben

[Bug 587] package system does not work nicely

For more infomation about this bug, visit

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

What |Removed |Added
--------------------------------------------------------------------------
CC| |peter [dot] soetens [..] ...

--- Comment #2 from Peter Soetens
<peter [dot] soetens [..] ...> 2008-09-02 15:39:44 ---
(In reply to comment #0)
> I have some remarks:
>
> * For some reason the packaging system build orocos-rtt with the
> CMAKE_BUILD_TYPE RTT:
> During the package building process:
> ...
> Build type set to 'None' by user.
> ...
>
> * For some reason the packaging system does not use the --with-linux flag when
> building for lxrt while it should. Since it results in compile errors:
> [ 28%] Building CXX object

Please use make VERBOSE=1 to see which flags are used. --with-linux works on
Debian/i386 afaikt. Maybe it is different on your platform ?

Peter

Ruben Smits's picture

[Bug 587] package system does not work nicely

On Tuesday 02 September 2008 15:39:43 Peter Soetens wrote:
> For more infomation about this bug, visit
>
>
> Peter Soetens
<peter [dot] soetens [..] ...> changed:
>
> What |Removed |Added
> --------------------------------------------------------------------------
> CC| |peter [dot] soetens [..] ...
>
>
>
> --- Comment #2 from Peter Soetens
<peter [dot] soetens [..] ...> 2008-09-02
> 15:39:44 --- (In reply to comment #0)
>
> > I have some remarks:
> >
> > * For some reason the packaging system build orocos-rtt with the
> > CMAKE_BUILD_TYPE RTT:
> > During the package building process:
> > ...
> > Build type set to 'None' by user.
> > ...
> >
> > * For some reason the packaging system does not use the --with-linux flag
> > when building for lxrt while it should. Since it results in compile
> > errors: [ 28%] Building CXX object
>
> Please use make VERBOSE=1 to see which flags are used. --with-linux works
> on Debian/i386 afaikt. Maybe it is different on your platform ?

I did this and the following flags where used:

[ 28%] Building CXX object src/CMakeFiles/orocos-rtt-
dynamic_lxrt.dir/os/lxrt/fosi_internal.o
/usr/bin/c++ -DRTT_DLL_EXPORT -Wall -O2 -fPIC -I/usr/realtime/include -
I/include -I/home/rsmits/orocos-deb/build-area/orocos-rtt-1.4.1/src -
I/home/rsmits/orocos-deb/build-area/orocos-rtt-1.4.1/build.lxrt/src -
I/home/rsmits/orocos-deb/build-area/orocos-rtt-1.4.1/build.lxrt/src/os -
I/home/rsmits/orocos-deb/build-area/orocos-rtt-1.4.1/build.lxrt/src/os/lxrt
-Wall -I/usr/realtime/include -I/include -DOROCOS_TARGET=lxrt -o
src/CMakeFiles/orocos-rtt-dynamic_lxrt.dir/os/lxrt/fosi_internal.o -c
/home/rsmits/orocos-deb/build-area/orocos-
rtt-1.4.1/src/os/lxrt/fosi_internal.cpp

Normally the linux-dir should be in _here_: -I/usr/realtime/include _-
I/include_ -DOROCOS_TARGET=lxrt

I'm not saying that --with-linux does not work, I know it does. I'm just
pointing to the fact that the debian/rules do not use this flag:

debian/rules:
...
mkdir -p build.lxrt
cd build.lxrt; unset ACE_ROOT TAO_ROOT; CXXFLAGS="$(CFLAGS)" ../configure --
host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --enable-
corba --enable-static --with-lxrt=/usr/realtime
...

somehow the --with-linux flag should be added (i think you can get it from
rtai-config --linux-dir )

Ruben

Ruben

Ruben Smits's picture

[Bug 587] package system does not work nicely

For more infomation about this bug, visit

--- Comment #1 from Ruben Smits <ruben [dot] smits [..] ...> 2008-09-02 10:58:31 ---
(In reply to comment #0)
> I have some remarks:
>
> * For some reason the packaging system build orocos-rtt with the
> CMAKE_BUILD_TYPE RTT:

I meant "does NOT build"

> During the package building process:
> ...
> Build type set to 'None' by user.
> ...
>
> * For some reason the packaging system does not use the --with-linux flag when
> building for lxrt while it should. Since it results in compile errors:
> [ 28%] Building CXX object
> src/CMakeFiles/orocos-rtt-dynamic_lxrt.dir/os/lxrt/fosi_internal.o
> In file included from /usr/realtime/include/rtai_lxrt.h:570,
> from
> /home/rsmits/orocos-deb/build-area/orocos-rtt-1.4.0-1ubuntu1-svn/src/os/lxrt/fosi.h:62,
> from
> /home/rsmits/orocos-deb/build-area/orocos-rtt-1.4.0-1ubuntu1-svn/src/os/fosi.h:46,
> from
> /home/rsmits/orocos-deb/build-area/orocos-rtt-1.4.0-1ubuntu1-svn/src/os/ThreadInterface.hpp:43,
> from
> /home/rsmits/orocos-deb/build-area/orocos-rtt-1.4.0-1ubuntu1-svn/src/os/lxrt/fosi_internal.cpp:45:
> /usr/realtime/include/asm/rtai_lxrt.h:26:29: error: asm/asm-offsets.h: No
> such file or directory
>
> This file exists but is not found due to the missing -I
>
> Ruben
>