From: "dklein (Dmitri Klein)" Date: 2021-12-28T21:31:51+00:00 Subject: [ruby-core:106878] [Ruby master Bug#18442] Make Ruby 3.0.3 on Solaris 10 with "The following command caused the error: cc -D_STDC_C99= " Issue #18442 has been updated by dklein (Dmitri Klein). Using "make" generates similar error message: # make BASERUBY = echo executable host ruby is required. use --with-baseruby option.; false CC = /usr/local/gcc4/bin/gcc LD = /usr/ccs/bin/ld LDSHARED = /usr/local/gcc4/bin/gcc -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 = gcc (GCC) 4.5.1 Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. compiling vm.c In file included from /usr/include/stdio.h:21:0, from ./include/ruby/defines.h:16, from ./include/ruby/ruby.h:23, from eval_intern.h:4, from vm.c:13: /usr/local/gcc4/lib/gcc/i386-pc-solaris2.10/4.5.1/include-fixed/sys/feature_tests.h:345:2: error: #error "Compiler or options invalid; UNIX 03 and POSIX.1-2001 applications require the use of c99" In file included from vm.c:352:0: vm_insnhelper.c: In function 'vm_push_frame': vm_insnhelper.c:372:5: error: 'for' loop initial declarations are only allowed in C99 mode vm_insnhelper.c:372:5: note: use option -std=c99 or -std=gnu99 to compile your code vm_insnhelper.c: In function 'vm_search_cc': vm_insnhelper.c:1652:17: error: 'for' loop initial declarations are only allowed in C99 mode In file included from vm.c:352:0: vm_insnhelper.c: In function 'vm_callee_setup_arg': vm_insnhelper.c:2438:13: error: 'for' loop initial declarations are only allowed in C99 mode In file included from vm.c:352:0: vm_insnhelper.c: In function 'vm_invoke_builtin_delegate': vm_insnhelper.c:5598:9: error: 'for' loop initial declarations are only allowed in C99 mode In file included from vm.c:358:0: vm_method.c: In function 'vm_ccs_dump_i': vm_method.c:32:5: error: 'for' loop initial declarations are only allowed in C99 mode vm.c: In function 'env_copy': vm.c:1008:9: error: 'for' loop initial declarations are only allowed in C99 mode vm.c:1011:13: error: 'for' loop initial declarations are only allowed in C99 mode *** Error code 1 The following command caused the error: /usr/local/gcc4/bin/gcc -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' # ---------------------------------------- Bug #18442: Make Ruby 3.0.3 on Solaris 10 with "The following command caused the error: cc -D_STDC_C99= " https://bugs.ruby-lang.org/issues/18442#change-95687 * Author: dklein (Dmitri Klein) * Status: Open * Priority: Normal * Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN ---------------------------------------- make ... 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 --- # -- https://bugs.ruby-lang.org/ Unsubscribe: