Re: Typelib fails to compile using Ruby 1.9.2

Matthias Goldhoorn <[email protected]>
Newsgroups gmane.science.robotics.orocos.devel
Organization University of Bremen
Message-ID <[email protected]>
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 <[email protected]>
> *To:* "[email protected]" 
> <[email protected]>
> *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 
> <[email protected] <mailto:[email protected]>> 
> 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/>
>
>
>
>
> -- 
> Ruben Smits, Phd
> Chief Technology Officer
> Intermodalics BVBA
> +32479511786
> www.intermodalics.eu <http://www.intermodalics.eu/>
>
> -- 
> Orocos-Dev mailing list
> [email protected] 
> <mailto:[email protected]>
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
>
>
>
>


-- 
  Dipl.-Inf. Matthias Goldhoorn
  Space and Underwater Robotic

  Universität Bremen
  FB 3 - Mathematik und Informatik
  AG Robotik
  Robert-Hooke-Straße 5
  28359 Bremen, Germany

  Tel.:     +49 421 178 45-4193
  Zentrale: +49 421 178 45-6550
  Fax:      +49 421 178 45-4150
  E-Mail:   [email protected]

  Weitere Informationen: http://www.informatik.uni-bremen.de/robotik

-- 
Orocos-Dev mailing list
[email protected]
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.