Typelib compilation with multiple jobs fails

Hi,

compiling the typelib package with multiple jobs fails:

cd build && make -j2
make[1]: Entering directory
`/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_toolchain_ros/typelib/build'
make[2]: Entering directory
`/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_toolchain_ros/typelib/build'
make[3]: Entering directory
`/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_toolchain_ros/typelib/build'
make[3]: Entering directory
`/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_toolchain_ros/typelib/build'
Scanning dependencies of target dyncall
Scanning dependencies of target typeLib
make[3]: Leaving directory
`/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_toolchain_ros/typelib/build'
make[3]: Entering directory
`/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_toolchain_ros/typelib/build'
[ 0%] Generating dyncall-0.3/ConfigVars
make[3]: Leaving directory
`/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_toolchain_ros/typelib/build'
make[3]: Entering directory
`/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_toolchain_ros/typelib/build'
[ 2%] Building CXX object
build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/registry.o
* configure package dyncall
guess operating system linux
guess arch x64
guess tool gcc
guess assembler as
[ 2%] Generating dyncall/lib/libdyncall_s.a, dyncall/lib/libdynload_s.a
make[4]: Entering directory
`/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_toolchain_ros/typelib/build/build/orocos-toolchain-typelib/bindings/ruby/dyncall-0.3'
make[4]: *** read jobs pipe: Is a directory. Stop.
make[4]: *** Waiting for unfinished jobs....
make[5]: Entering directory
`/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_toolchain_ros/typelib/build/build/orocos-toolchain-typelib/bindings/ruby/dyncall-0.3/dyncall'
make[5]: *** read jobs pipe: Is a directory. Stop.
make[5]: *** Waiting for unfinished jobs....
make[5]: Leaving directory
`/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_toolchain_ros/typelib/build/build/orocos-toolchain-typelib/bindings/ruby/dyncall-0.3/dyncall'
make[4]: *** [dyncall] Error 2
make[4]: Leaving directory
`/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_toolchain_ros/typelib/build/build/orocos-toolchain-typelib/bindings/ruby/dyncall-0.3'
make[3]: *** [build/orocos-toolchain-typelib/bindings/ruby/dyncall/lib/libdyncall_s.a]
Error 2
make[3]: Leaving directory
`/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_toolchain_ros/typelib/build'
make[2]: *** [build/orocos-toolchain-typelib/bindings/ruby/CMakeFiles/dyncall.dir/all]
Error 2
make[2]: *** Waiting for unfinished jobs....
[ 4%] Building CXX object
build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/typebuilder.o
[ 6%] Building CXX object
build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/typemodel.o
[ 8%] Building CXX object
build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/typename.o
[ 10%] Building CXX object
build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/typevisitor.o
[ 12%] Building CXX object
build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/typedisplay.o
[ 14%] Building CXX object
build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/exporter.o
[ 16%] Building CXX object
build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/pluginmanager.o
[ 18%] Building CXX object
build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/value.o
[ 20%] Building CXX object
build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/importer.o
[ 22%] Building CXX object
build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/csvoutput.o
[ 24%] Building CXX object
build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/endianness.o
[ 26%] Building CXX object
build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/memory_layout.o
[ 28%] Building CXX object
build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/value_ops.o
Linking CXX shared library ../../../../lib/libtypeLib.so
make[3]: Leaving directory
`/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_toolchain_ros/typelib/build'
[ 28%] Built target typeLib
make[2]: Leaving directory
`/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_toolchain_ros/typelib/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory
`/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_toolchain_ros/typelib/build'
make: *** [all] Error 2

while compiling it with 'make -j1' always goes fine. Any ideas why this happens?

regards,

Steven

Typelib compilation with multiple jobs fails

On Tue, Sep 14, 2010 at 11:08 AM, Steven Bellens
<steven [dot] bellens [..] ...> wrote:
> Hi,
>
> compiling the typelib package with multiple jobs fails:

