Make install for ocl ROS makefile

diff --git a/Makefile b/Makefile
index 5fd7d6f..08b9210 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,9 @@
ifdef ROS_ROOT
+default: install
include $(shell rospack find mk)/cmake.mk
+EXTRA_CMAKE_FLAGS=-DCMAKE_INSTALL_PREFIX=`rospack find ocl`/install
+install: all
+ cd build; make install
else
$(warning This Makefile only works with ROS rosmake. Without rosmake,
create a build directory and run cmake ..)
endif

Make install for ocl ROS makefile

On Thursday 16 December 2010 12:00:22 Steven Bellens wrote:
> diff --git a/Makefile b/Makefile
> index 5fd7d6f..08b9210 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1,5 +1,9 @@
> ifdef ROS_ROOT
> +default: install
> include $(shell rospack find mk)/cmake.mk
> +EXTRA_CMAKE_FLAGS=-DCMAKE_INSTALL_PREFIX=`rospack find ocl`/install
> +install: all
> + cd build; make install
> else
> $(warning This Makefile only works with ROS rosmake. Without rosmake,
> create a build directory and run cmake ..)
> endif

I have applied this on toolchain-2.2 until we can build ocl the 'prefered' way
in ros systems.

Peter

Make install for ocl ROS makefile

2010/12/20 Peter Soetens <peter [..] ...>:
> On Thursday 16 December 2010 12:00:22 Steven Bellens wrote:
>> diff --git a/Makefile b/Makefile
>> index 5fd7d6f..08b9210 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -1,5 +1,9 @@
>>  ifdef ROS_ROOT
>> +default: install
>>  include $(shell rospack find mk)/cmake.mk
>> +EXTRA_CMAKE_FLAGS=-DCMAKE_INSTALL_PREFIX=`rospack find ocl`/install
>> +install: all
>> +       cd build; make install
>>  else
>>  $(warning This Makefile only works with ROS rosmake. Without rosmake,
>> create a build directory and run cmake ..)
>>  endif
>
> I have applied this on toolchain-2.2 until we can build ocl the 'prefered' way
> in ros systems.

There's a whitespace error in this patch as well, line 6 'cd build;
make install'
Still learning git :)

Steven

>
> Peter
>

Make install for ocl ROS makefile

On Thursday 16 December 2010 12:00:22 Steven Bellens wrote:
> diff --git a/Makefile b/Makefile
> index 5fd7d6f..08b9210 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1,5 +1,9 @@
> ifdef ROS_ROOT
> +default: install
> include $(shell rospack find mk)/cmake.mk
> +EXTRA_CMAKE_FLAGS=-DCMAKE_INSTALL_PREFIX=`rospack find ocl`/install
> +install: all
> + cd build; make install
> else
> $(warning This Makefile only works with ROS rosmake. Without rosmake,
> create a build directory and run cmake ..)
> endif

I don't agree here at all. OCL should *not* be installed during ros builds.
The programs are put in ocl/bin, the libs in ocl/lib. What error did you get
to make this change ?

Peter

Ruben Smits's picture

Make install for ocl ROS makefile

On Thursday 16 December 2010 12:25:43 Peter Soetens wrote:
> On Thursday 16 December 2010 12:00:22 Steven Bellens wrote:
> > diff --git a/Makefile b/Makefile
> > index 5fd7d6f..08b9210 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -1,5 +1,9 @@
> >
> > ifdef ROS_ROOT
> >
> > +default: install
> >
> > include $(shell rospack find mk)/cmake.mk
> >
> > +EXTRA_CMAKE_FLAGS=-DCMAKE_INSTALL_PREFIX=`rospack find ocl`/install
> > +install: all
> > + cd build; make install
> >
> > else
> > $(warning This Makefile only works with ROS rosmake. Without rosmake,
> >
> > create a build directory and run cmake ..)
> >
> > endif
>
> I don't agree here at all. OCL should *not* be installed during ros builds.
> The programs are put in ocl/bin, the libs in ocl/lib. What error did you
> get to make this change ?

AFIAK some of the exercises try to include the ocl/TaskBrowser.hpp. Which is
only available in that location after installation.

Ruben

>
> Peter

Make install for ocl ROS makefile

2010/12/16 Ruben Smits <ruben [dot] smits [..] ...>:
> On Thursday 16 December 2010 12:25:43 Peter Soetens wrote:
>> On Thursday 16 December 2010 12:00:22 Steven Bellens wrote:
>> > diff --git a/Makefile b/Makefile
>> > index 5fd7d6f..08b9210 100644
>> > --- a/Makefile
>> > +++ b/Makefile
>> > @@ -1,5 +1,9 @@
>> >
>> >  ifdef ROS_ROOT
>> >
>> > +default: install
>> >
>> >  include $(shell rospack find mk)/cmake.mk
>> >
>> > +EXTRA_CMAKE_FLAGS=-DCMAKE_INSTALL_PREFIX=`rospack find ocl`/install
>> > +install: all
>> > +       cd build; make install
>> >
>> >  else
>> >  $(warning This Makefile only works with ROS rosmake. Without rosmake,
>> >
>> > create a build directory and run cmake ..)
>> >
>> >  endif
>>
>> I don't agree here at all. OCL should *not* be installed during ros builds.
>> The programs are put in ocl/bin, the libs in ocl/lib. What error did you
>> get to make this change ?
>
> AFIAK some of the exercises try to include the ocl/TaskBrowser.hpp. Which is
> only available in that location after installation.

