Question: hava_header from mkmf throws an error in Jruby


hava_header from mkmf throws an error in Jruby

Answers 0
Added at 2016-12-22 10:12

I have this test code :

require 'mkmf'

puts have_header("iostream.h")

this code throws an error in Jruby like this :

checking for iostream.h... RuntimeError: The compiler failed to generate an executable file. You have to install development tools first.

try_do at /home/abd/.rvm/rubies/jruby- try_cpp at /home/abd/.rvm/rubies/jruby-
block in have_header at /home/abd/.rvm/rubies/jruby-
block in checking_for at /home/abd/.rvm/rubies/jruby- block in postpone at /home/abd/.rvm/rubies/jruby- open at /home/abd/.rvm/rubies/jruby- block in postpone at /home/abd/.rvm/rubies/jruby- open at /home/abd/.rvm/rubies/jruby- postpone at /home/abd/.rvm/rubies/jruby- checking_for at /home/abd/.rvm/rubies/jruby- have_header at /home/abd/.rvm/rubies/jruby- at test.rb:3

I have no idea what does it mean by development tools and I searched the internet without finding anything about this.

I installed Jruby through rvm, this is my java version :

[abd@abd testruby]$ java -version
openjdk version "1.8.0_112"
OpenJDK Runtime Environment (build 1.8.0_112-b15)
OpenJDK 64-Bit Server VM (build 25.112-b15, mixed mode)

I'm using Arch linux here.

The real reason behind my question is that I tried installing gmp gem and native extensions wouldn't build because of the same error, I know the gem is unmaintained but I want to resolve this issue anyway because the above message suggests that my installation is lacking.

By the way I have the jdk, not just the jre.

Source Show
◀ Wstecz