I have fixed this bug. It was due to the use of 'make' instead of
'$(MAKE)' in the custom command rule. For multiple jobs, $(MAKE) is
mandatory.

I'm pushing stuff to gitorious/toolchain-2.0 as I go...

Peter

Typelib compilation with multiple jobs fails

A Dijous 23 Setembre 2010, Peter Soetens va escriure:
> On Tue, Sep 14, 2010 at 11:08 AM, Steven Bellens
>
> <steven [dot] bellens [..] ...> wrote:
> > Hi,
> >
> > compiling the typelib package with multiple jobs fails:
>
> I have fixed this bug. It was due to the use of 'make' instead of
> '$(MAKE)' in the custom command rule. For multiple jobs, $(MAKE) is
> mandatory.

how did you find it?!!!!!

Typelib compilation with multiple jobs fails

On Thu, Sep 23, 2010 at 5:00 PM, Leopold Palomo-Avellaneda
<leo [..] ...> wrote:
> A Dijous 23 Setembre 2010, Peter Soetens va escriure:
>> On Tue, Sep 14, 2010 at 11:08 AM, Steven Bellens
>>
>> <steven [dot] bellens [..] ...> wrote:
>> > Hi,
>> >
>> > compiling the typelib package with multiple jobs fails:
>>
>> I have fixed this bug. It was due to the use of 'make' instead of
>> '$(MAKE)' in the custom command rule. For multiple jobs, $(MAKE) is
>> mandatory.
>
> how did you find it?!!!!!

Not in the documentation :-) I kind-of remembered something like that
from the old days, when I was writing makefiles myself...
make used to give a warning that when using 'make' in a Makefile job
control would not work, and you had to replace it with
'$(MAKE)'. Maybe cmake disables this warning for silencing some bad
practices... I don't know.

Peter

Typelib compilation with multiple jobs fails

On Tuesday 14 September 2010 11:08:01 Steven Bellens wrote:
> Hi,
>
> compiling the typelib package with multiple jobs fails:
>
> cd build && make -j2
> make[1]: Entering directory
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> chain_ros/typelib/build' make[2]: Entering directory
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> chain_ros/typelib/build' make[3]: Entering directory
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> chain_ros/typelib/build' make[3]: Entering directory
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> chain_ros/typelib/build' Scanning dependencies of target dyncall
> Scanning dependencies of target typeLib
> make[3]: Leaving directory
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> chain_ros/typelib/build' make[3]: Entering directory
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> chain_ros/typelib/build' [ 0%] Generating dyncall-0.3/ConfigVars
> make[3]: Leaving directory
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> chain_ros/typelib/build' make[3]: Entering directory
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> chain_ros/typelib/build' [ 2%] Building CXX object
> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/registry.o
> * configure package dyncall
> guess operating system linux
> guess arch x64
> guess tool gcc
> guess assembler as
> [ 2%] Generating dyncall/lib/libdyncall_s.a, dyncall/lib/libdynload_s.a
> make[4]: Entering directory
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> chain_ros/typelib/build/build/orocos-toolchain-typelib/bindings/ruby/dyncal
> l-0.3' make[4]: *** read jobs pipe: Is a directory. Stop.
> make[4]: *** Waiting for unfinished jobs....
> make[5]: Entering directory
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> chain_ros/typelib/build/build/orocos-toolchain-typelib/bindings/ruby/dyncal
> l-0.3/dyncall' make[5]: *** read jobs pipe: Is a directory. Stop.
> make[5]: *** Waiting for unfinished jobs....
> make[5]: Leaving directory
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> chain_ros/typelib/build/build/orocos-toolchain-typelib/bindings/ruby/dyncal
> l-0.3/dyncall' make[4]: *** [dyncall] Error 2
> make[4]: Leaving directory
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> chain_ros/typelib/build/build/orocos-toolchain-typelib/bindings/ruby/dyncal
> l-0.3' make[3]: ***
> [build/orocos-toolchain-typelib/bindings/ruby/dyncall/lib/libdyncall_s.a]
> Error 2
> make[3]: Leaving directory
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> chain_ros/typelib/build' make[2]: ***
> [build/orocos-toolchain-typelib/bindings/ruby/CMakeFiles/dyncall.dir/all]
> Error 2
> make[2]: *** Waiting for unfinished jobs....
> [ 4%] Building CXX object
> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/typebuilder.o
> [ 6%] Building CXX object
> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/typemodel.o
> [ 8%] Building CXX object
> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/typename.o
> [ 10%] Building CXX object
> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/typevisitor.o
> [ 12%] Building CXX object
> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/typedisplay.o
> [ 14%] Building CXX object
> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/exporter.o
> [ 16%] Building CXX object
> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/pluginmanager
> .o [ 18%] Building CXX object
> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/value.o
> [ 20%] Building CXX object
> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/importer.o
> [ 22%] Building CXX object
> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/csvoutput.o
> [ 24%] Building CXX object
> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/endianness.o
> [ 26%] Building CXX object
> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/memory_layout
> .o [ 28%] Building CXX object
> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/value_ops.o
> Linking CXX shared library ../../../../lib/libtypeLib.so
> make[3]: Leaving directory
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> chain_ros/typelib/build' [ 28%] Built target typeLib
> make[2]: Leaving directory
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> chain_ros/typelib/build' make[1]: *** [all] Error 2
> make[1]: Leaving directory
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> chain_ros/typelib/build' make: *** [all] Error 2
>
> while compiling it with 'make -j1' always goes fine. Any ideas why this
> happens?