That is indeed the issue.

Steven

>
> Ruben
>
>>
>> Peter
> --
> Orocos-Dev mailing list
> Orocos-Dev [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
>

Make install for ocl ROS makefile

2010/12/16 Steven Bellens <steven [dot] bellens [..] ...>:
> 2010/12/16 Ruben Smits <ruben [dot] smits [..] ...>:
>> On Thursday 16 December 2010 12:25:43 Peter Soetens wrote:
>>> On Thursday 16 December 2010 12:00:22 Steven Bellens wrote:
>>> > diff --git a/Makefile b/Makefile
>>> > index 5fd7d6f..08b9210 100644
>>> > --- a/Makefile
>>> > +++ b/Makefile
>>> > @@ -1,5 +1,9 @@
>>> >
>>> >  ifdef ROS_ROOT
>>> >
>>> > +default: install
>>> >
>>> >  include $(shell rospack find mk)/cmake.mk
>>> >
>>> > +EXTRA_CMAKE_FLAGS=-DCMAKE_INSTALL_PREFIX=`rospack find ocl`/install
>>> > +install: all
>>> > +       cd build; make install
>>> >
>>> >  else
>>> >  $(warning This Makefile only works with ROS rosmake. Without rosmake,
>>> >
>>> > create a build directory and run cmake ..)
>>> >
>>> >  endif
>>>
>>> I don't agree here at all. OCL should *not* be installed during ros builds.
>>> The programs are put in ocl/bin, the libs in ocl/lib. What error did you
>>> get to make this change ?
>>
>> AFIAK some of the exercises try to include the ocl/TaskBrowser.hpp. Which is
>> only available in that location after installation.
>
> That is indeed the issue.

On top of that, the orocos-ocl pkgconfig file is (without install)
only available in the build directory

>
> Steven
>
>>
>> Ruben
>>
>>>
>>> Peter
>> --
>> Orocos-Dev mailing list
>> Orocos-Dev [..] ...
>> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
>>
>

Make install for ocl ROS makefile

On Thursday 16 December 2010 13:17:30 Steven Bellens wrote:
> 2010/12/16 Steven Bellens <steven [dot] bellens [..] ...>:
> > 2010/12/16 Ruben Smits <ruben [dot] smits [..] ...>:
> >> On Thursday 16 December 2010 12:25:43 Peter Soetens wrote:
> >>> On Thursday 16 December 2010 12:00:22 Steven Bellens wrote:
> >>> > diff --git a/Makefile b/Makefile
> >>> > index 5fd7d6f..08b9210 100644
> >>> > --- a/Makefile
> >>> > +++ b/Makefile
> >>> > @@ -1,5 +1,9 @@
> >>> >
> >>> > ifdef ROS_ROOT
> >>> >
> >>> > +default: install
> >>> >
> >>> > include $(shell rospack find mk)/cmake.mk
> >>> >
> >>> > +EXTRA_CMAKE_FLAGS=-DCMAKE_INSTALL_PREFIX=`rospack find ocl`/install
> >>> > +install: all
> >>> > + cd build; make install
> >>> >
> >>> > else
> >>> > $(warning This Makefile only works with ROS rosmake. Without
> >>> > rosmake,
> >>> >
> >>> > create a build directory and run cmake ..)
> >>> >
> >>> > endif
> >>>
> >>> I don't agree here at all. OCL should *not* be installed during ros
> >>> builds. The programs are put in ocl/bin, the libs in ocl/lib. What
> >>> error did you get to make this change ?
> >>
> >> AFIAK some of the exercises try to include the ocl/TaskBrowser.hpp.
> >> Which is only available in that location after installation.
> >
> > That is indeed the issue.
>
> On top of that, the orocos-ocl pkgconfig file is (without install)
> only available in the build directory

I don't want to promote using the 'global' pkgconfig file of ocl. It doesn't
express what you want (it links with all libraries), except setting the
include dir right (which is a logical extension of your PKG_CONFIG_PATH
variable anyway).

I'd prefer adding a orocos_find_component() macro to the UseOrocos.cmake macros
which may fallback to pkg-config (orogen generated or hand-written) or rospack
(using the manifest.xml) and then adds the necessary include dirs and link
libraries. In that respect, installing the TaskBrowser in
'taskbrowser/TaskBrowser.hpp' is probably better than in 'ocl/TaskBrowser.hpp'
(as opposed to my previous mail).

OCL is not different than what users will create, so it should serve as an
example: one repository with multiple components, on which other components in
other packages/repositories can depend on in turn.

The examples (helloworld) should switch to cmake too and use the standard
CMakeLists.txt file we are using everywhere else now.

I'd prefer not to apply this patch in order to motivate everyone involved to
contribute to the solution. But on the other hand, I don't want to break
builds and let people wast time until we have this solution. So maybe it's
best to work the solution out on a branch and quick-fix the Makefile until that
branch is ready for merging.

Any volunteers, ideas ?

Peter

Make install for ocl ROS makefile

2010/12/16 Peter Soetens <peter [..] ...>:
> On Thursday 16 December 2010 13:17:30 Steven Bellens wrote:
>> 2010/12/16 Steven Bellens <steven [dot] bellens [..] ...>:
>> > 2010/12/16 Ruben Smits <ruben [dot] smits [..] ...>:
>> >> On Thursday 16 December 2010 12:25:43 Peter Soetens wrote:
>> >>> On Thursday 16 December 2010 12:00:22 Steven Bellens wrote:
>> >>> > diff --git a/Makefile b/Makefile
>> >>> > index 5fd7d6f..08b9210 100644
>> >>> > --- a/Makefile
>> >>> > +++ b/Makefile
>> >>> > @@ -1,5 +1,9 @@
>> >>> >
>> >>> >  ifdef ROS_ROOT
>> >>> >
>> >>> > +default: install
>> >>> >
>> >>> >  include $(shell rospack find mk)/cmake.mk
>> >>> >
>> >>> > +EXTRA_CMAKE_FLAGS=-DCMAKE_INSTALL_PREFIX=`rospack find ocl`/install
>> >>> > +install: all
>> >>> > +       cd build; make install
>> >>> >
>> >>> >  else
>> >>> >  $(warning This Makefile only works with ROS rosmake. Without
>> >>> > rosmake,
>> >>> >
>> >>> > create a build directory and run cmake ..)
>> >>> >
>> >>> >  endif
>> >>>
>> >>> I don't agree here at all. OCL should *not* be installed during ros
>> >>> builds. The programs are put in ocl/bin, the libs in ocl/lib. What
>> >>> error did you get to make this change ?
>> >>
>> >> AFIAK some of the exercises try to include the ocl/TaskBrowser.hpp.
>> >> Which is only available in that location after installation.
>> >
>> > That is indeed the issue.
>>
>> On top of that, the orocos-ocl pkgconfig file is (without install)
>> only available in the build directory
>
> I don't want to promote using the 'global' pkgconfig file of ocl. It doesn't
> express what you want (it links with all libraries), except setting the
> include dir right (which is a logical extension of your PKG_CONFIG_PATH
> variable anyway).
>
> I'd prefer adding a orocos_find_component() macro to the UseOrocos.cmake macros
> which may fallback to pkg-config (orogen generated or hand-written) or rospack
> (using the manifest.xml) and then adds the necessary include dirs and link
> libraries. In that respect, installing the TaskBrowser in
> 'taskbrowser/TaskBrowser.hpp' is probably better than in 'ocl/TaskBrowser.hpp'
> (as opposed to my previous mail).
>
> OCL is not different than what users will create, so it should serve as an
> example: one repository with multiple components, on which other components in
> other packages/repositories can depend on in turn.
>
> The examples (helloworld) should switch to cmake too and use the standard
> CMakeLists.txt file we are using everywhere else now.

Take a look at the rtt_exercises package on the
orocos_toolchain_ros-0.2 branch - I've added a toplevel CMakeLists.txt
there already. Currently in the stack, only the exercises fail to
compile, and stopped us from doing a new release. It would indeed even
be better to switch to cmake here as well, as we can then import them
the same way we do with rtt and ocl now (git submodules).

>
> I'd prefer not to apply this patch in order to motivate everyone involved to
> contribute to the solution. But on the other hand, I don't want to break
> builds and let people wast time until we have this solution. So maybe it's
> best to work the solution out on a branch and quick-fix the Makefile until that
> branch is ready for merging.
>
> Any volunteers, ideas ?

I'll be glad to help refactoring the exercises if you give me any
input on how to start :)

