Typelib fails to compile using Ruby 1.9.2

Hi,

I'm using Ruby 1.9.2 and when I compile typelib master (using clang on OSX
10.8) I get the following error:

[ 72%] Building CXX object
bindings/ruby/CMakeFiles/typelib_ruby.dir/ext/memory.o
/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:35:8:
error: unknown type
name 'st_index_t'
static st_index_t memory_table_hash(void* a)
^
/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:39:13:
error: use of
undeclared identifier 'st_index_t'
return (st_index_t)a;
^
/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:45:19:
error: expected
expression
(st_index_t (*)(...))memory_table_hash
^
/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:45:21:
error: expected
expression
(st_index_t (*)(...))memory_table_hash
^
/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:43:28:
error: variable has
incomplete type 'struct st_hash_type'
static struct st_hash_type memory_table_type = {
^
/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:43:15:
note: forward
declaration of 'st_hash_type'
static struct st_hash_type memory_table_type = {
^
/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:119:33:
error: use of
undeclared identifier 'st_data_t'
if (st_lookup(MemoryTable, (st_data_t)ptr, (st_data_t*)&entry))
^
/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:146:34:
error: use of
undeclared identifier 'st_data_t'
if (!st_lookup(MemoryTable, (st_data_t)ptr, (st_data_t*)&entry))
^
/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:160:33:
error: use of
undeclared identifier 'st_data_t'
st_delete(MemoryTable, (st_data_t*)&ptr, 0);
^
/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:160:43:
error: expected
expression
st_delete(MemoryTable, (st_data_t*)&ptr, 0);
^
/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:200:34:
error: use of
undeclared identifier 'st_data_t'
if (!st_lookup(MemoryTable, (st_data_t)ptr, (st_data_t*)&entry)) {
^
/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:221:33:
error: use of
undeclared identifier 'st_data_t'
st_insert(MemoryTable, (st_data_t)ptr, (st_data_t)entry);
^
/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:226:42:
error: use of
undeclared identifier 'st_data_t'
if (!st_lookup(MemoryTable, (st_data_t)root_ptr,
(st_data_t*)&root_entry))
^
/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:369:31:
error: member access
into incomplete type 'st_table'
return INT2NUM(MemoryTable->num_entries);
^
/System/Library/Frameworks/Ruby.framework/Headers/ruby.h:147:32: note:
expanded from macro 'INT2NUM'
#define INT2NUM(v) rb_int2inum(v)
^
/System/Library/Frameworks/Ruby.framework/Headers/ruby.h:335:12: note:
forward declaration of 'st_table'
struct st_table *iv_tbl;

Ruben

Typelib fails to compile using Ruby 1.9.2

On 09/11/2013 11:50 AM, Ruben Smits wrote:
> Hi,
>
> I'm using Ruby 1.9.2 and when I compile typelib master (using clang on
> OSX 10.8) I get the following error:
What do you use to build it ? ros or autoproj ?

In any case, please pass the RUBY_EXECUTABLE=/full/path/to/ruby variable
to cmake to make sure that the build uses the "right" ruby version (and
not one that is lying around)

Ruben Smits's picture

Typelib fails to compile using Ruby 1.9.2

Hi Sylvain,

On Fri, Nov 15, 2013 at 11:20 AM, Sylvain Joyeux <sylvain [dot] joyeux [..] ...> wrote:
> On 09/11/2013 11:50 AM, Ruben Smits wrote:
>> Hi,
>>
>> I'm using Ruby 1.9.2 and when I compile typelib master (using clang on
>> OSX 10.8) I get the following error:
> What do you use to build it ? ros or autoproj ?

I was using catkin(not rosbuild!!!) in a plain cmake fashion
(catkin_make_isolated)

> In any case, please pass the RUBY_EXECUTABLE=/full/path/to/ruby variable
> to cmake to make sure that the build uses the "right" ruby version (and
> not one that is lying around)

I currently fixed it by not using master and branched of the
toolchain-2.6 branch which was still working.

Ruben

> --
> Sylvain Joyeux (Dr.Ing.)
> Senior Researcher
>
> Space & Security Robotics
> Underwater Robotics
>
> !!! Achtung, neue Telefonnummer!!!
>
> Standort Bremen:
> DFKI GmbH
> Robotics Innovation Center
> Robert-Hooke-Straße 5
> 28359 Bremen, Germany
>
> Phone: +49 (0)421 178-454136
> Fax: +49 (0)421 218-454150
> E-Mail: robotik [..] ...
>
> Weitere Informationen: http://www.dfki.de/robotik
> -----------------------------------------------------------------------
> Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
> Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
> Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
> (Vorsitzender) Dr. Walter Olthoff
> Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
> Amtsgericht Kaiserslautern, HRB 2313
> Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
> USt-Id.Nr.: DE 148646973
> Steuernummer: 19/673/0060/3
> -----------------------------------------------------------------------
>

Typelib fails to compile using Ruby 1.9.2

It seems zipped and git sources have different behavior/content. In version using autoproj boostrap process creates local .gems which is also used in env.sh, but the one from git repo and using ros still has the same env.sh and pointing to non existent local .gems.  I guess it assumes system wide gem location. I just put all gems under orocos_toolchain/.gems and it seems to work then. Everything I mentioned relates to toolchain-2.5

On Friday, November 15, 2013 11:24 AM, Ruben Smits <ruben [dot] smits [..] ...> wrote:

Hi Sylvain,

On Fri, Nov 15, 2013 at 11:20 AM, Sylvain Joyeux <sylvain [dot] joyeux [..] ...> wrote:
> On 09/11/2013 11:50 AM, Ruben Smits wrote:
>> Hi,
>>
>> I'm using Ruby 1.9.2 and when I compile typelib master (using clang on
>> OSX 10.8) I get the following error:
> What do you use to build it ? ros or autoproj ?

