Bugs: Browse | Submit New | Admin

[#11639] CXX not set and building gem can fail

Date:
2007-06-18 05:38
Priority:
3
Submitted By:
Nobody
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
CXX not set and building gem can fail

Detailed description
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.

Add A Comment: Notepad

Please login


Followup

Message
Date: 2008-07-01 00:56
Sender: James Tucker

Can you confirm if rake build works under the branch at:

http://rubyeventmachine.com/branches/raggi

If not, I will add an explicit munge on CONFIG['CXX'] when it's
undefined, would you also be so kind as to tell me if `which
g++` would provide a suitable value?

Thanks.
Date: 2008-06-27 00:02
Sender: Roger Pack

is this still a problem?
Date: 2008-04-01 17:05
Sender: Glenn Rempe

I can confirm this issue, and the resolution.  See the following
threads for more info on this:

http://groups.google.com/group/thin-ruby/browse_thread/thread/203
6d708fa7e2f4f

http://discuss.joyent.com/viewtopic.php?pid=174588
Date: 2007-06-18 08:00
Sender: Geoff Cheshire

Sorry, I didn't realize I was logged out when I submitted this.
Please feel free to contact me with any questions.

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item