Steven

>
> Peter
>

Make install for ocl ROS makefile

On Thursday 16 December 2010 14:57:38 Steven Bellens wrote:
> 2010/12/16 Peter Soetens <peter [..] ...>:
> > On Thursday 16 December 2010 13:17:30 Steven Bellens wrote:
> >> 2010/12/16 Steven Bellens <steven [dot] bellens [..] ...>:
> >> > 2010/12/16 Ruben Smits <ruben [dot] smits [..] ...>:
> >> >> On Thursday 16 December 2010 12:25:43 Peter Soetens wrote:
> >> >>> On Thursday 16 December 2010 12:00:22 Steven Bellens wrote:
> >> >>> > diff --git a/Makefile b/Makefile
> >> >>> > index 5fd7d6f..08b9210 100644
> >> >>> > --- a/Makefile
> >> >>> > +++ b/Makefile
> >> >>> > @@ -1,5 +1,9 @@
> >> >>> >
> >> >>> > ifdef ROS_ROOT
> >> >>> >
> >> >>> > +default: install
> >> >>> >
> >> >>> > include $(shell rospack find mk)/cmake.mk
> >> >>> >
> >> >>> > +EXTRA_CMAKE_FLAGS=-DCMAKE_INSTALL_PREFIX=`rospack find
> >> >>> > ocl`/install +install: all
> >> >>> > + cd build; make install
> >> >>> >
> >> >>> > else
> >> >>> > $(warning This Makefile only works with ROS rosmake. Without
> >> >>> > rosmake,
> >> >>> >
> >> >>> > create a build directory and run cmake ..)
> >> >>> >
> >> >>> > endif
> >> >>>
> >> >>> I don't agree here at all. OCL should *not* be installed during ros
> >> >>> builds. The programs are put in ocl/bin, the libs in ocl/lib. What
> >> >>> error did you get to make this change ?
> >> >>
> >> >> AFIAK some of the exercises try to include the ocl/TaskBrowser.hpp.
> >> >> Which is only available in that location after installation.
> >> >
> >> > That is indeed the issue.
> >>
> >> On top of that, the orocos-ocl pkgconfig file is (without install)
> >> only available in the build directory
> >
> > I don't want to promote using the 'global' pkgconfig file of ocl. It
> > doesn't express what you want (it links with all libraries), except
> > setting the include dir right (which is a logical extension of your
> > PKG_CONFIG_PATH variable anyway).
> >
> > I'd prefer adding a orocos_find_component() macro to the UseOrocos.cmake
> > macros which may fallback to pkg-config (orogen generated or
> > hand-written) or rospack (using the manifest.xml) and then adds the
> > necessary include dirs and link libraries. In that respect, installing
> > the TaskBrowser in
> > 'taskbrowser/TaskBrowser.hpp' is probably better than in
> > 'ocl/TaskBrowser.hpp' (as opposed to my previous mail).
> >
> > OCL is not different than what users will create, so it should serve as
> > an example: one repository with multiple components, on which other
> > components in other packages/repositories can depend on in turn.
> >
> > The examples (helloworld) should switch to cmake too and use the standard
> > CMakeLists.txt file we are using everywhere else now.
>
> Take a look at the rtt_exercises package on the
> orocos_toolchain_ros-0.2 branch - I've added a toplevel CMakeLists.txt
> there already. Currently in the stack, only the exercises fail to
> compile, and stopped us from doing a new release. It would indeed even
> be better to switch to cmake here as well, as we can then import them
> the same way we do with rtt and ocl now (git submodules).
>
> > I'd prefer not to apply this patch in order to motivate everyone involved
> > to contribute to the solution. But on the other hand, I don't want to
> > break builds and let people wast time until we have this solution. So
> > maybe it's best to work the solution out on a branch and quick-fix the
> > Makefile until that branch is ready for merging.
> >
> > Any volunteers, ideas ?
>
> I'll be glad to help refactoring the exercises if you give me any
> input on how to start :)

