Make Ruby 3.0.3 on Solaris 10 with cc -D_STDC_C99= fatal error

make

make

    BASERUBY = echo executable host ruby is required.  use --with-baseruby option.; false
    CC = cc -D_STDC_C99
    LD = /usr/ccs/bin/ld
    LDSHARED = cc -D_STDC_C99 -G
    CFLAGS =  -g -erroff=E_STATEMENT_NOT_REACHED -erroff=E_INIT_SIGN_EXTEND -erroff=E_INIT_DOES_NOT_FIT -erroff=E_INITIALIZATION_TYPE_MISMATCH 
    XCFLAGS = -DRUBY_EXPORT -I. -I.ext/include/i386-solaris2.10 -I./include -I. -I./enc/unicode/12.1.0
    CPPFLAGS = -D_XOPEN_SOURCE=600   
    DLDFLAGS =  
    SOLIBS = -lz -lpthread -lrt -lrt -lrt -lsocket -ldl -lcrypt -lm
    LANG = 
    LC_ALL = 
    LC_CTYPE = 
    MFLAGS = 

cc: Sun C 5.12 SunOS_i386 2011/11/16


“vm.c”, line 3373: left operand must be modifiable lvalue: op “=”
cc: acomp failed for vm.c
*** Error code 2
The following command caused the error:
cc -D_STDC_C99= -g -erroff=E_STATEMENT_NOT_REACHED -erroff=E_INIT_SIGN_EXTEND -erroff=E_INIT_DOES_NOT_FIT -erroff=E_INITIALIZATION_TYPE_MISMATCH -DRUBY_EXPORT -I. -I.ext/include/i386-solaris2.10 -I./include -I. -I./enc/unicode/12.1.0 -D_XOPEN_SOURCE=600 -o vm.o -c vm.c
make: Fatal error: Command failed for target `vm.o’


Configuration summary for ruby version 3.0.3

  • Installation prefix: /usr/local
  • exec prefix: ${prefix}
  • arch: i386-solaris2.10
  • site arch: ${arch}
  • RUBY_BASE_NAME: ruby
  • ruby lib prefix: ${libdir}/${RUBY_BASE_NAME}
  • site libraries path: ${rubylibprefix}/${sitearch}
  • vendor path: ${rubylibprefix}/vendor_ruby
  • target OS: solaris2.10
  • compiler: cc -D_STDC_C99=
  • with pthread: yes
  • with coroutine: ucontext
  • enable shared libs: no
  • dynamic library ext: so
  • CFLAGS: ${optflags} ${debugflags} ${warnflags}
  • LDFLAGS: -L.
  • debugflags: -g
  • warnflags: -erroff=E_STATEMENT_NOT_REACHED
    -erroff=E_INIT_SIGN_EXTEND
    -erroff=E_INIT_DOES_NOT_FIT
    -erroff=E_INITIALIZATION_TYPE_MISMATCH
  • strip command: gstrip -S -x
  • install doc: rdoc
  • JIT support: yes
  • man page type: man

P.S. Enabling c99 (Enable ISO C99 features) didn’t help:

CC=/opt/SUNWspro/bin/cc CFLAGS="-xc99=all" ./configure

make

“vm.c”, line 3373: left operand must be modifiable lvalue: op “=”
cc: acomp failed for vm.c
*** Error code 2
The following command caused the error:
/opt/SUNWspro/bin/cc -xc99=all -DRUBY_EXPORT -I. -I.ext/include/i386-solaris2.10 -I./include -I. -I./enc/unicode/12.1.0 -D_XOPEN_SOURCE=600 -o vm.o -c vm.c
make: Fatal error: Command failed for target `vm.o’

1 Like