Amanda Waite wrote:
> CXX is implicitly set to 'g++' on OpenSolaris boxes when using gmake 
> or /usr/gnu/bin/make. eventmachine calls 'make' and so on OpenSolaris, 
> if /usr/gnu/bin is in the PATH and before /usr/ccs/bin it will build 
> ok without the need to set environment variables. That's what we have 
> for OpenSolaris.
>
> On Nevada/Solaris, there is no /usr/gnu/bin/make and so you have to 
> set CXX by hand or build with gmake.  For a predictable environment 
> like Solaris it may be possible to coerce CXX to be set to 
> /usr/sfw/bin/g++ when building gems. Usually we install EventMachine 
> like this:
>
> CXX=/usr/sfw/bin/g++ gem install eventmachine
>
> Which I'm sure one of us has blogged about. You can force it to be set 
> it in rbconfig.rb with ENV["CXX"] = "/usr/sfw/bin/g++" (at the end of 
> the file) but there is no specific CXX variable in rbconfig.rb.

First, thanks for your hints.

AFAICT, none of the 150 most popular gems use GNU make features; there's 
just that side-effect of GNU make's idea of CXX.

This is a little less straightforward than I might have expected.  How 
should we document it for the OpenSolaris Web Stack?

"The installation of Ruby native extensions requires the SUNWgcc 
package.  gem is preconfigured to use gcc for C language extensions.  
Set the CXX environment variable to /usr/sfw/bin/g++ when installing C++ 
language extensions, such as eventmachine and thin.

Example:

# CXX=/usr/sfw/bin/g++ gem install eventmachine

--/--

When this issue was encountered previously, was it considered more 
proper to

1) install SUNWgmake and adjust the path
2) set CXX
3) make rbconfig work out of the box

(I'm not getting a read on how you think it should work.)


Reply via email to