This is not exactly what I had in mind. I was thinking of one manifest +
Makefile + CMakeLists.txt for each exercise directory. Couldn't you import the
exercises as a git submodule too ?

I don't want to force anything If you think it doesn't make sense.

Peter

Make install for ocl ROS makefile

[...]

>>
>> I'll be glad to help refactoring the exercises if you give me any
>> input on how to start :)
>
> This is not exactly what I had in mind. I was thinking of one manifest +
> Makefile + CMakeLists.txt for each exercise directory. Couldn't you import the
> exercises as a git submodule too ?
>
> I don't want to force anything If you think it doesn't make sense.

I tried to update the hello-1-task-execution example using the
orocreate-pkg functionality + the orocos_executable macro.
Patch in appendix. Does something like this look ok?

Steven

>
> Peter
>
>
>
>

Make install for ocl ROS makefile

On Monday 20 December 2010 11:53:27 Steven Bellens wrote:
> [...]
>
> >> I'll be glad to help refactoring the exercises if you give me any
> >> input on how to start :)
> >
> > This is not exactly what I had in mind. I was thinking of one manifest +
> > Makefile + CMakeLists.txt for each exercise directory. Couldn't you
> > import the exercises as a git submodule too ?
> >
> > I don't want to force anything If you think it doesn't make sense.
>
> I tried to update the hello-1-task-execution example using the
> orocreate-pkg functionality + the orocos_executable macro.
> Patch in appendix. Does something like this look ok?
>

Yes. I would trim down the CMakeLists.txt to only contain the lines+comments
that we need.

If you're proficient in shell scripting, you can copy this (or the final) patch
for each hello-x example, something like

for i in hello-*; do cd $i; cat ../hello-1-task-execution-patch.patch | sed -
e"s/hello-1-task-execution/$i/" | patch -p3 ; cd .. ; done

Peter

Make install for ocl ROS makefile

2010/12/23 Peter Soetens <peter [..] ...>:
> On Monday 20 December 2010 11:53:27 Steven Bellens wrote:
>> [...]
>>
>> >> I'll be glad to help refactoring the exercises if you give me any
>> >> input on how to start :)
>> >
>> > This is not exactly what I had in mind. I was thinking of one manifest +
>> > Makefile + CMakeLists.txt for each exercise directory. Couldn't you
>> > import the exercises as a git submodule too ?
>> >
>> > I don't want to force anything If you think it doesn't make sense.
>>
>> I tried to update the hello-1-task-execution example using the
>> orocreate-pkg functionality + the orocos_executable macro.
>> Patch in appendix. Does something like this look ok?
>>
>
> Yes. I would trim down the CMakeLists.txt to only contain the lines+comments
> that we need.
>
> If you're proficient in shell scripting, you can copy this (or the final) patch
> for each hello-x example, something like
>
>