I was using catkin(not rosbuild!!!) in a plain cmake fashion
(catkin_make_isolated)

> In any case, please pass the RUBY_EXECUTABLE=/full/path/to/ruby variable
> to cmake to make sure that the build uses the "right" ruby version (and
> not one that is lying around)

I currently fixed it by not using master and branched of the
toolchain-2.6 branch which was still working.

Ruben

> --
> Sylvain Joyeux (Dr.Ing.)
> Senior Researcher
>
> Space & Security Robotics
> Underwater Robotics
>
> !!! Achtung, neue Telefonnummer!!!
>
> Standort Bremen:
> DFKI GmbH
> Robotics Innovation Center
> Robert-Hooke-Straße 5
> 28359 Bremen, Germany
>
> Phone: +49 (0)421 178-454136
> Fax:  +49 (0)421 218-454150
> E-Mail: robotik [..] ...
>
> Weitere Informationen: http://www.dfki.de/robotik
> -----------------------------------------------------------------------
> Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
> Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
> Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
> (Vorsitzender) Dr. Walter Olthoff
> Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
> Amtsgericht Kaiserslautern, HRB 2313
> Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
> USt-Id.Nr.:    DE 148646973
> Steuernummer:  19/673/0060/3
> -----------------------------------------------------------------------
>

Ruben Smits's picture

Typelib fails to compile using Ruby 1.9.2

Using Ruby 1.9.3 I get the following error:

[ 81%] Building CXX object
bindings/ruby/CMakeFiles/typelib_ruby.dir/ext/memory.o
/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:45:5:
error: cannot
initialize a member subobject of type 'int (*)()' with an rvalue of
type 'int (*)(...)'
(int (*)(...))memory_table_compare,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:46:5:
error: cannot
initialize a member subobject of type 'int (*)()' with an rvalue of
type 'st_index_t (*)(...)':
different return type ('int' vs 'st_index_t' (aka 'long'))
(st_index_t (*)(...))memory_table_hash
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.

Ruben

