arton / rjb

Ruby Java Bridge
https://www.artonx.org/collabo/backyard/?RubyJavaBridge
GNU Lesser General Public License v2.1
117 stars 34 forks source link

Failure to build on powerpc64le #41

Closed daxtens closed 8 years ago

daxtens commented 8 years ago

Hi,

I'm getting a failure trying to install the gem on a powerpc64le system. The output of gem install rjb is:

Building native extensions.  This could take a while...
ERROR:  Error installing rjb:
        ERROR: Failed to build gem native extension.

    /usr/local/rvm/rubies/ruby-2.2.2/bin/ruby -r ./siteconf20160226-79-1y61yr0.rb extconf.rb
checking for jni.h... yes
checking for locale_charset() in iconv.h... no
checking for nl_langinfo() in langinfo.h... yes
checking for setlocale() in locale.h... yes
checking for getenv()... yes
creating extconf.h
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling riconv.c
compiling load.c
load.c:82:30: fatal error: sys/systeminfo.h: No such file or directory
compilation terminated.
Makefile:237: recipe for target 'load.o' failed
make: *** [load.o] Error 1

make failed, exit code 2

Gem files will remain installed in /usr/local/rvm/gems/ruby-2.2.2/gems/rjb-1.5.4 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.2.2/extensions/powerpc64le-linux/2.2.0/rjb-1.5.4/gem_make.out

It looks like sys/syteminfo.h isn't a header on powerpc, so that might be part of the reason. I'm not sure what you're trying to do with that header, but I'd be more than happy to help figure out what the powerpc equivalent would be.

arton commented 8 years ago

Hi

Rjb should know the system architecture for loading JVM. And many system that does not define ARCH by its compiler, has sys/systeminfo.h. Therefore Rjb need that information. You have a chance to fix it, asking C people what macro is supplied by the compiler and what is the location of the jvm showing rjb/ext/load.c line.38 to 84, and create pull request.

Because I have no clue for powerpc linux, I must close this issue. Best regards.