> for i in hello-*; do cd $i; cat ../hello-1-task-execution-patch.patch | sed -
> e"s/hello-1-task-execution/$i/" | patch -p3 ; cd .. ; done
> 

Patch in appendix. Except for exercise 7, they all load. I get a "[
ERROR ][DeploymentComponent::loadComponent] Unable to create Orocos
Component 'Example::Hello': unknown component type." when I try to
kickstart the solution.xml file. Not sure if this is due to my
changes. I've updated the orocos_executable macro to not append the
<target> to the name and to install in bin (at least in ROS build
systems :))

Steven

>
> Peter
>

Make install for ocl ROS makefile

On Thursday 23 December 2010 17:55:33 Steven Bellens wrote:
> 2010/12/23 Peter Soetens <peter [..] ...>:
> > On Monday 20 December 2010 11:53:27 Steven Bellens wrote:
> >> [...]
> >>
> >> >> I'll be glad to help refactoring the exercises if you give me any
> >> >> input on how to start :)
> >> >
> >> > This is not exactly what I had in mind. I was thinking of one manifest
> >> > + Makefile + CMakeLists.txt for each exercise directory. Couldn't you
> >> > import the exercises as a git submodule too ?
> >> >
> >> > I don't want to force anything If you think it doesn't make sense.
> >>
> >> I tried to update the hello-1-task-execution example using the
> >> orocreate-pkg functionality + the orocos_executable macro.
> >> Patch in appendix. Does something like this look ok?
> >
> > Yes. I would trim down the CMakeLists.txt to only contain the
> > lines+comments that we need.
> >
> > If you're proficient in shell scripting, you can copy this (or the final)
> > patch for each hello-x example, something like
> >
> >

> > for i in hello-*; do cd $i; cat ../hello-1-task-execution-patch.patch |
> > sed - e"s/hello-1-task-execution/$i/" | patch -p3 ; cd .. ; done
> > 

>
> Patch in appendix. Except for exercise 7, they all load. I get a "[
> ERROR ][DeploymentComponent::loadComponent] Unable to create Orocos
> Component 'Example::Hello': unknown component type." when I try to
> kickstart the solution.xml file. Not sure if this is due to my
> changes. I've updated the orocos_executable macro to not append the
> <target> to the name and to install in bin (at least in ROS build
> systems :))

Why is it better to drop the target suffix from the executable (on ROS systems)
?

Wouldn't you have -gnulinux/-xenomai versions of the same executable in the
bin/ dir ?

Peter

Make install for ocl ROS makefile

2011/1/24 Peter Soetens <peter [..] ...>:
> On Thursday 23 December 2010 17:55:33 Steven Bellens wrote:
>> 2010/12/23 Peter Soetens <peter [..] ...>:
>> > On Monday 20 December 2010 11:53:27 Steven Bellens wrote:
>> >> [...]
>> >>
>> >> >> I'll be glad to help refactoring the exercises if you give me any
>> >> >> input on how to start :)
>> >> >
>> >> > This is not exactly what I had in mind. I was thinking of one manifest
>> >> > + Makefile + CMakeLists.txt for each exercise directory. Couldn't you
>> >> > import the exercises as a git submodule too ?
>> >> >
>> >> > I don't want to force anything If you think it doesn't make sense.
>> >>
>> >> I tried to update the hello-1-task-execution example using the
>> >> orocreate-pkg functionality + the orocos_executable macro.
>> >> Patch in appendix. Does something like this look ok?
>> >
>> > Yes. I would trim down the CMakeLists.txt to only contain the
>> > lines+comments that we need.
>> >
>> > If you're proficient in shell scripting, you can copy this (or the final)
>> > patch for each hello-x example, something like
>> >
>> >

>> > for i in hello-*; do cd $i; cat ../hello-1-task-execution-patch.patch |
>> > sed - e"s/hello-1-task-execution/$i/" | patch -p3 ; cd .. ; done
>> > 

>>
>> Patch in appendix. Except for exercise 7, they all load. I get a "[
>> ERROR  ][DeploymentComponent::loadComponent] Unable to create Orocos
>> Component 'Example::Hello': unknown component type." when I try to
>> kickstart the solution.xml file. Not sure if this is due to my
>> changes. I've updated the orocos_executable macro to not append the
>> <target> to the name and to install in bin (at least in ROS build
>> systems :))
>
> Why is it better to drop the target suffix from the executable (on ROS systems)
> ?
>
> Wouldn't you have -gnulinux/-xenomai versions of the same executable in the
> bin/ dir ?

Yes, correct. I made the change to get the 'hello' binaries instead of
'hello-gnulinux', but the last one is indeed better.

Steven

