[csw-users] GCC errors when installing ruby gems

Chris May chris.may at warwick.ac.uk
Wed Jul 15 11:22:17 CEST 2009


A bit more context that might be useful/relevant. This is a 32-bit x86
install of the OS, running inside a VirtualBox VM. All my previous
(successful) installs have been on 64-bit, non-virtualised x86 (AMD)
platforms.

I wonder if there's something expecting 64-bit libraries but being
given a 32-bit one instead? The   -D_FILE_OFFSET_BITS=64 parameter to
gcc seems a bit fishy, though I know nothing about GCC so it could be
entirely innocent.

thanks again,

Chris


On Tue, Jul 14, 2009 at 9:21 AM, Chris May<chris.may at warwick.ac.uk> wrote:
> Hi all,
>
> On previous systems I've never had problems installing and compiling
> ruby gems using the opencsw packages, but I have a new system which is
> exhibiting some strange failures.
>
> I'm using the unstable repo, on Solaris 10 5/09 (u7). I have
>
> gcc4core            4.3.3,REV=2009.05.07
> ruby        1.8.7,REV=2009.04.06_p72
> rubydev        1.8.7,REV=2009.04.06_p72
> rubygems            1.3.1,REV=2009.02.16
>
>
> If I try and do "gem install mongrel", I get this
>
> make
> /opt/csw/gcc4/bin/gcc -I. -I/opt/csw/lib/ruby/1.8/i386-solaris2.8
> -I/opt/csw/lib/ruby/1.8/i386-solaris2.8 -I. -I/opt/csw/include
> -D_FILE_OFFSET_BITS=64  -fPIC -mtune=i68
> 6 -O2 -pipe -m32 -march=i386 -I/opt/csw/include  -fPIC   -c fastthread.c
> In file included from
> /opt/csw/gcc4/lib/gcc/i386-pc-solaris2.8/4.3.3/include-fixed/stdlib.h:27,
>                 from /opt/csw/lib/ruby/1.8/i386-solaris2.8/ruby.h:40,
>                 from fastthread.c:12:
> /usr/include/iso/stdlib_iso.h: In function 'abort':
> /usr/include/iso/stdlib_iso.h:107: error: expected declaration
> specifiers before '__NORETURN'
> /usr/include/iso/stdlib_iso.h:108: error: storage class specified for
> parameter 'abs'
> /usr/include/iso/stdlib_iso.h:109: error: storage class specified for
> parameter 'atexit'
> /usr/include/iso/stdlib_iso.h:110: error: storage class specified for
> parameter 'atof'
> /usr/include/iso/stdlib_iso.h:111: error: storage class specified for
> parameter 'atoi'
> /usr/include/iso/stdlib_iso.h:112: error: storage class specified for
> parameter 'atol'
> /usr/include/iso/stdlib_iso.h:114: error: storage class specified for
> parameter 'bsearch'
> /usr/include/iso/stdlib_iso.h:121: error: storage class specified for
> parameter 'calloc'
> /usr/include/iso/stdlib_iso.h:122: error: storage class specified for
> parameter 'div'
> /usr/include/iso/stdlib_iso.h:124: error: expected '=', ',', ';',
> 'asm' or '__attribute__' before '__NORETURN'
>
> < hundreds more lines of similar errors>
>
>
> To my untrained eye, this looks like I've got something fairly
> fundamentally wrong - wrong version of the c compiler, wrong
> libraries, or something like that.
>
> If I try editing the makefile to use the Sun Studio C compiler, I can
> get the gem to make, but with warnings:
>
> bash-3.00# make
> /opt/SUNWspro/bin/cc -I. -I/opt/csw/lib/ruby/1.8/i386-solaris2.8
> -I/opt/csw/lib/ruby/1.8/i386-solaris2.8 -I. -I/opt/csw/include
> -D_FILE_OFFSET_BITS=64  -fPIC -mtune=i686 -O2 -pipe -m32 -march=i386
> -I/opt/csw/include  -fPIC   -c fastthread.c
> cc: Warning: illegal option -mtune=i686
> cc: Warning: illegal option -march=i386
> /opt/SUNWspro/bin/cc -shared -o fastthread.so fastthread.o -L.
> -L/opt/csw/lib -Wl,-R/opt/csw/lib -L. -L/opt/csw/gcc4/lib/. -m32
> -march=i386 -R /opt/csw/gcc4/lib -L/opt/csw/lib    -Wl,-R
> -Wl,/opt/csw/lib -L/opt/csw/lib -lruby  -lrt -lpthread -ldl -lcrypt
> -lm   -lc
> cc: Warning: illegal option -march=i386
>
> I suppose I could track down the source of the warnings (presumably
> gcc options being passed to cc) and tweak the Makefile accordingly,
> but it seems like it ought to be possible to get the compile to work
> using just the opencsw gcc.
>
> What am I doing wrong?
>
> Thanks!
>
> Chris
>



More information about the users mailing list