typegen: make regen fails

Hello,

On one of my boxes, the make regen command fails after the following
scenario

orocreate-pkg MyTypes typekit; cd MyTypes/ ; mkdir build ; cd build ;
ccmake -i .. ; make ; modify ../src/MyTypes-types.hpp ; make regen

with the error
-----
sagar@maya:~/excludes/orocos-playground/MyTypes/build$ make regen
Scanning dependencies of target regen
/usr/lib/ruby/1.9.1/fileutils.rb:351:in `symlink': No such file or
directory - (/home/sagar/excludes/orocos-playground/MyTypes/typekit,
/home/sagar/excludes/orocos-playground/MyTypes/typekit/typekit/typekit)
(Errno::ENOENT)
from /usr/lib/ruby/1.9.1/fileutils.rb:351:in `block in ln_s'
from /usr/lib/ruby/1.9.1/fileutils.rb:1529:in `fu_each_src_dest0'
from /usr/lib/ruby/1.9.1/fileutils.rb:349:in `ln_s'
from /usr/lib/ruby/1.9.1/fileutils.rb:372:in `ln_sf'
from
/home/sagar/excludes/orocos-toolchain/orogen/lib/orogen/gen/typekit.rb:429:in
`create_or_update_symlink'
from
/home/sagar/excludes/orocos-toolchain/orogen/lib/orogen/gen/typekit.rb:1587:in
`generate'
from
/home/sagar/excludes/orocos-toolchain/orogen/bin/typegen:113:in `<main>'
make[3]: *** [typekit/CMakeFiles/regen] Error 1
make[2]: *** [typekit/CMakeFiles/regen.dir/all] Error 2
make[1]: *** [typekit/CMakeFiles/regen.dir/rule] Error 2
make: *** [regen] Error 2
-----

which is weird because the directory it grumbles about does exist
---
sagar@maya:~/excludes/orocos-playground/MyTypes/build$ ls
/home/sagar/excludes/orocos-playground/MyTypes/typekit
CMakeLists.txt manifest.xml MyTypes-typekit.pc.in Plugin.hpp type_info
config MyTypes MyTypes.typelist stamp types
Makefile MyTypes.tlb Plugin.cpp transports Types.hpp
sagar@maya:~/excludes/orocos-playground/MyTypes/build$
---

This happens with both ruby1.8 and ruby1.9. This does NOT happen (i.e.
everything works) on another box. Both boxes are running up-to-date
debian wheezy, but the box on which the error occurs is using the master
branch, instead of the toolchain-2.5 branch.

Is this due to any changes in the master branch, or something else? (the
two boxes are similar, but some system components may have drifted apart)

Thanks in advance,
Sagar

typegen: make regen fails

Aaahhh. The infamous infinite symlinking bug.

I've put a fix on orogen master. Update and try again, it should be fine
now.

don't work

don't work

typegen: make regen fails

On 10/09/2012 02:10 PM, Sylvain Joyeux wrote:
> Aaahhh. The infamous infinite symlinking bug.
>
> I've put a fix on orogen master. Update and try again, it should be fine
> now.
>

Thanks, that fixed it.

Is there a way to automatically trigger the regen as part of the build
process, if it detects that file containing the struct definitions has
changed? Right now, it says,

"Typekit input changed. Run make regen in your build directory first"

and you need to manually type make regen. How to get something like

"Typekit input changed. Running make regen first.. regen okay, compiling.."

/Sagar

typegen: make regen fails

On 10/09/2012 03:27 PM, Sagar Behere wrote:
> On 10/09/2012 02:10 PM, Sylvain Joyeux wrote:
>> Aaahhh. The infamous infinite symlinking bug.
>>
>> I've put a fix on orogen master. Update and try again, it should be fine
>> now.
>>
>
> Thanks, that fixed it.
>
> Is there a way to automatically trigger the regen as part of the build
> process, if it detects that file containing the struct definitions has
> changed? Right now, it says,
>
> "Typekit input changed. Run make regen in your build directory first"
>
> and you need to manually type make regen. How to get something like
>
> "Typekit input changed. Running make regen first.. regen okay,
> compiling.."
As far as I know, this is not possible with cmake as you cannot have a
target that re-generates the makefile (i.e. regen, then re-trigger cmake
then re-trigger make). That is why in rock, where we use only orogen, a
special autoproj handler takes care of the regen part.

The same mechanism could be implemented for typegen. However, not being
a typegen user myself, I don't really have an incentive to spend
ressources on that.