>
> Peter
>
--
Orocos-Dev mailing list
Orocos-Dev [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev

Make install for ocl ROS makefile

2010/12/16 Peter Soetens <peter [..] ...>:
> On Thursday 16 December 2010 14:57:38 Steven Bellens wrote:
>> 2010/12/16 Peter Soetens <peter [..] ...>:
>> > On Thursday 16 December 2010 13:17:30 Steven Bellens wrote:
>> >> 2010/12/16 Steven Bellens <steven [dot] bellens [..] ...>:
>> >> > 2010/12/16 Ruben Smits <ruben [dot] smits [..] ...>:
>> >> >> On Thursday 16 December 2010 12:25:43 Peter Soetens wrote:
>> >> >>> On Thursday 16 December 2010 12:00:22 Steven Bellens wrote:
>> >> >>> > diff --git a/Makefile b/Makefile
>> >> >>> > index 5fd7d6f..08b9210 100644
>> >> >>> > --- a/Makefile
>> >> >>> > +++ b/Makefile
>> >> >>> > @@ -1,5 +1,9 @@
>> >> >>> >
>> >> >>> >  ifdef ROS_ROOT
>> >> >>> >
>> >> >>> > +default: install
>> >> >>> >
>> >> >>> >  include $(shell rospack find mk)/cmake.mk
>> >> >>> >
>> >> >>> > +EXTRA_CMAKE_FLAGS=-DCMAKE_INSTALL_PREFIX=`rospack find
>> >> >>> > ocl`/install +install: all
>> >> >>> > +       cd build; make install
>> >> >>> >
>> >> >>> >  else
>> >> >>> >  $(warning This Makefile only works with ROS rosmake. Without
>> >> >>> > rosmake,
>> >> >>> >
>> >> >>> > create a build directory and run cmake ..)
>> >> >>> >
>> >> >>> >  endif
>> >> >>>
>> >> >>> I don't agree here at all. OCL should *not* be installed during ros
>> >> >>> builds. The programs are put in ocl/bin, the libs in ocl/lib. What
>> >> >>> error did you get to make this change ?
>> >> >>
>> >> >> AFIAK some of the exercises try to include the ocl/TaskBrowser.hpp.
>> >> >> Which is only available in that location after installation.
>> >> >
>> >> > That is indeed the issue.
>> >>
>> >> On top of that, the orocos-ocl pkgconfig file is (without install)
>> >> only available in the build directory
>> >
>> > I don't want to promote using the 'global' pkgconfig file of ocl. It
>> > doesn't express what you want (it links with all libraries), except
>> > setting the include dir right (which is a logical extension of your
>> > PKG_CONFIG_PATH variable anyway).
>> >
>> > I'd prefer adding a orocos_find_component() macro to the UseOrocos.cmake
>> > macros which may fallback to pkg-config (orogen generated or
>> > hand-written) or rospack (using the manifest.xml) and then adds the
>> > necessary include dirs and link libraries. In that respect, installing
>> > the TaskBrowser in
>> > 'taskbrowser/TaskBrowser.hpp' is probably better than in
>> > 'ocl/TaskBrowser.hpp' (as opposed to my previous mail).
>> >
>> > OCL is not different than what users will create, so it should serve as
>> > an example: one repository with multiple components, on which other
>> > components in other packages/repositories can depend on in turn.
>> >
>> > The examples (helloworld) should switch to cmake too and use the standard
>> > CMakeLists.txt file we are using everywhere else now.
>>
>> Take a look at the rtt_exercises package on the
>> orocos_toolchain_ros-0.2 branch - I've added a toplevel CMakeLists.txt
>> there already. Currently in the stack, only the exercises fail to
>> compile, and stopped us from doing a new release. It would indeed even
>> be better to switch to cmake here as well, as we can then import them
>> the same way we do with rtt and ocl now (git submodules).
>>
>> > I'd prefer not to apply this patch in order to motivate everyone involved
>> > to contribute to the solution. But on the other hand, I don't want to
>> > break builds and let people wast time until we have this solution. So
>> > maybe it's best to work the solution out on a branch and quick-fix the
>> > Makefile until that branch is ready for merging.
>> >
>> > Any volunteers, ideas ?
>>
>> I'll be glad to help refactoring the exercises if you give me any
>> input on how to start :)
>
> This is not exactly what I had in mind. I was thinking of one manifest +
> Makefile + CMakeLists.txt for each exercise directory. Couldn't you import the
> exercises as a git submodule too ?

That's the plan, but I thought it would be more straightforward to
provide one CMakeLists.txt for the whole tree.
I've added them as an extra submodule just now in a seperate branch.

Steven

>
> I don't want to force anything If you think it doesn't make sense.
>
> Peter
>
>
>
>

Make install for ocl ROS makefile

