OCL packages and comedi

Hi,

I'm rebuilding the orocos suite, making some bpo and I have found two little
problems. The first one is in rtt. I know that Peter has his own packages in
fmtc, but he doesn't follow the names of packages (and some policy), at least
in rtai.

The cmake fails finding rtai and the workaround is pretty simple. Could you
add some lines to the check_depend.cmake file?

diff check_depend.cmake check_depend.cmake.leo
90,91c90,101
< MESSAGE(FATAL_ERROR "-- Looking for LXRT - not found (tried:
${RTAI_INSTALL_DIR}/include/rtai_lxrt.h)")
< SET(OROPKG_SUPPORT_RTAI FALSE CACHE INTERNAL "" FORCE)
---
> IF(EXISTS ${RTAI_INSTALL_DIR}/include/rtai/rtai_lxrt.h)
> MESSAGE("-- Looking for LXRT - found in ${RTAI_INSTALL_DIR}")
> SET(OROPKG_SUPPORT_RTAI TRUE CACHE INTERNAL "" FORCE)
> INCLUDE_DIRECTORIES(${RTAI_INSTALL_DIR}/include/rtai
${LINUX_SOURCE_DIR}/include)
>
SET(RTT_CFLAGS "${RTT_CFLAGS} -I${RTAI_INSTALL_DIR}/include/rtai -I${LINUX_SOURCE_DIR}/include"
CACHE INTERNAL "")
>
SET(RTT_LINKFLAGS "${RTT_LINKFLAGS} -L${RTAI_INSTALL_DIR}/lib -llxrt -lpthread"
CACHE INTERNAL "")
> LINK_LIBRARIES(lxrt pthread dl)
> LINK_DIRECTORIES(${RTAI_INSTALL_DIR}/lib)
> ELSE(EXISTS ${RTAI_INSTALL_DIR}/include/rtai/rtai_lxrt.h)
> MESSAGE(FATAL_ERROR "-- Looking for LXRT - not found (tried:
${RTAI_INSTALL_DIR}/include/rtai/rtai_lxrt.h)")
> SET(OROPKG_SUPPORT_RTAI FALSE CACHE INTERNAL "" FORCE)
> ENDIF(EXISTS ${RTAI_INSTALL_DIR}/include/rtai/rtai_lxrt.h)

Also, the ocl package have give me some trouble with comedilib 0.8.1. it seems
that some lines from Klaas have been disappear in comedi.h file. So, what do
you think to add:

#define GPCT_X1 0x01 // X1 encoding
#define GPCT_X2 0x02 // X2 encoding
#define GPCT_X4 0x04 // X3 encoding
// When to take into account the indexpulse:
#define GPCT_IndexPhaseHighHigh 0
#define GPCT_IndexPhaseLowHigh 1
#define GPCT_IndexPhaseLowLow 2
#define GPCT_IndexPhaseHighLow 3
// Reset when index pulse arrives?
#define GPCT_RESET_COUNTER_ON_INDEX 1

to
hardware/comedi/dev/ComediEncoder.hpp

at least it compiles and links.

Regars,

Leo

OCL packages and comedi

On Wed, Jun 18, 2008 at 7:04 PM, Leopold Palomo-Avellaneda
<leo [..] ...> wrote:
> I'm rebuilding the orocos suite, making some bpo and I have found two little
> problems. The first one is in rtt. I know that Peter has his own packages in
> fmtc, but he doesn't follow the names of packages (and some policy), at least
> in rtai.

Can you be more specific about this?