Looks like a bug in the target definition or names in the cmake files... Don't
have a clue...

Peter

Typelib compilation with multiple jobs fails

2010/9/14 Peter Soetens <peter [..] ...>:
> On Tuesday 14 September 2010 11:08:01 Steven Bellens wrote:
>> Hi,
>>
>> compiling the typelib package with multiple jobs fails:
>>
>> cd build && make -j2
>> make[1]: Entering directory
>> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
>> chain_ros/typelib/build' make[2]: Entering directory
>> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
>> chain_ros/typelib/build' make[3]: Entering directory
>> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
>> chain_ros/typelib/build' make[3]: Entering directory
>> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
>> chain_ros/typelib/build' Scanning dependencies of target dyncall
>> Scanning dependencies of target typeLib
>> make[3]: Leaving directory
>> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
>> chain_ros/typelib/build' make[3]: Entering directory
>> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
>> chain_ros/typelib/build' [  0%] Generating dyncall-0.3/ConfigVars
>> make[3]: Leaving directory
>> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
>> chain_ros/typelib/build' make[3]: Entering directory
>> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
>> chain_ros/typelib/build' [  2%] Building CXX object
>> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/registry.o
>> * configure package dyncall
>> guess operating system linux
>> guess arch x64
>> guess tool gcc
>> guess assembler as
>> [  2%] Generating dyncall/lib/libdyncall_s.a, dyncall/lib/libdynload_s.a
>> make[4]: Entering directory
>> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
>> chain_ros/typelib/build/build/orocos-toolchain-typelib/bindings/ruby/dyncal
>> l-0.3' make[4]: *** read jobs pipe: Is a directory.  Stop.
>> make[4]: *** Waiting for unfinished jobs....
>> make[5]: Entering directory
>> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
>> chain_ros/typelib/build/build/orocos-toolchain-typelib/bindings/ruby/dyncal
>> l-0.3/dyncall' make[5]: *** read jobs pipe: Is a directory.  Stop.
>> make[5]: *** Waiting for unfinished jobs....
>> make[5]: Leaving directory
>> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
>> chain_ros/typelib/build/build/orocos-toolchain-typelib/bindings/ruby/dyncal
>> l-0.3/dyncall' make[4]: *** [dyncall] Error 2
>> make[4]: Leaving directory
>> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
>> chain_ros/typelib/build/build/orocos-toolchain-typelib/bindings/ruby/dyncal
>> l-0.3' make[3]: ***
>>  [build/orocos-toolchain-typelib/bindings/ruby/dyncall/lib/libdyncall_s.a]
>>  Error 2
>> make[3]: Leaving directory
>> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
>> chain_ros/typelib/build' make[2]: ***
>>  [build/orocos-toolchain-typelib/bindings/ruby/CMakeFiles/dyncall.dir/all]
>>  Error 2
>> make[2]: *** Waiting for unfinished jobs....
>> [  4%] Building CXX object
>> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/typebuilder.o
>> [  6%] Building CXX object
>> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/typemodel.o
>> [  8%] Building CXX object
>> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/typename.o
>> [ 10%] Building CXX object
>> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/typevisitor.o
>> [ 12%] Building CXX object
>> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/typedisplay.o
>> [ 14%] Building CXX object
>> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/exporter.o
>> [ 16%] Building CXX object
>> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/pluginmanager
>> .o [ 18%] Building CXX object
>> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/value.o
>> [ 20%] Building CXX object
>> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/importer.o
>> [ 22%] Building CXX object
>> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/csvoutput.o
>> [ 24%] Building CXX object
>> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/endianness.o
>> [ 26%] Building CXX object
>> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/memory_layout
>> .o [ 28%] Building CXX object
>> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/value_ops.o
>> Linking CXX shared library ../../../../lib/libtypeLib.so
>> make[3]: Leaving directory
>> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
>> chain_ros/typelib/build' [ 28%] Built target typeLib
>> make[2]: Leaving directory
>> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
>> chain_ros/typelib/build' make[1]: *** [all] Error 2
>> make[1]: Leaving directory
>> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
>> chain_ros/typelib/build' make: *** [all] Error 2
>>
>> while compiling it with 'make -j1' always goes fine. Any ideas why this
>>  happens?
>
> Looks like a bug in the target definition or names in the cmake files... Don't
> have a clue...