On Thursday 16 December 2010 13:17:30 Steven Bellens wrote:
> 2010/12/16 Steven Bellens <steven [dot] bellens [..] ...>:
> > 2010/12/16 Ruben Smits <ruben [dot] smits [..] ...>:
> >> On Thursday 16 December 2010 12:25:43 Peter Soetens wrote:
> >>> On Thursday 16 December 2010 12:00:22 Steven Bellens wrote:
> >>> > diff --git a/Makefile b/Makefile
> >>> > index 5fd7d6f..08b9210 100644
> >>> > --- a/Makefile
> >>> > +++ b/Makefile
> >>> > @@ -1,5 +1,9 @@
> >>> >
> >>> > ifdef ROS_ROOT
> >>> >
> >>> > +default: install
> >>> >
> >>> > include $(shell rospack find mk)/cmake.mk
> >>> >
> >>> > +EXTRA_CMAKE_FLAGS=-DCMAKE_INSTALL_PREFIX=`rospack find ocl`/install
> >>> > +install: all
> >>> > + cd build; make install
> >>> >
> >>> > else
> >>> > $(warning This Makefile only works with ROS rosmake. Without
> >>> > rosmake,
> >>> >
> >>> > create a build directory and run cmake ..)
> >>> >
> >>> > endif
> >>>
> >>> I don't agree here at all. OCL should *not* be installed during ros
> >>> builds. The programs are put in ocl/bin, the libs in ocl/lib. What
> >>> error did you get to make this change ?
> >>
> >> AFIAK some of the exercises try to include the ocl/TaskBrowser.hpp.
> >> Which is only available in that location after installation.
> >
> > That is indeed the issue.
>
> On top of that, the orocos-ocl pkgconfig file is (without install)
> only available in the build directory

I'd prefer not to do a make install step, since ocl should be the example on
how to build components in ros packages. I don't want ocl to be a special case
anymore. Also, rosrun gets confused since there will be apps in the bin/ dir
and in the install/bin dir. I'd rather move all headers to the 'ocl'
directory or do something else (more) sensible than to make the install step
mandatory in ros package trees.

Peter

Make install for ocl ROS makefile

2010/12/16 Peter Soetens <peter [..] ...>:
> On Thursday 16 December 2010 13:17:30 Steven Bellens wrote:
>> 2010/12/16 Steven Bellens <steven [dot] bellens [..] ...>:
>> > 2010/12/16 Ruben Smits <ruben [dot] smits [..] ...>:
>> >> On Thursday 16 December 2010 12:25:43 Peter Soetens wrote:
>> >>> On Thursday 16 December 2010 12:00:22 Steven Bellens wrote:
>> >>> > diff --git a/Makefile b/Makefile
>> >>> > index 5fd7d6f..08b9210 100644
>> >>> > --- a/Makefile
>> >>> > +++ b/Makefile
>> >>> > @@ -1,5 +1,9 @@
>> >>> >
>> >>> >  ifdef ROS_ROOT
>> >>> >
>> >>> > +default: install
>> >>> >
>> >>> >  include $(shell rospack find mk)/cmake.mk
>> >>> >
>> >>> > +EXTRA_CMAKE_FLAGS=-DCMAKE_INSTALL_PREFIX=`rospack find ocl`/install
>> >>> > +install: all
>> >>> > +       cd build; make install
>> >>> >
>> >>> >  else
>> >>> >  $(warning This Makefile only works with ROS rosmake. Without
>> >>> > rosmake,
>> >>> >
>> >>> > create a build directory and run cmake ..)
>> >>> >
>> >>> >  endif
>> >>>
>> >>> I don't agree here at all. OCL should *not* be installed during ros
>> >>> builds. The programs are put in ocl/bin, the libs in ocl/lib. What
>> >>> error did you get to make this change ?
>> >>
>> >> AFIAK some of the exercises try to include the ocl/TaskBrowser.hpp.
>> >> Which is only available in that location after installation.
>> >
>> > That is indeed the issue.
>>
>> On top of that, the orocos-ocl pkgconfig file is (without install)
>> only available in the build directory
>
> I'd prefer not to do a make install step, since ocl should be the example on
> how to build components in ros packages. I don't want ocl to be a special case
> anymore. Also, rosrun gets confused since there will be apps in the bin/ dir
> and in the install/bin dir.  I'd rather move all headers to the 'ocl'
> directory or do something else (more) sensible than to make the install step
> mandatory in ros package trees.

Most common is to put the include files in ./include/PackageName

Steven

>
> Peter
>

Make install for ocl ROS makefile

