hpricot on my Solaris x-86 box. cc bad , gcc good

H

HoboHoward

Dear List,

I want to install hpricot on my Solaris x-86 box.

The makefile generated by the hpricot-installer wants me to use the
'cc' c-compiler.

I dont have 'cc'.

I have 'gcc'.

Is it possible for me to force the hpricot-installer to use my copy of
gcc ??

Here is a screen dump of my installation attempt:

14 bash-14:31:27-sol:/opt/csw/lib/ruby/gems/1.8/cache root#
14 bash-14:31:28-sol:/opt/csw/lib/ruby/gems/1.8/cache root# pwd
/opt/csw/lib/ruby/gems/1.8/cache
15 bash-14:31:30-sol:/opt/csw/lib/ruby/gems/1.8/cache root#
15 bash-14:31:30-sol:/opt/csw/lib/ruby/gems/1.8/cache root#
15 bash-14:31:30-sol:/opt/csw/lib/ruby/gems/1.8/cache root#
15 bash-14:31:31-sol:/opt/csw/lib/ruby/gems/1.8/cache root# ls
../ actionpack-1.13.3.gem
activerecord-1.15.3.gem activesupport-1.4.4.gem
.../ actionpack-1.13.6.gem
activerecord-1.15.6.gem rails-1.2.3.gem
actionmailer-1.3.3.gem actionwebservice-1.2.3.gem
activesupport-1.4.2.gem rake-0.7.3.gem
16 bash-14:31:32-sol:/opt/csw/lib/ruby/gems/1.8/cache root#
16 bash-14:31:32-sol:/opt/csw/lib/ruby/gems/1.8/cache root#
16 bash-14:31:33-sol:/opt/csw/lib/ruby/gems/1.8/cache root#
16 bash-14:31:33-sol:/opt/csw/lib/ruby/gems/1.8/cache root# gem
install hpricot
Updating metadata for 11 gems from http://gems.rubyforge.org
............
complete
Building native extensions. This could take a while...
ERROR: Error installing hpricot:
ERROR: Failed to build gem native extension.

/opt/csw/bin/ruby extconf.rb install hpricot
checking for main() in -lc... no
creating Makefile

make
cc -I. -I. -I/opt/csw/lib/ruby/1.8/i386-solaris2.8 -I. -I/opt/csw/
include -I/opt/csw/include -KPIC -xO3 -xarch=386 -xspace -xildoff -I/
opt/csw/include -I/opt/csw/include -KPIC -c hpricot_scan.c
sh: cc: not found
*** Error code 1
make: Fatal error: Command failed for target `hpricot_scan.o'


Gem files will remain installed in /opt/csw/lib/ruby/gems/1.8/gems/
hpricot-0.6 for inspection.
Results logged to /opt/csw/lib/ruby/gems/1.8/gems/hpricot-0.6/ext/
hpricot_scan/gem_make.out
17 bash-14:32:10-sol:/opt/csw/lib/ruby/gems/1.8/cache root#
17 bash-14:32:52-sol:/opt/csw/lib/ruby/gems/1.8/cache root#


17 bash-14:32:52-sol:/opt/csw/lib/ruby/gems/1.8/cache root#
17 bash-14:32:53-sol:/opt/csw/lib/ruby/gems/1.8/cache root# which gcc
/opt/csw/gcc3/bin/gcc
18 bash-14:33:17-sol:/opt/csw/lib/ruby/gems/1.8/cache root#
18 bash-14:33:17-sol:/opt/csw/lib/ruby/gems/1.8/cache root#


18 bash-14:33:17-sol:/opt/csw/lib/ruby/gems/1.8/cache root#
18 bash-14:33:17-sol:/opt/csw/lib/ruby/gems/1.8/cache root# uname -a
SunOS sol 5.10 Generic_118855-14 i86pc i386 i86pc
19 bash-14:45:24-sol:/opt/csw/lib/ruby/gems/1.8/cache root#
19 bash-14:45:25-sol:/opt/csw/lib/ruby/gems/1.8/cache root#


Is it possible for me to force the hpricot-installer to use my copy of
gcc ??

--hh
 
S

Steven Lumos

HoboHoward said:
Dear List,

I want to install hpricot on my Solaris x-86 box.

The makefile generated by the hpricot-installer wants me to use the
'cc' c-compiler.

I dont have 'cc'.

I have 'gcc'.

Is it possible for me to force the hpricot-installer to use my copy of
gcc ??

It really wants to use the compiler that Ruby was built with.

[~]0% ruby -rrbconfig -e 'p Config::CONFIG["CC"]'
"cc"

The Sun compiler suite can be downloaded for free, but if you are
really attached to gcc then you should build Ruby yourself instead of
using blastwave.

Steve
 
H

HoboHoward

I fixed my hpricot problems on my solaris x-86 box.

I downloaded a couple of large files from sun.com after registration:

-rwx------ 1 maco staff 243701577 Nov 27 02:54 SunStudio12ml-
solaris-x86-200709-ii.tar.bz2
-rwx------ 1 maco staff 272616587 Nov 27 02:58
SunStudio12mlPrepSys-solaris-x86-200709.tar.bz2


I unpacked them:

tar jxf SunStudio12ml-solaris-x86-200709-ii.tar.bz2
tar jxf SunStudio12mlPrepSys-solaris-x86-200709.tar.bz2


I found:

85 bash-23:22:00-sol:~/sun_studio12 $
85 bash-23:22:00-sol:~/sun_studio12 $
85 bash-23:22:02-sol:~/sun_studio12 $ ll
total 12
drwxr-xr-x 5 maco staff 512 Nov 27 08:59 ./
drwxr-xr-x 18 maco root 1024 Nov 27 22:37 ../
lrwxrwxrwx 1 maco staff 26 Nov 27 08:56
SS12_README_FIRST -> SUNWspro/SS12_README_FIRST/
drwxr-xr-x 4 maco staff 512 Sep 23 13:15
SS12_prep_system/
drwxr-xr-x 15 maco staff 512 Sep 23 23:37 SUNWspro/
drwxr-xr-x 11 maco staff 1024 Sep 23 01:27 netbeans-5.5.1/
86 bash-23:22:08-sol:~/sun_studio12 $
86 bash-23:22:08-sol:~/sun_studio12 $


I ran shell commands:

cd SS12_prep_system
su
/prepare_system -s netbeans,patches

I found cc here: ~/sun_studio12/SUNWspro/bin/cc

I added
~/sun_studio12/SUNWspro/bin to my PATH.

I ran shell command:

44 bash-22:37:49-sol:~/software/hpricot $ gem install hpricot
Updating metadata for 45 gems from http://gems.rubyforge.org
.............................................
complete
Building native extensions. This could take a while...
Successfully installed hpricot-0.6
1 gem installed
Installing ri documentation for hpricot-0.6...
Installing RDoc documentation for hpricot-0.6...

I was happy!
(Thanks Steve!!)
--hh


HoboHoward said:
Dear List,
I want to install hpricot on my Solaris x-86 box.
The makefile generated by the hpricot-installer wants me to use the
'cc' c-compiler.
I dont have 'cc'.
I have 'gcc'.
Is it possible for me to force the hpricot-installer to use my copy of
gcc ??

It really wants to use the compiler that Ruby was built with.

[~]0% ruby -rrbconfig -e 'p Config::CONFIG["CC"]'
"cc"

The Sun compiler suite can be downloaded for free, but if you are
really attached to gcc then you should build Ruby yourself instead of
using blastwave.

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,149
Members
46,695
Latest member
StanleyDri

Latest Threads

Top