This bug was discovered after the inability to compile the eventmachine gem on OpenSolaris. When the makefile
is generated,
CXX is never set, and the compiler flags are run as sh commands.
The solution is as follows.
In (...)/lib/ruby/1.8/(platform)/rbconfig.rb, under the CONFIG["CPP"] = line, CXX should be set. E.g.,
CONFIG["CXX"] = "/usr/sfw/bin/g++"
In (...)/lib/ruby/1.8/mkmf.rb under the CC = line add:
CXX = #{CONFIG['CXX']}
This will allow the C++ compiler to be properly set in the makefile. We found gmake can mask this problem, which is
why
we noticed the problem on Solaris (which was calling Sun's make during the build process).
This was reported as a bug to Ruby itself. It was closed as follows:
Date: 2007-06-18 01:10
Sender: Nobuyoshi Nakada
Extension libraries in C++ has not been supported in 1.8. |