Question

I managed to compile ruby 2.0.0 on aix in 64 bit mode and now I am trying to get my swig wrapper around a c++ class to work.

After compiling ruby, make test comes back clean and indeed ruby seems to be running fine. Next step was to compile the extension.

pointing to my new ruby install I created an extconf.rb with the following:

require 'mkmf'
create_makefile('wv')

wv being the name of the module. then I ran

make
make install 

which ran clean. but when I run

ruby -e "require 'wv'" 

I get the following traceback.

/blah/blah/ruby/aix/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in `require': load failed - /blah/blah/ruby/aix/lib/ruby/site_ruby/2.0.0/powerpc-aix6.1.0.0/wv.so. Not enough space[loadquery failed] (LoadError)

BTW, I when I used the same swig generated cxx file and followed the same procedure on linux , everything works fine.

Any idea's on were to begin to figure out what is broken?

Was it helpful?

Solution

When require fails for any reason other than "no such file", you need to dig deeper. In my case the issue was not related to space at all. In my case the issue was not space but the fact that , while the shared object file could be located, it did not load properly. The extension attempted to link to an incompatible library. The extension was compiled using g++, while the library was compiled using xlC. The mangled names of the two libraries were incompatible. recompiling the library using g++ solved the problem

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top