Make Ruby 3.0.3 on Solaris 10 by /opt/SUNWspro/bin/cc generates cc: acomp failed for vm.c

make

    BASERUBY = echo executable host ruby is required.  use --with-baseruby option.; false
    CC = /opt/SUNWspro/bin/cc -xc99=all
    LD = /usr/ccs/bin/ld
    LDSHARED = /opt/SUNWspro/bin/cc -xc99=all -G
    CFLAGS = -xc99=all 
    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
compiling vm.c
“./include/ruby/internal/core/rbasic.h”, line 47: syntax error before or at: RBasic
“./include/ruby/internal/core/rbasic.h”, line 47: warning: old-style declaration or incorrect type for: RBasic
“./include/ruby/internal/core/rbasic.h”, line 69: warning: syntax error: empty declaration
“./include/ruby/internal/core/rbasic.h”, line 72: warning: can not set non-default alignment for function return type
“./include/ruby/internal/core/rbasic.h”, line 82: undefined struct/union member: klass
“./include/ruby/internal/value_type.h”, line 157: undefined struct/union member: flags
“./include/ruby/internal/fl_type.h”, line 237: undefined struct/union member: flags
“./include/ruby/internal/fl_type.h”, line 288: warning: dubious tag declaration: struct RBasic
“./include/ruby/internal/fl_type.h”, line 290: undefined struct/union member: flags
“./include/ruby/internal/fl_type.h”, line 298: warning: argument #1 is incompatible with prototype:
prototype: pointer to struct RB_FL_SET_RAW {} : “./include/ruby/internal/fl_type.h”, line 288
argument : pointer to struct RBasic {}
“./include/ruby/internal/fl_type.h”, line 313: warning: dubious tag declaration: struct RBasic
“./include/ruby/internal/fl_type.h”, line 315: undefined struct/union member: flags
“./include/ruby/internal/fl_type.h”, line 323: warning: argument #1 is incompatible with prototype:
prototype: pointer to struct RB_FL_UNSET_RAW {} : “./include/ruby/internal/fl_type.h”, line 313
argument : pointer to struct RBasic {}
“./include/ruby/internal/fl_type.h”, line 338: warning: dubious tag declaration: struct RBasic
“./include/ruby/internal/fl_type.h”, line 340: undefined struct/union member: flags
“./include/ruby/internal/fl_type.h”, line 348: warning: argument #1 is incompatible with prototype:
prototype: pointer to struct RB_FL_REVERSE_RAW {} : “./include/ruby/internal/fl_type.h”, line 338
argument : pointer to struct RBasic {}
“./include/ruby/internal/fl_type.h”, line 465: undefined struct/union member: flags
“./include/ruby/internal/core/rstring.h”, line 74: incomplete struct/union/enum RBasic: basic
“./include/ruby/internal/core/rstring.h”, line 109: undefined struct/union member: flags
“./include/ruby/internal/core/rarray.h”, line 123: undefined struct/union member: flags
“./include/ruby/internal/memory.h”, line 246: warning: statement not reached
“./include/ruby/internal/scan_args.h”, line 348: warning: statement not reached
“internal/imemo.h”, line 160: improper member use: flags
“internal/imemo.h”, line 171: improper member use: flags
“./internal/bignum.h”, line 215: improper member use: flags
“vm_insnhelper.c”, line 1124: improper member use: klass
“vm_insnhelper.c”, line 1258: improper member use: klass
“vm_args.c”, line 532: improper member use: flags
“vm_args.c”, line 595: improper member use: flags
“vm_args.c”, line 595: left operand must be modifiable lvalue: op “|=”
“vm_insnhelper.c”, line 2208: improper member use: flags
“vm_insnhelper.c”, line 3574: improper member use: klass
“vm_insnhelper.c”, line 3575: improper member use: klass
“vm.inc”, line 2048: warning: statement not reached
“vm.inc”, line 2643: warning: statement not reached
“vm_exec.c”, line 148: warning: statement not reached
“vm_method.c”, line 263: improper member use: flags
“vm_method.c”, line 290: improper member use: klass
“vm_method.c”, line 303: warning: statement not reached
“vm_eval.c”, line 252: warning: statement not reached
“vm_eval.c”, line 736: improper member use: flags
“vm_eval.c”, line 801: improper member use: klass
“vm_eval.c”, line 882: warning: statement not reached
“vm_eval.c”, line 991: warning: statement not reached
“vm_eval.c”, line 1432: warning: statement not reached
“vm_eval.c”, line 2286: warning: statement not reached
“vm.c”, line 441: improper member use: klass
“vm.c”, line 708: warning: statement not reached
“vm.c”, line 1998: improper member use: klass
“vm.c”, line 3373: improper member use: flags
“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 -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’