> The cmake fails finding rtai and the workaround is pretty simple. Could you
> add some lines to the check_depend.cmake file?
>
> diff check_depend.cmake check_depend.cmake.leo
> 90,91c90,101
> < MESSAGE(FATAL_ERROR "-- Looking for LXRT - not found (tried:
> ${RTAI_INSTALL_DIR}/include/rtai_lxrt.h)")
> < SET(OROPKG_SUPPORT_RTAI FALSE CACHE INTERNAL "" FORCE)
> ---
>> IF(EXISTS ${RTAI_INSTALL_DIR}/include/rtai/rtai_lxrt.h)
>> MESSAGE("-- Looking for LXRT - found in ${RTAI_INSTALL_DIR}")
>> SET(OROPKG_SUPPORT_RTAI TRUE CACHE INTERNAL "" FORCE)
>> INCLUDE_DIRECTORIES(${RTAI_INSTALL_DIR}/include/rtai
> ${LINUX_SOURCE_DIR}/include)
>>
> SET(RTT_CFLAGS "${RTT_CFLAGS} -I${RTAI_INSTALL_DIR}/include/rtai -I${LINUX_SOURCE_DIR}/include"
> CACHE INTERNAL "")
>>
> SET(RTT_LINKFLAGS "${RTT_LINKFLAGS} -L${RTAI_INSTALL_DIR}/lib -llxrt -lpthread"
> CACHE INTERNAL "")
>> LINK_LIBRARIES(lxrt pthread dl)
>> LINK_DIRECTORIES(${RTAI_INSTALL_DIR}/lib)
>> ELSE(EXISTS ${RTAI_INSTALL_DIR}/include/rtai/rtai_lxrt.h)
>> MESSAGE(FATAL_ERROR "-- Looking for LXRT - not found (tried:
> ${RTAI_INSTALL_DIR}/include/rtai/rtai_lxrt.h)")
>> SET(OROPKG_SUPPORT_RTAI FALSE CACHE INTERNAL "" FORCE)
>> ENDIF(EXISTS ${RTAI_INSTALL_DIR}/include/rtai/rtai_lxrt.h)

Is this issue package-related or is it a bug in the cmake logic.

> Also, the ocl package have give me some trouble with comedilib 0.8.1. it seems
> that some lines from Klaas have been disappear in comedi.h file. So, what do
> you think to add:
>
>
> #define GPCT_X1 0x01 // X1 encoding
> #define GPCT_X2 0x02 // X2 encoding
> #define GPCT_X4 0x04 // X3 encoding
> // When to take into account the indexpulse:
> #define GPCT_IndexPhaseHighHigh 0
> #define GPCT_IndexPhaseLowHigh 1
> #define GPCT_IndexPhaseLowLow 2
> #define GPCT_IndexPhaseHighLow 3
> // Reset when index pulse arrives?
> #define GPCT_RESET_COUNTER_ON_INDEX 1
>
> to
> hardware/comedi/dev/ComediEncoder.hpp
>
> at least it compiles and links.

This is not a good solution, since that will only make stuff compile
and not work with recent comedi releases. See
for an
initial patch. However, I recently tried that patch agains current
comedi CVS, and it seemed to be (1) out of date already and (2)
relying on some functions which are defined in some (IIRC)
comedi_common header from comedilib, which was not included with my
debian comedi package. I didn't have time to dig further then
however :-(

Klaas

OCL packages and comedi

A Dijous 19 Juny 2008, Klaas Gadeyne va escriure:
> On Wed, Jun 18, 2008 at 7:04 PM, Leopold Palomo-Avellaneda
>
> <leo [..] ...> wrote:
> > I'm rebuilding the orocos suite, making some bpo and I have found two
> > little problems. The first one is in rtt. I know that Peter has his own
> > packages in fmtc, but he doesn't follow the names of packages (and some
> > policy), at least in rtai.
>
> Can you be more specific about this?

well, Peter (please confirm) create his own version of rtai because the
original one was unmaintained. Also, we didn't have an official version of
xenomai.

In the last months this situation have changed and specially thanks to Roland
Stigge who have pushed to have a good quality packages. Peter put install
rtai in /usr/realtime/includes what doesn't follow debian policy . For that
my little patch. Also, it creates a librtai-dev and librtai1. I think that
Peter puts another names. Also in the xenomai packages.

I cannot complain about the Peter work. Firstly because I contributed and
secondly because It was the best in that time and with that situation. But
the situation now is different.

Have I be specific?

>
> > The cmake fails finding rtai and the workaround is pretty simple. Could
> > you add some lines to the check_depend.cmake file?
> >
> > diff check_depend.cmake check_depend.cmake.leo
> > 90,91c90,101
> > < MESSAGE(FATAL_ERROR "-- Looking for LXRT - not found (tried:
> > ${RTAI_INSTALL_DIR}/include/rtai_lxrt.h)")
> > < SET(OROPKG_SUPPORT_RTAI FALSE CACHE INTERNAL "" FORCE)
> > ---
> >
> >> IF(EXISTS ${RTAI_INSTALL_DIR}/include/rtai/rtai_lxrt.h)
> >> MESSAGE("-- Looking for LXRT - found in ${RTAI_INSTALL_DIR}")
> >> SET(OROPKG_SUPPORT_RTAI TRUE CACHE INTERNAL "" FORCE)
> >> INCLUDE_DIRECTORIES(${RTAI_INSTALL_DIR}/include/rtai
> >
> > ${LINUX_SOURCE_DIR}/include)
> >
> > SET(RTT_CFLAGS "${RTT_CFLAGS} -I${RTAI_INSTALL_DIR}/include/rtai
> > -I${LINUX_SOURCE_DIR}/include" CACHE INTERNAL "")
> >
> > SET(RTT_LINKFLAGS "${RTT_LINKFLAGS} -L${RTAI_INSTALL_DIR}/lib -llxrt
> > -lpthread" CACHE INTERNAL "")
> >
> >> LINK_LIBRARIES(lxrt pthread dl)
> >> LINK_DIRECTORIES(${RTAI_INSTALL_DIR}/lib)
> >> ELSE(EXISTS ${RTAI_INSTALL_DIR}/include/rtai/rtai_lxrt.h)
> >> MESSAGE(FATAL_ERROR "-- Looking for LXRT - not found (tried:
> >
> > ${RTAI_INSTALL_DIR}/include/rtai/rtai_lxrt.h)")
> >
> >> SET(OROPKG_SUPPORT_RTAI FALSE CACHE INTERNAL "" FORCE)
> >> ENDIF(EXISTS ${RTAI_INSTALL_DIR}/include/rtai/rtai_lxrt.h)
>
> Is this issue package-related or is it a bug in the cmake logic.

no, the cmake _only_ search in one place and there's another place because the
package install it in another place.

> > Also, the ocl package have give me some trouble with comedilib 0.8.1. it
> > seems that some lines from Klaas have been disappear in comedi.h file.
> > So, what do you think to add:
> >
> >
> > #define GPCT_X1 0x01 // X1 encoding
> > #define GPCT_X2 0x02 // X2 encoding
> > #define GPCT_X4 0x04 // X3 encoding
> > // When to take into account the indexpulse:
> > #define GPCT_IndexPhaseHighHigh 0
> > #define GPCT_IndexPhaseLowHigh 1
> > #define GPCT_IndexPhaseLowLow 2
> > #define GPCT_IndexPhaseHighLow 3
> > // Reset when index pulse arrives?
> > #define GPCT_RESET_COUNTER_ON_INDEX 1
> >
> > to
> > hardware/comedi/dev/ComediEncoder.hpp
> >
> > at least it compiles and links.
>
> This is not a good solution, since that will only make stuff compile
> and not work with recent comedi releases.

Sure, it was I asked.
> See
> for an
> initial patch. However, I recently tried that patch agains current
> comedi CVS, and it seemed to be (1) out of date already and (2)
> relying on some functions which are defined in some (IIRC)
> comedi_common header from comedilib, which was not included with my
> debian comedi package. I didn't have time to dig further then
> however :-(

I general I look the bugs but I didn't remember this one :-( sorry for the
noise. The comedi debian packages are still out of sync? :-(
I will look on it the next week.

See you,

Regards,

Leo

OCL packages and comedi

On Fri, 20 Jun 2008, Leopold Palomo Avellaneda wrote:
> A Dijous 19 Juny 2008, Klaas Gadeyne va escriure:
>> On Wed, Jun 18, 2008 at 7:04 PM, Leopold Palomo-Avellaneda
>>
>> <leo [..] ...> wrote:
>>> I'm rebuilding the orocos suite, making some bpo and I have found two
>>> little problems. The first one is in rtt. I know that Peter has his own
>>> packages in fmtc, but he doesn't follow the names of packages (and some
>>> policy), at least in rtai.
>>
>> Can you be more specific about this?
>
> well, Peter (please confirm) create his own version of rtai because the
> original one was unmaintained. Also, we didn't have an official version of
> xenomai.
>
> In the last months this situation have changed and specially thanks to Roland
> Stigge who have pushed to have a good quality packages. Peter put install
> rtai in /usr/realtime/includes what doesn't follow debian policy . For that
> my little patch. Also, it creates a librtai-dev and librtai1. I think that
> Peter puts another names. Also in the xenomai packages.
>
> I cannot complain about the Peter work. Firstly because I contributed and
> secondly because It was the best in that time and with that situation. But
> the situation now is different.
>
> Have I be specific?

It's at least more clear to me. I'll let Peter do the follow up on this one. I'm in favour of using the distro packages too, although 1) someone has to spend the time to test stuff using those and 2) I'm not sure they work out of the box for debian stable, which is what we are using right now.

[snip patch]

>> Is this issue package-related or is it a bug in the cmake logic?
>
> no, the cmake _only_ search in one place and there's another place because the
> package install it in another place.

Yeah, the cmake logic causes me headaches all of the time too :-((. I have the impression that we fail to find quite some packages if they are not installed in the standard locations. I haven't been working with lxrt recently and I didn't look at your patch, but you might also have a look here . This said, I'm an virtually an absolute NOOB when it comes to cmake, so don't trust my judgement!

regards,

Klaas

OCL packages and comedi

A Divendres 20 Juny 2008, Klaas Gadeyne va escriure:
> On Fri, 20 Jun 2008, Leopold Palomo Avellaneda wrote:
> > A Dijous 19 Juny 2008, Klaas Gadeyne va escriure:
> >> On Wed, Jun 18, 2008 at 7:04 PM, Leopold Palomo-Avellaneda
> >>
> >> <leo [..] ...> wrote:
> >>> I'm rebuilding the orocos suite, making some bpo and I have found two
> >>> little problems. The first one is in rtt. I know that Peter has his own
> >>> packages in fmtc, but he doesn't follow the names of packages (and some
> >>> policy), at least in rtai.
> >>
> >> Can you be more specific about this?
> >
> > well, Peter (please confirm) create his own version of rtai because the
> > original one was unmaintained. Also, we didn't have an official version
> > of xenomai.
> >
> > In the last months this situation have changed and specially thanks to
> > Roland Stigge who have pushed to have a good quality packages. Peter put
> > install rtai in /usr/realtime/includes what doesn't follow debian policy
> > . For that my little patch. Also, it creates a librtai-dev and librtai1.
> > I think that Peter puts another names. Also in the xenomai packages.
> >
> > I cannot complain about the Peter work. Firstly because I contributed and
> > secondly because It was the best in that time and with that situation.
> > But the situation now is different.
> >
> > Have I be specific?
>
> It's at least more clear to me. I'll let Peter do the follow up on this
> one. I'm in favour of using the distro packages too, although 1) someone
> has to spend the time to test stuff using those and 2) I'm not sure they
> work out of the box for debian stable, which is what we are using right
> now.
>
> [snip patch]
>
> >> Is this issue package-related or is it a bug in the cmake logic?
> >
> > no, the cmake _only_ search in one place and there's another place
> > because the package install it in another place.
>
> Yeah, the cmake logic causes me headaches all of the time too :-((. I have
> the impression that we fail to find quite some packages if they are not
> installed in the standard locations. I haven't been working with lxrt
> recently and I didn't look at your patch, but you might also have a look
> here
> .
> This said, I'm an virtually an absolute NOOB when it comes to cmake, so
> don't trust my judgement!

Ok, the problem is mix c and c++. My patch works with the debian packages.
Your bug, now I have looked it

Regards,

Leo