On Friday 17 December 2010 09:29:33 Steven Bellens wrote:
> 2010/12/16 Peter Soetens <peter [..] ...>:
> > On Thursday 16 December 2010 13:17:30 Steven Bellens wrote:
> >> 2010/12/16 Steven Bellens <steven [dot] bellens [..] ...>:
> >> > 2010/12/16 Ruben Smits <ruben [dot] smits [..] ...>:
> >> >> On Thursday 16 December 2010 12:25:43 Peter Soetens wrote:
> >> >>> On Thursday 16 December 2010 12:00:22 Steven Bellens wrote:
> >> >>> > diff --git a/Makefile b/Makefile
> >> >>> > index 5fd7d6f..08b9210 100644
> >> >>> > --- a/Makefile
> >> >>> > +++ b/Makefile
> >> >>> > @@ -1,5 +1,9 @@
> >> >>> >
> >> >>> > ifdef ROS_ROOT
> >> >>> >
> >> >>> > +default: install
> >> >>> >
> >> >>> > include $(shell rospack find mk)/cmake.mk
> >> >>> >
> >> >>> > +EXTRA_CMAKE_FLAGS=-DCMAKE_INSTALL_PREFIX=`rospack find
> >> >>> > ocl`/install +install: all
> >> >>> > + cd build; make install
> >> >>> >
> >> >>> > else
> >> >>> > $(warning This Makefile only works with ROS rosmake. Without
> >> >>> > rosmake,
> >> >>> >
> >> >>> > create a build directory and run cmake ..)
> >> >>> >
> >> >>> > endif
> >> >>>
> >> >>> I don't agree here at all. OCL should *not* be installed during ros
> >> >>> builds. The programs are put in ocl/bin, the libs in ocl/lib. What
> >> >>> error did you get to make this change ?
> >> >>
> >> >> AFIAK some of the exercises try to include the ocl/TaskBrowser.hpp.
> >> >> Which is only available in that location after installation.
> >> >
> >> > That is indeed the issue.
> >>
> >> On top of that, the orocos-ocl pkgconfig file is (without install)
> >> only available in the build directory
> >
> > I'd prefer not to do a make install step, since ocl should be the example
> > on how to build components in ros packages. I don't want ocl to be a
> > special case anymore. Also, rosrun gets confused since there will be
> > apps in the bin/ dir and in the install/bin dir. I'd rather move all
> > headers to the 'ocl' directory or do something else (more) sensible than
> > to make the install step mandatory in ros package trees.
>
> Most common is to put the include files in ./include/PackageName
>

Does anyone know how to teach Eclipse that when pressing Ctrl-TAB, it may also
search for the header in the project/include directory ? This is for me the
major reason to keep .cpp and .hpp files together, such that this function
keeps working...

Peter

Make install for ocl ROS makefile

2010/12/20 Peter Soetens <peter [..] ...>

> On Friday 17 December 2010 09:29:33 Steven Bellens wrote:
> > 2010/12/16 Peter Soetens <peter [..] ...>:
> > > On Thursday 16 December 2010 13:17:30 Steven Bellens wrote:
> > >> 2010/12/16 Steven Bellens <steven [dot] bellens [..] ...>:
> > >> > 2010/12/16 Ruben Smits <ruben [dot] smits [..] ...>:
> > >> >> On Thursday 16 December 2010 12:25:43 Peter Soetens wrote:
> > >> >>> On Thursday 16 December 2010 12:00:22 Steven Bellens wrote:
> > >> >>> > diff --git a/Makefile b/Makefile
> > >> >>> > index 5fd7d6f..08b9210 100644
> > >> >>> > --- a/Makefile
> > >> >>> > +++ b/Makefile
> > >> >>> > @@ -1,5 +1,9 @@
> > >> >>> >
> > >> >>> > ifdef ROS_ROOT
> > >> >>> >
> > >> >>> > +default: install
> > >> >>> >
> > >> >>> > include $(shell rospack find mk)/cmake.mk
> > >> >>> >
> > >> >>> > +EXTRA_CMAKE_FLAGS=-DCMAKE_INSTALL_PREFIX=`rospack find
> > >> >>> > ocl`/install +install: all
> > >> >>> > + cd build; make install
> > >> >>> >
> > >> >>> > else
> > >> >>> > $(warning This Makefile only works with ROS rosmake. Without
> > >> >>> > rosmake,
> > >> >>> >
> > >> >>> > create a build directory and run cmake ..)
> > >> >>> >
> > >> >>> > endif
> > >> >>>
> > >> >>> I don't agree here at all. OCL should *not* be installed during
> ros
> > >> >>> builds. The programs are put in ocl/bin, the libs in ocl/lib. What
> > >> >>> error did you get to make this change ?
> > >> >>
> > >> >> AFIAK some of the exercises try to include the ocl/TaskBrowser.hpp.
> > >> >> Which is only available in that location after installation.
> > >> >
> > >> > That is indeed the issue.
> > >>
> > >> On top of that, the orocos-ocl pkgconfig file is (without install)
> > >> only available in the build directory
> > >
> > > I'd prefer not to do a make install step, since ocl should be the
> example
> > > on how to build components in ros packages. I don't want ocl to be a
> > > special case anymore. Also, rosrun gets confused since there will be
> > > apps in the bin/ dir and in the install/bin dir. I'd rather move all
> > > headers to the 'ocl' directory or do something else (more) sensible
> than
> > > to make the install step mandatory in ros package trees.
> >
> > Most common is to put the include files in ./include/PackageName
> >
>
> Does anyone know how to teach Eclipse that when pressing Ctrl-TAB, it may
> also
> search for the header in the project/include directory ? This is for me the
> major reason to keep .cpp and .hpp files together, such that this function
> keeps working...
>

Rigth clic on the project, properties then a pop appears and select in the
left panel "C/C++ General -> Paths and Symbols"
In the tab "include" you can clic sur "Add..." and you may include whatever
you like (for instance the orocos/rtt/include in a user application project)
. In your case I think you should clic the first 2 squares (add to all
languages and configuration) and clic on the workspace button and select
your include directory, it should work.

>
> Peter
> --
> Orocos-Dev mailing list
> Orocos-Dev [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
>