I've taken a look into the CMake code. The problem is the dyncall
extension for ruby. The CMakeLists.txt there contains customs commands
to extract a tar archive and subsequently configure and build it. I
don't know what exactly happens but the message "make[4]: *** read
jobs pipe: Is a directory. Stop." makes me think it tries to build
the code before extraction is completed.

Steven

>
> Peter
>

Typelib compilation with multiple jobs fails

On Wed, Sep 15, 2010 at 10:55 AM, Steven Bellens <
steven [dot] bellens [..] ...> wrote:

> 2010/9/14 Peter Soetens <peter [..] ...>:
> > On Tuesday 14 September 2010 11:08:01 Steven Bellens wrote:
> >> Hi,
> >>
> >> compiling the typelib package with multiple jobs fails:
> >>
> >> cd build && make -j2
> >> make[1]: Entering directory
> >>
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> >> chain_ros/typelib/build' make[2]: Entering directory
> >>
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> >> chain_ros/typelib/build' make[3]: Entering directory
> >>
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> >> chain_ros/typelib/build' make[3]: Entering directory
> >>
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> >> chain_ros/typelib/build' Scanning dependencies of target dyncall
> >> Scanning dependencies of target typeLib
> >> make[3]: Leaving directory
> >>
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> >> chain_ros/typelib/build' make[3]: Entering directory
> >>
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> >> chain_ros/typelib/build' [ 0%] Generating dyncall-0.3/ConfigVars
> >> make[3]: Leaving directory
> >>
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> >> chain_ros/typelib/build' make[3]: Entering directory
> >>
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> >> chain_ros/typelib/build' [ 2%] Building CXX object
> >> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/registry.o
> >> * configure package dyncall
> >> guess operating system linux
> >> guess arch x64
> >> guess tool gcc
> >> guess assembler as
> >> [ 2%] Generating dyncall/lib/libdyncall_s.a, dyncall/lib/libdynload_s.a
> >> make[4]: Entering directory
> >>
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> >>
> chain_ros/typelib/build/build/orocos-toolchain-typelib/bindings/ruby/dyncal
> >> l-0.3' make[4]: *** read jobs pipe: Is a directory. Stop.
> >> make[4]: *** Waiting for unfinished jobs....
> >> make[5]: Entering directory
> >>
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> >>
> chain_ros/typelib/build/build/orocos-toolchain-typelib/bindings/ruby/dyncal
> >> l-0.3/dyncall' make[5]: *** read jobs pipe: Is a directory. Stop.
> >> make[5]: *** Waiting for unfinished jobs....
> >> make[5]: Leaving directory
> >>
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> >>
> chain_ros/typelib/build/build/orocos-toolchain-typelib/bindings/ruby/dyncal
> >> l-0.3/dyncall' make[4]: *** [dyncall] Error 2
> >> make[4]: Leaving directory
> >>
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> >>
> chain_ros/typelib/build/build/orocos-toolchain-typelib/bindings/ruby/dyncal
> >> l-0.3' make[3]: ***
> >>
> [build/orocos-toolchain-typelib/bindings/ruby/dyncall/lib/libdyncall_s.a]
> >> Error 2
> >> make[3]: Leaving directory
> >>
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> >> chain_ros/typelib/build' make[2]: ***
> >>
> [build/orocos-toolchain-typelib/bindings/ruby/CMakeFiles/dyncall.dir/all]
> >> Error 2
> >> make[2]: *** Waiting for unfinished jobs....
> >> [ 4%] Building CXX object
> >>
> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/typebuilder.o
> >> [ 6%] Building CXX object
> >>
> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/typemodel.o
> >> [ 8%] Building CXX object
> >> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/typename.o
> >> [ 10%] Building CXX object
> >>
> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/typevisitor.o
> >> [ 12%] Building CXX object
> >>
> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/typedisplay.o
> >> [ 14%] Building CXX object
> >> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/exporter.o
> >> [ 16%] Building CXX object
> >>
> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/pluginmanager
> >> .o [ 18%] Building CXX object
> >> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/value.o
> >> [ 20%] Building CXX object
> >> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/importer.o
> >> [ 22%] Building CXX object
> >>
> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/csvoutput.o
> >> [ 24%] Building CXX object
> >>
> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/endianness.o
> >> [ 26%] Building CXX object
> >>
> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/memory_layout
> >> .o [ 28%] Building CXX object
> >>
> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/value_ops.o
> >> Linking CXX shared library ../../../../lib/libtypeLib.so
> >> make[3]: Leaving directory
> >>
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> >> chain_ros/typelib/build' [ 28%] Built target typeLib
> >> make[2]: Leaving directory
> >>
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> >> chain_ros/typelib/build' make[1]: *** [all] Error 2
> >> make[1]: Leaving directory
> >>
> `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_tool
> >> chain_ros/typelib/build' make: *** [all] Error 2
> >>
> >> while compiling it with 'make -j1' always goes fine. Any ideas why this
> >> happens?
> >
> > Looks like a bug in the target definition or names in the cmake files...
> Don't
> > have a clue...
>
> I've taken a look into the CMake code. The problem is the dyncall
> extension for ruby. The CMakeLists.txt there contains customs commands
> to extract a tar archive and subsequently configure and build it. I
> don't know what exactly happens but the message "make[4]: *** read
> jobs pipe: Is a directory. Stop." makes me think it tries to build
> the code before extraction is completed.
>
> Without looking at the code, looks like that there might be a missing
dependency between the untar and build steps. One of the add_custom_commands
signatures has a DEPENDS option [1]. If what you have is targets, you could
get away with add_dependencies(buildTarget untarTarget) [2]

[1]
http://cmake.org/cmake/help/cmake-2-8-docs.html#command:add_custom_command
[2] http://cmake.org/cmake/help/cmake-2-8-docs.html#command:add_dependencies

HTH,

Adolfo

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

Typelib compilation with multiple jobs fails

A Dimecres 15 Setembre 2010, Adolfo Rodríguez Tsouroukdissian va escriure:
> On Wed, Sep 15, 2010 at 10:55 AM, Steven Bellens <
>
> steven [dot] bellens [..] ...> wrote:
> > 2010/9/14 Peter Soetens <peter [..] ...>:
> > > On Tuesday 14 September 2010 11:08:01 Steven Bellens wrote:
> > >> Hi,
> > >>
> > >> compiling the typelib package with multiple jobs fails:
> > >>
> > >> cd build && make -j2
> > >> make[1]: Entering directory
> >
> > `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_to
> >ol
> >
> > >> chain_ros/typelib/build' make[2]: Entering directory
> >
> > `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_to
> >ol
> >
> > >> chain_ros/typelib/build' make[3]: Entering directory
> >
> > `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_to
> >ol
> >
> > >> chain_ros/typelib/build' make[3]: Entering directory
> >
> > `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_to
> >ol
> >
> > >> chain_ros/typelib/build' Scanning dependencies of target dyncall
> > >> Scanning dependencies of target typeLib
> > >> make[3]: Leaving directory
> >
> > `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_to
> >ol
> >
> > >> chain_ros/typelib/build' make[3]: Entering directory
> >
> > `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_to
> >ol
> >
> > >> chain_ros/typelib/build' [ 0%] Generating dyncall-0.3/ConfigVars
> > >> make[3]: Leaving directory
> >
> > `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_to
> >ol
> >
> > >> chain_ros/typelib/build' make[3]: Entering directory
> >
> > `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_to
> >ol
> >
> > >> chain_ros/typelib/build' [ 2%] Building CXX object
> > >> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/registry
> > >>.o * configure package dyncall
> > >> guess operating system linux
> > >> guess arch x64
> > >> guess tool gcc
> > >> guess assembler as
> > >> [ 2%] Generating dyncall/lib/libdyncall_s.a,
> > >> dyncall/lib/libdynload_s.a make[4]: Entering directory
> >
> > `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_to
> >ol
> >
> > chain_ros/typelib/build/build/orocos-toolchain-typelib/bindings/ruby/dync
> >al
> >
> > >> l-0.3' make[4]: *** read jobs pipe: Is a directory. Stop.
> > >> make[4]: *** Waiting for unfinished jobs....
> > >> make[5]: Entering directory
> >
> > `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_to
> >ol
> >
> > chain_ros/typelib/build/build/orocos-toolchain-typelib/bindings/ruby/dync
> >al
> >
> > >> l-0.3/dyncall' make[5]: *** read jobs pipe: Is a directory. Stop.
> > >> make[5]: *** Waiting for unfinished jobs....
> > >> make[5]: Leaving directory
> >
> > `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_to
> >ol
> >
> > chain_ros/typelib/build/build/orocos-toolchain-typelib/bindings/ruby/dync
> >al
> >
> > >> l-0.3/dyncall' make[4]: *** [dyncall] Error 2
> > >> make[4]: Leaving directory
> >
> > `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_to
> >ol
> >
> > chain_ros/typelib/build/build/orocos-toolchain-typelib/bindings/ruby/dync
> >al
> >
> > >> l-0.3' make[3]: ***
> >
> >
> > [build/orocos-toolchain-typelib/bindings/ruby/dyncall/lib/libdyncall_s.a]
> >
> > >> Error 2
> > >> make[3]: Leaving directory
> >
> > `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_to
> >ol
> >
> > >> chain_ros/typelib/build' make[2]: ***
> >
> >
> > [build/orocos-toolchain-typelib/bindings/ruby/CMakeFiles/dyncall.dir/all]
> >
> > >> Error 2
> > >> make[2]: *** Waiting for unfinished jobs....
> > >> [ 4%] Building CXX object
> >
> > build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/typebuilder
> >.o
> >
> > >> [ 6%] Building CXX object
> >
> > build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/typemodel.o
> >
> > >> [ 8%] Building CXX object
> > >> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/typename
> > >>.o [ 10%] Building CXX object
> >
> > build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/typevisitor
> >.o
> >
> > >> [ 12%] Building CXX object
> >
> > build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/typedisplay
> >.o
> >
> > >> [ 14%] Building CXX object
> > >> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/exporter
> > >>.o [ 16%] Building CXX object
> >
> > build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/pluginmanag
> >er
> >
> > >> .o [ 18%] Building CXX object
> > >> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/value.o
> > >> [ 20%] Building CXX object
> > >> build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/importer
> > >>.o [ 22%] Building CXX object
> >
> > build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/csvoutput.o
> >
> > >> [ 24%] Building CXX object
> >
> > build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/endianness.
> >o
> >
> > >> [ 26%] Building CXX object
> >
> > build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/memory_layo
> >ut
> >
> > >> .o [ 28%] Building CXX object
> >
> > build/orocos-toolchain-typelib/typelib/CMakeFiles/typeLib.dir/value_ops.o
> >
> > >> Linking CXX shared library ../../../../lib/libtypeLib.so
> > >> make[3]: Leaving directory
> >
> > `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_to
> >ol
> >
> > >> chain_ros/typelib/build' [ 28%] Built target typeLib
> > >> make[2]: Leaving directory
> >
> > `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_to
> >ol
> >
> > >> chain_ros/typelib/build' make[1]: *** [all] Error 2
> > >> make[1]: Leaving directory
> >
> > `/home/steven/src/svn/cturtle/install/stacks/kul-ros-pkg/stacks/orocos_to
> >ol
> >
> > >> chain_ros/typelib/build' make: *** [all] Error 2
> > >>
> > >> while compiling it with 'make -j1' always goes fine. Any ideas why
> > >> this happens?
> > >
> > > Looks like a bug in the target definition or names in the cmake
> > > files...
> >
> > Don't
> >
> > > have a clue...
> >
> > I've taken a look into the CMake code. The problem is the dyncall
> > extension for ruby. The CMakeLists.txt there contains customs commands
> > to extract a tar archive and subsequently configure and build it. I
> > don't know what exactly happens but the message "make[4]: *** read
> > jobs pipe: Is a directory. Stop." makes me think it tries to build
> > the code before extraction is completed.
> >
> > Without looking at the code, looks like that there might be a missing
>
> dependency between the untar and build steps. One of the
> add_custom_commands signatures has a DEPENDS option [1]. If what you have
> is targets, you could get away with add_dependencies(buildTarget
> untarTarget) [2]
>

looking on the code, I have found the dependencies in the custom commands.

-----------------------------------------------------------
ADD_CUSTOM_COMMAND(OUTPUT ${DYNCALL_SOURCE_DIR}/ConfigVars
COMMAND tar xzf ${CMAKE_CURRENT_SOURCE_DIR}/dyncall-0.3.tar.gz
COMMAND cd ${DYNCALL_SOURCE_DIR}
&& ./configure --prefix=${DYNCALL_INSTALL_DIR}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dyncall-0.3.tar.gz)

ADD_CUSTOM_COMMAND(OUTPUT ${DYNCALL_LIBRARIES}
COMMAND make "CFLAGS=-O3 -fPIC"
COMMAND make install
DEPENDS ${DYNCALL_SOURCE_DIR}/ConfigVars
WORKING_DIRECTORY ${DYNCALL_SOURCE_DIR})

ADD_CUSTOM_TARGET(dyncall DEPENDS ${DYNCALL_LIBRARIES})
-----------------------------------------------------------

I understand that to build dyncall needs DYNCALL_LIBRARIES:
- DYNCALL_LIBRARIES depends on ConfigVars
- and ConfigVars are created with the custom command _after_ tar and after the
configure step (configure creates the ConfigVars file)

So, I don't see any clear error here. Maybe is a cmake bug ....

Regards,

Leo