How do I get mkmf to use gcc instead of /opt/SUNWspro/bin/cc on Solaris 10?
I am trying to install chef using gem install chef. It is failing with:
Building native extensions. This could take a while...
ERROR: Error installing chef:
ERROR: Failed to build gem native extension.
/opt/csw/bin/ruby18 extconf.rb
creating Makefile
make
/opt/SUNWspro/bin/cc -I. -I/opt/csw/lib/ruby/1.8/i386-solaris2.9 -I/opt/csw/lib/ruby/1.8 /i386-solaris2.9 -I. -I/opt/csw/include -D_FILE_OFFSET_BITS=64 -KPIC -xO3 -m32 -xarch=386 -KPIC -Wall -funroll-loops -c yajl.c
make: /opt/SUNWspro/bin/cc: Command not found
make: *** [yajl.o] Error 127
Gem files will remain installed in /opt/csw/lib/ruby/gems/1.8/gems/yajl-ruby-0.8.2 for inspection.
Results logged to /opt/csw/lib/ruby/gems/1.8/gems/yajl-ruby-0.8.2/ext/yajl/gem_make.out
Examining /opt/csw/lib/ruby/gems/1.8/gems/yajl-ruby-0.8.2/ext/yajl/Makefile gives:
CC = /opt/SUNWspro/bin/cc
Crucially, setting the CC environment variable to gcc does absolutely nothing.
Cross posted from StackOverflow