On Wed, Sep 11, 2013 at 11:50 AM, Ruben Smits
<ruben [dot] smits [..] ...>wrote:

> Hi,
>
> I'm using Ruby 1.9.2 and when I compile typelib master (using clang on OSX
> 10.8) I get the following error:
>
> [ 72%] Building CXX object
> bindings/ruby/CMakeFiles/typelib_ruby.dir/ext/memory.o
> /Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:35:8:
> error: unknown type
> name 'st_index_t'
> static st_index_t memory_table_hash(void* a)
> ^
> /Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:39:13:
> error: use of
> undeclared identifier 'st_index_t'
> return (st_index_t)a;
> ^
> /Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:45:19:
> error: expected
> expression
> (st_index_t (*)(...))memory_table_hash
> ^
> /Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:45:21:
> error: expected
> expression
> (st_index_t (*)(...))memory_table_hash
> ^
> /Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:43:28:
> error: variable has
> incomplete type 'struct st_hash_type'
> static struct st_hash_type memory_table_type = {
> ^
> /Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:43:15:
> note: forward
> declaration of 'st_hash_type'
> static struct st_hash_type memory_table_type = {
> ^
> /Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:119:33:
> error: use of
> undeclared identifier 'st_data_t'
> if (st_lookup(MemoryTable, (st_data_t)ptr, (st_data_t*)&entry))
> ^
> /Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:146:34:
> error: use of
> undeclared identifier 'st_data_t'
> if (!st_lookup(MemoryTable, (st_data_t)ptr, (st_data_t*)&entry))
> ^
> /Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:160:33:
> error: use of
> undeclared identifier 'st_data_t'
> st_delete(MemoryTable, (st_data_t*)&ptr, 0);
> ^
> /Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:160:43:
> error: expected
> expression
> st_delete(MemoryTable, (st_data_t*)&ptr, 0);
> ^
> /Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:200:34:
> error: use of
> undeclared identifier 'st_data_t'
> if (!st_lookup(MemoryTable, (st_data_t)ptr, (st_data_t*)&entry)) {
> ^
> /Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:221:33:
> error: use of
> undeclared identifier 'st_data_t'
> st_insert(MemoryTable, (st_data_t)ptr, (st_data_t)entry);
> ^
> /Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:226:42:
> error: use of
> undeclared identifier 'st_data_t'
> if (!st_lookup(MemoryTable, (st_data_t)root_ptr,
> (st_data_t*)&root_entry))
> ^
> /Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:369:31:
> error: member access
> into incomplete type 'st_table'
> return INT2NUM(MemoryTable->num_entries);
> ^
> /System/Library/Frameworks/Ruby.framework/Headers/ruby.h:147:32: note:
> expanded from macro 'INT2NUM'
> #define INT2NUM(v) rb_int2inum(v)
> ^
> /System/Library/Frameworks/Ruby.framework/Headers/ruby.h:335:12: note:
> forward declaration of 'st_table'
> struct st_table *iv_tbl;
>
> Ruben
>
> --
> Ruben Smits, Phd
> Chief Technology Officer
> Intermodalics BVBA
> +32479511786
> www.intermodalics.eu
>

Typelib fails to compile using Ruby 1.9.2

Hi Ruben,
did you resolve this issue? After doing upgrade to Debian 7.2 with gcc 4.7 and ruby1.9.1
I get the same error. I have  2.6. toolchain with electric. Also GEM_HOME is pointing to .gem which is not existent.
With ruby1.8.6 the error is different

 rake setup[-DOROCOS_TARGET=]
  Using the crusty system installed rake... you probably want to upgrade
  WARN: cannot load RDoc, documentation generation disabled
  WARN:   no such file to load -- rdoc/task
  cannot load oroGen
    did you install Typelib's Ruby bindings and update the RUBYLIB environment variable accordingly ?
    did you add /home/azamat/programming/ros-electric/orocos_toolchain/orogen/lib to RUBYLIB ?
  the error is: no such file to load -- facets/string/camelcase
    /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
    /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require'
    /home/azamat/programming/ros-electric/orocos_toolchain/typelib/bindings/ruby/lib/typelib.rb:8
    /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
    /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require'
    /home/azamat/programming/ros-electric/orocos_toolchain/orogen/Rakefile:6
    /usr/lib/ruby/vendor_ruby/rake/task.rb:205:in `call'
    /usr/lib/ruby/vendor_ruby/rake/task.rb:205:in `execute'
    /usr/lib/ruby/vendor_ruby/rake/task.rb:200:in `each'
    /usr/lib/ruby/vendor_ruby/rake/task.rb:200:in `execute'
    /usr/lib/ruby/vendor_ruby/rake/task.rb:158:in `invoke_with_call_chain'
    /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
    /usr/lib/ruby/vendor_ruby/rake/task.rb:151:in `invoke_with_call_chain'
    /usr/lib/ruby/vendor_ruby/rake/task.rb:144:in `invoke'
    /usr/lib/ruby/vendor_ruby/rake/application.rb:116:in `invoke_task'
    /usr/lib/ruby/vendor_ruby/rake/application.rb:94:in `top_level'
    /usr/lib/ruby/vendor_ruby/rake/application.rb:94:in `each'
    /usr/lib/ruby/vendor_ruby/rake/application.rb:94:in `top_level'
    /usr/lib/ruby/vendor_ruby/rake/application.rb:133:in `standard_exception_handling'
    /usr/lib/ruby/vendor_ruby/rake/application.rb:88:in `top_level'
    /usr/lib/ruby/vendor_ruby/rake/application.rb:66:in `run'
    /usr/lib/ruby/vendor_ruby/rake/application.rb:133:in `standard_exception_handling'
    /usr/lib/ruby/vendor_ruby/rake/application.rb:63:in `run'
    /usr/bin/rake:27

the env value is

RUBYOPT=-rubygems
RUBYLIB=/home/azamat/programming/ros-electric/orocos_toolchain/utilrb/lib:/home/azamat/programming/ros-electric/orocos_toolchain/orogen/lib:/home/azamat/programming/ros-electric/orocos_toolchain/install/lib/ruby/1.8/i486-linux:/home/azamat/programming/ros-electric/orocos_toolchain/install/lib/ruby/1.8

Sylvain, any idea?

Sincerely
Azamat

________________________________
From: Ruben Smits <ruben [dot] smits [..] ...>
To: "orocos-dev [..] ..." <orocos-dev [..] ...>
Sent: Wednesday, September 11, 2013 1:52 PM
Subject: Re: [Orocos-Dev] Typelib fails to compile using Ruby 1.9.2

Using Ruby 1.9.3 I get the following error:

[ 81%] Building CXX object bindings/ruby/CMakeFiles/typelib_ruby.dir/ext/memory.o
/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:45:5: error: cannot
      initialize a member subobject of type 'int (*)()' with an rvalue of type 'int (*)(...)'
    (int (*)(...))memory_table_compare,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:46:5: error: cannot
      initialize a member subobject of type 'int (*)()' with an rvalue of type 'st_index_t (*)(...)':
      different return type ('int' vs 'st_index_t' (aka 'long'))
    (st_index_t (*)(...))memory_table_hash
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.

Ruben

On Wed, Sep 11, 2013 at 11:50 AM, Ruben Smits <ruben [dot] smits [..] ...> wrote:

Hi,
>
>
>I'm using Ruby 1.9.2 and when I compile typelib master (using clang on OSX 10.8) I get the following error:
>
>
>[ 72%] Building CXX object bindings/ruby/CMakeFiles/typelib_ruby.dir/ext/memory.o
>/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:35:8: error: unknown type
>      name 'st_index_t'
>static st_index_t memory_table_hash(void* a)
>       ^
>/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:39:13: error: use of
>      undeclared identifier 'st_index_t'
>    return (st_index_t)a;
>            ^
>/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:45:19: error: expected
>      expression
>    (st_index_t (*)(...))memory_table_hash
>                  ^
>/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:45:21: error: expected
>      expression
>    (st_index_t (*)(...))memory_table_hash
>                    ^
>/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:43:28: error: variable has
>      incomplete type 'struct st_hash_type'
>static struct st_hash_type memory_table_type = {
>                           ^
>/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:43:15: note: forward
>      declaration of 'st_hash_type'
>static struct st_hash_type memory_table_type = {
>              ^
>/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:119:33: error: use of
>      undeclared identifier 'st_data_t'
>    if (st_lookup(MemoryTable, (st_data_t)ptr, (st_data_t*)&entry))
>                                ^
>/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:146:34: error: use of
>      undeclared identifier 'st_data_t'
>    if (!st_lookup(MemoryTable, (st_data_t)ptr, (st_data_t*)&entry))
>                                 ^
>/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:160:33: error: use of
>      undeclared identifier 'st_data_t'
>        st_delete(MemoryTable, (st_data_t*)&ptr, 0);
>                                ^
>/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:160:43: error: expected
>      expression
>        st_delete(MemoryTable, (st_data_t*)&ptr, 0);
>                                          ^
>/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:200:34: error: use of
>      undeclared identifier 'st_data_t'
>    if (!st_lookup(MemoryTable, (st_data_t)ptr, (st_data_t*)&entry)) {
>                                 ^
>/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:221:33: error: use of
>      undeclared identifier 'st_data_t'
>        st_insert(MemoryTable, (st_data_t)ptr, (st_data_t)entry);
>                                ^
>/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:226:42: error: use of
>      undeclared identifier 'st_data_t'
>            if (!st_lookup(MemoryTable, (st_data_t)root_ptr, (st_data_t*)&root_entry))
>                                         ^
>/Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:369:31: error: member access
>      into incomplete type 'st_table'
>    return INT2NUM(MemoryTable->num_entries);
>                              ^
>/System/Library/Frameworks/Ruby.framework/Headers/ruby.h:147:32: note: expanded from macro 'INT2NUM'
>#define INT2NUM(v) rb_int2inum(v)
>                               ^
>/System/Library/Frameworks/Ruby.framework/Headers/ruby.h:335:12: note: forward declaration of 'st_table'
>    struct st_table *iv_tbl;
>
>
>Ruben
>

Typelib fails to compile using Ruby 1.9.2

On 11/13/2013 03:24 PM, Azamat Shakhimardanov wrote:
> Hi Ruben,
> did you resolve this issue? After doing upgrade to Debian 7.2 with gcc
> 4.7 and ruby1.9.1
> I get the same error. I have 2.6. toolchain with electric. Also
> GEM_HOME is pointing to .gem which is not existent.
> With ruby1.8.6 the error is different
>
>
> rake setup[-DOROCOS_TARGET=]
> Using the crusty system installed rake... you probably want to upgrade
> WARN: cannot load RDoc, documentation generation disabled
> WARN: no such file to load -- rdoc/task
> cannot load oroGen
> did you install Typelib's Ruby bindings and update the RUBYLIB
> environment variable accordingly ?
> did you add
> /home/azamat/programming/ros-electric/orocos_toolchain/orogen/lib to
> RUBYLIB ?
> the error is: no such file to load -- facets/string/camelcase
This 100% looks like a missing gem, which is therefore probably related
to GEM_HOME pointing to the wong place.

Typelib fails to compile using Ruby 1.9.2

Morgning,
I had the same problem on two machines in the past, Unfortunately i
could not resolve the issue, a deletion of the build server and
rebuilding typelib solved the issue. It seem's some part injecting a
wrong ruby version here :-(
Could you please verify to which ruby version your system "ruby" and
"gem" points?.
if you running a debian variant please try to use update-alternatives to
update the links to the current version.
autoproj installations should not depend on that but the but is anyhow
related to this....

Greetings,
Matthias

On 13.11.2013 15:24, Azamat Shakhimardanov wrote:
> Hi Ruben,
> did you resolve this issue? After doing upgrade to Debian 7.2 with gcc
> 4.7 and ruby1.9.1
> I get the same error. I have 2.6. toolchain with electric. Also
> GEM_HOME is pointing to .gem which is not existent.
> With ruby1.8.6 the error is different
>
>
> rake setup[-DOROCOS_TARGET=]
> Using the crusty system installed rake... you probably want to upgrade
> WARN: cannot load RDoc, documentation generation disabled
> WARN: no such file to load -- rdoc/task
> cannot load oroGen
> did you install Typelib's Ruby bindings and update the RUBYLIB
> environment variable accordingly ?
> did you add
> /home/azamat/programming/ros-electric/orocos_toolchain/orogen/lib to
> RUBYLIB ?
> the error is: no such file to load -- facets/string/camelcase
> /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in
> `gem_original_require'
> /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in
> `require'
>
> /home/azamat/programming/ros-electric/orocos_toolchain/typelib/bindings/ruby/lib/typelib.rb:8
> /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in
> `gem_original_require'
> /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in
> `require'
>
> /home/azamat/programming/ros-electric/orocos_toolchain/orogen/Rakefile:6
> /usr/lib/ruby/vendor_ruby/rake/task.rb:205:in `call'
> /usr/lib/ruby/vendor_ruby/rake/task.rb:205:in `execute'
> /usr/lib/ruby/vendor_ruby/rake/task.rb:200:in `each'
> /usr/lib/ruby/vendor_ruby/rake/task.rb:200:in `execute'
> /usr/lib/ruby/vendor_ruby/rake/task.rb:158:in `invoke_with_call_chain'
> /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
> /usr/lib/ruby/vendor_ruby/rake/task.rb:151:in `invoke_with_call_chain'
> /usr/lib/ruby/vendor_ruby/rake/task.rb:144:in `invoke'
> /usr/lib/ruby/vendor_ruby/rake/application.rb:116:in `invoke_task'
> /usr/lib/ruby/vendor_ruby/rake/application.rb:94:in `top_level'
> /usr/lib/ruby/vendor_ruby/rake/application.rb:94:in `each'
> /usr/lib/ruby/vendor_ruby/rake/application.rb:94:in `top_level'
> /usr/lib/ruby/vendor_ruby/rake/application.rb:133:in
> `standard_exception_handling'
> /usr/lib/ruby/vendor_ruby/rake/application.rb:88:in `top_level'
> /usr/lib/ruby/vendor_ruby/rake/application.rb:66:in `run'
> /usr/lib/ruby/vendor_ruby/rake/application.rb:133:in
> `standard_exception_handling'
> /usr/lib/ruby/vendor_ruby/rake/application.rb:63:in `run'
> /usr/bin/rake:27
>
> the env value is
> RUBYOPT=-rubygems
> RUBYLIB=/home/azamat/programming/ros-electric/orocos_toolchain/utilrb/lib:/home/azamat/programming/ros-electric/orocos_toolchain/orogen/lib:/home/azamat/programming/ros-electric/orocos_toolchain/install/lib/ruby/1.8/i486-linux:/home/azamat/programming/ros-electric/orocos_toolchain/install/lib/ruby/1.8
>
> Sylvain, any idea?
>
> Sincerely
> Azamat
> ------------------------------------------------------------------------
> *From:* Ruben Smits <ruben [dot] smits [..] ...>
> *To:* "orocos-dev [..] ..."
> <orocos-dev [..] ...>
> *Sent:* Wednesday, September 11, 2013 1:52 PM
> *Subject:* Re: [Orocos-Dev] Typelib fails to compile using Ruby 1.9.2
>
> Using Ruby 1.9.3 I get the following error:
>
> [ 81%] Building CXX object
> bindings/ruby/CMakeFiles/typelib_ruby.dir/ext/memory.o
> /Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:45:5:
> error: cannot
> initialize a member subobject of type 'int (*)()' with an rvalue
> of type 'int (*)(...)'
> (int (*)(...))memory_table_compare,
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:46:5:
> error: cannot
> initialize a member subobject of type 'int (*)()' with an rvalue
> of type 'st_index_t (*)(...)':
> different return type ('int' vs 'st_index_t' (aka 'long'))
> (st_index_t (*)(...))memory_table_hash
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 2 errors generated.
>
> Ruben
>
>
> On Wed, Sep 11, 2013 at 11:50 AM, Ruben Smits
> <ruben [dot] smits [..] ... <mailto:ruben [dot] smits [..] ...>>
> wrote:
>
> Hi,
>
> I'm using Ruby 1.9.2 and when I compile typelib master (using
> clang on OSX 10.8) I get the following error:
>
> [ 72%] Building CXX object
> bindings/ruby/CMakeFiles/typelib_ruby.dir/ext/memory.o
> /Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:35:8:
> error: unknown type
> name 'st_index_t'
> static st_index_t memory_table_hash(void* a)
> ^
> /Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:39:13:
> error: use of
> undeclared identifier 'st_index_t'
> return (st_index_t)a;
> ^
> /Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:45:19:
> error: expected
> expression
> (st_index_t (*)(...))memory_table_hash
> ^
> /Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:45:21:
> error: expected
> expression
> (st_index_t (*)(...))memory_table_hash
> ^
> /Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:43:28:
> error: variable has
> incomplete type 'struct st_hash_type'
> static struct st_hash_type memory_table_type = {
> ^
> /Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:43:15:
> note: forward
> declaration of 'st_hash_type'
> static struct st_hash_type memory_table_type = {
> ^
> /Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:119:33:
> error: use of
> undeclared identifier 'st_data_t'
> if (st_lookup(MemoryTable, (st_data_t)ptr, (st_data_t*)&entry))
> ^
> /Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:146:34:
> error: use of
> undeclared identifier 'st_data_t'
> if (!st_lookup(MemoryTable, (st_data_t)ptr, (st_data_t*)&entry))
> ^
> /Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:160:33:
> error: use of
> undeclared identifier 'st_data_t'
> st_delete(MemoryTable, (st_data_t*)&ptr, 0);
> ^
> /Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:160:43:
> error: expected
> expression
> st_delete(MemoryTable, (st_data_t*)&ptr, 0);
> ^
> /Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:200:34:
> error: use of
> undeclared identifier 'st_data_t'
> if (!st_lookup(MemoryTable, (st_data_t)ptr, (st_data_t*)&entry)) {
> ^
> /Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:221:33:
> error: use of
> undeclared identifier 'st_data_t'
> st_insert(MemoryTable, (st_data_t)ptr, (st_data_t)entry);
> ^
> /Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:226:42:
> error: use of
> undeclared identifier 'st_data_t'
> if (!st_lookup(MemoryTable, (st_data_t)root_ptr,
> (st_data_t*)&root_entry))
> ^
> /Users/vm/orocos_ws/src/orocos_toolchain/typelib/bindings/ruby/ext/memory.cc:369:31:
> error: member access
> into incomplete type 'st_table'
> return INT2NUM(MemoryTable->num_entries);
> ^
> /System/Library/Frameworks/Ruby.framework/Headers/ruby.h:147:32:
> note: expanded from macro 'INT2NUM'
> #define INT2NUM(v) rb_int2inum(v)
> ^
> /System/Library/Frameworks/Ruby.framework/Headers/ruby.h:335:12:
> note: forward declaration of 'st_table'
> struct st_table *iv_tbl;
>
> Ruben
>
> --
> Ruben Smits, Phd
> Chief Technology Officer
> Intermodalics BVBA
> +32479511786
> www.intermodalics.eu <http://www.intermodalics.eu/>
>
>
>
>