ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:111075] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat 7
@ 2022-11-29 20:30 werebus (Matt Moretti)
  2022-11-30  2:18 ` [ruby-core:111078] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7 nobu (Nobuyoshi Nakada)
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: werebus (Matt Moretti) @ 2022-11-29 20:30 UTC (permalink / raw)
  To: ruby-core

Issue #19161 has been reported by werebus (Matt Moretti).

----------------------------------------
Bug #19161: Cannot compile 3.0.5 or 3.1.3 on Red Hat 7
https://bugs.ruby-lang.org/issues/19161

* Author: werebus (Matt Moretti)
* Status: Open
* Priority: Normal
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN
----------------------------------------
When attempting to run `make` on either the 3.0.5 or 3.1.3 release, I get the following error (I included the whole output as it's pretty short):


```
	BASERUBY = /opt/ruby/bin/ruby --disable=gems
	CC = gcc -std=gnu11
	LD = ld
	LDSHARED = gcc -std=gnu11 -shared
	CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable  
	XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -fPIE -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/13.0.0
	CPPFLAGS =   
	DLDFLAGS = -Wl,--compress-debug-sections=zlib -fstack-protector-strong -pie  
	SOLIBS = -lz -lpthread -lrt -lrt -ldl -lcrypt -lm 
	LANG = en_US.UTF-8
	LC_ALL = 
	LC_CTYPE = 
	MFLAGS = 
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 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 ./main.c
compiling dmydln.c
compiling miniinit.c
In file included from vm_core.h:83:0,
                 from iseq.h:14,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
thread_pthread.h:108:43: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘struct’
     RUBY_EXTERN RB_THREAD_LOCAL_SPECIFIER struct rb_execution_context_struct *ruby_current_ec;
                                           ^
In file included from iseq.h:14:0,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
vm_core.h: In function ‘rb_current_execution_context’:
vm_core.h:1870:34: error: ‘ruby_current_ec’ undeclared (first use in this function)
     rb_execution_context_t *ec = ruby_current_ec;
                                  ^
vm_core.h:1870:34: note: each undeclared identifier is reported only once for each function it appears in
miniinit.c: At top level:
cc1: warning: unrecognized command line option "-Wno-tautological-compare" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-parentheses-equality" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-cast-function-type" [enabled by default]
make: *** [miniinit.o] Error 1

```

Both Ruby 3.0.4 and 3.1.2 build without error and pass (all but one of) the `make check` tests.

I know RHEL 7 is getting to be pretty old; I suspect a factor here are the ancient build tools available to me. But... EOL for Ruby 2.7 comes before the one for RHEL 7, so I'm trying to prioritize.



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ruby-core:111078] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7
  2022-11-29 20:30 [ruby-core:111075] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat 7 werebus (Matt Moretti)
@ 2022-11-30  2:18 ` nobu (Nobuyoshi Nakada)
  2022-11-30  7:52 ` [ruby-core:111085] " hsbt (Hiroshi SHIBATA)
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: nobu (Nobuyoshi Nakada) @ 2022-11-30  2:18 UTC (permalink / raw)
  To: ruby-core

Issue #19161 has been updated by nobu (Nobuyoshi Nakada).

Status changed from Open to Feedback

Could you try this?

```diff
diff --git i/configure.ac w/configure.ac
index fcae66f775e..c933ed8b91f 100644
--- i/configure.ac
+++ w/configure.ac
@@ -363,6 +363,13 @@ AS_IF([test "$GCC" = yes], [
     icc_version=`echo =__ICC | $CC -E -xc - | sed '/^=/!d;s///;/^__ICC/d'`
     test -n "$icc_version" || icc_version=0
     # RUBY_APPEND_OPTIONS(XCFLAGS, ["-include ruby/config.h" "-include ruby/missing.h"])
+
+    AC_CACHE_CHECK([if thread-local storage is supported], [rb_cv_tls_supported],
+        [AC_LINK_IFELSE([AC_LANG_PROGRAM([[int __thread conftest;]])],
+            [rb_cv_tls_supported=yes],
+            [rb_cv_tls_supported=no])])
+    AS_IF([test x"$rb_cv_tls_supported" != xyes],
+        [AC_DEFINE(RB_THREAD_LOCAL_SPECIFIER_IS_UNSUPPORTED)])
 ], [
     linker_flag=
 ])
diff --git i/thread_pthread.h w/thread_pthread.h
index 2ac354046c0..7d4df3e2785 100644
--- i/thread_pthread.h
+++ w/thread_pthread.h
@@ -72,7 +72,7 @@ typedef struct rb_global_vm_lock_struct {
 
 #if __STDC_VERSION__ >= 201112
   #define RB_THREAD_LOCAL_SPECIFIER _Thread_local
-#elif defined(__GNUC__)
+#elif defined(__GNUC__) && !defined(RB_THREAD_LOCAL_SPECIFIER_IS_UNSUPPORTED)
   /* note that ICC (linux) and Clang are covered by __GNUC__ */
   #define RB_THREAD_LOCAL_SPECIFIER __thread
 #else
```

----------------------------------------
Bug #19161: Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7
https://bugs.ruby-lang.org/issues/19161#change-100338

* Author: werebus (Matt Moretti)
* Status: Feedback
* Priority: Normal
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN
----------------------------------------
When attempting to run `make` on either the 3.0.5 or 3.1.3 release, I get the following error (I included the whole output as it's pretty short):


```
	BASERUBY = /opt/ruby/bin/ruby --disable=gems
	CC = gcc -std=gnu11
	LD = ld
	LDSHARED = gcc -std=gnu11 -shared
	CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable  
	XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -fPIE -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/13.0.0
	CPPFLAGS =   
	DLDFLAGS = -Wl,--compress-debug-sections=zlib -fstack-protector-strong -pie  
	SOLIBS = -lz -lpthread -lrt -lrt -ldl -lcrypt -lm 
	LANG = en_US.UTF-8
	LC_ALL = 
	LC_CTYPE = 
	MFLAGS = 
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 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 ./main.c
compiling dmydln.c
compiling miniinit.c
In file included from vm_core.h:83:0,
                 from iseq.h:14,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
thread_pthread.h:108:43: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘struct’
     RUBY_EXTERN RB_THREAD_LOCAL_SPECIFIER struct rb_execution_context_struct *ruby_current_ec;
                                           ^
In file included from iseq.h:14:0,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
vm_core.h: In function ‘rb_current_execution_context’:
vm_core.h:1870:34: error: ‘ruby_current_ec’ undeclared (first use in this function)
     rb_execution_context_t *ec = ruby_current_ec;
                                  ^
vm_core.h:1870:34: note: each undeclared identifier is reported only once for each function it appears in
miniinit.c: At top level:
cc1: warning: unrecognized command line option "-Wno-tautological-compare" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-parentheses-equality" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-cast-function-type" [enabled by default]
make: *** [miniinit.o] Error 1

```

Both Ruby 3.0.4 and 3.1.2 build without error and pass (all but one of) the `make check` tests.

I know RHEL 7 is getting to be pretty old; I suspect a factor here are the ancient build tools available to me. But... EOL for Ruby 2.7 comes before the one for RHEL 7, so I'm trying to prioritize.



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [ruby-core:111085] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7
  2022-11-29 20:30 [ruby-core:111075] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat 7 werebus (Matt Moretti)
  2022-11-30  2:18 ` [ruby-core:111078] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7 nobu (Nobuyoshi Nakada)
@ 2022-11-30  7:52 ` hsbt (Hiroshi SHIBATA)
  2022-11-30  8:43 ` [ruby-core:111087] " mame (Yusuke Endoh)
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: hsbt (Hiroshi SHIBATA) @ 2022-11-30  7:52 UTC (permalink / raw)
  To: ruby-core

Issue #19161 has been updated by hsbt (Hiroshi SHIBATA).

Status changed from Feedback to Closed
Backport changed from 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN to 2.7: DONTNEED, 3.0: REQUIRED, 3.1: REQUIRED

I could reproduce on CentOS 7 and confirmed to fix nobu's patch.

----------------------------------------
Bug #19161: Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7
https://bugs.ruby-lang.org/issues/19161#change-100347

* Author: werebus (Matt Moretti)
* Status: Closed
* Priority: Normal
* Backport: 2.7: DONTNEED, 3.0: REQUIRED, 3.1: REQUIRED
----------------------------------------
When attempting to run `make` on either the 3.0.5 or 3.1.3 release, I get the following error (I included the whole output as it's pretty short):


```
	BASERUBY = /opt/ruby/bin/ruby --disable=gems
	CC = gcc -std=gnu11
	LD = ld
	LDSHARED = gcc -std=gnu11 -shared
	CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable  
	XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -fPIE -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/13.0.0
	CPPFLAGS =   
	DLDFLAGS = -Wl,--compress-debug-sections=zlib -fstack-protector-strong -pie  
	SOLIBS = -lz -lpthread -lrt -lrt -ldl -lcrypt -lm 
	LANG = en_US.UTF-8
	LC_ALL = 
	LC_CTYPE = 
	MFLAGS = 
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 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 ./main.c
compiling dmydln.c
compiling miniinit.c
In file included from vm_core.h:83:0,
                 from iseq.h:14,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
thread_pthread.h:108:43: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘struct’
     RUBY_EXTERN RB_THREAD_LOCAL_SPECIFIER struct rb_execution_context_struct *ruby_current_ec;
                                           ^
In file included from iseq.h:14:0,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
vm_core.h: In function ‘rb_current_execution_context’:
vm_core.h:1870:34: error: ‘ruby_current_ec’ undeclared (first use in this function)
     rb_execution_context_t *ec = ruby_current_ec;
                                  ^
vm_core.h:1870:34: note: each undeclared identifier is reported only once for each function it appears in
miniinit.c: At top level:
cc1: warning: unrecognized command line option "-Wno-tautological-compare" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-parentheses-equality" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-cast-function-type" [enabled by default]
make: *** [miniinit.o] Error 1

```

Both Ruby 3.0.4 and 3.1.2 build without error and pass (all but one of) the `make check` tests.

I know RHEL 7 is getting to be pretty old; I suspect a factor here are the ancient build tools available to me. But... EOL for Ruby 2.7 comes before the one for RHEL 7, so I'm trying to prioritize.



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ruby-core:111087] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7
  2022-11-29 20:30 [ruby-core:111075] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat 7 werebus (Matt Moretti)
  2022-11-30  2:18 ` [ruby-core:111078] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7 nobu (Nobuyoshi Nakada)
  2022-11-30  7:52 ` [ruby-core:111085] " hsbt (Hiroshi SHIBATA)
@ 2022-11-30  8:43 ` mame (Yusuke Endoh)
  2022-11-30 17:17 ` [ruby-core:111093] " werebus (Matt Moretti)
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: mame (Yusuke Endoh) @ 2022-11-30  8:43 UTC (permalink / raw)
  To: ruby-core

Issue #19161 has been updated by mame (Yusuke Endoh).


I investigated why our CI server for CentOS 7 could not find this problem. In short, this problem only occurs on tarball.

This problem occurs when `gcc -std=gnu11`.
The CI server uses `./autogen.sh` to generate `configure` script. Because the old autoconf on CentOS 7 does not know `-std=gnu11`, the generated script does not produce `-std=gnu11`.
On the other hand, the configure script in tarball is generated by the new autoconf, so it adds `-std=gnu11`, which causes a problem.
I want to add CI for tarballs, but it would require more computing resource (and human resource).

From here, I found a simple workaround: `./configure cflags="-std=gnu99"`. Just FYI.





----------------------------------------
Bug #19161: Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7
https://bugs.ruby-lang.org/issues/19161#change-100350

* Author: werebus (Matt Moretti)
* Status: Closed
* Priority: Normal
* Backport: 2.7: DONTNEED, 3.0: REQUIRED, 3.1: REQUIRED
----------------------------------------
When attempting to run `make` on either the 3.0.5 or 3.1.3 release, I get the following error (I included the whole output as it's pretty short):


```
	BASERUBY = /opt/ruby/bin/ruby --disable=gems
	CC = gcc -std=gnu11
	LD = ld
	LDSHARED = gcc -std=gnu11 -shared
	CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable  
	XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -fPIE -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/13.0.0
	CPPFLAGS =   
	DLDFLAGS = -Wl,--compress-debug-sections=zlib -fstack-protector-strong -pie  
	SOLIBS = -lz -lpthread -lrt -lrt -ldl -lcrypt -lm 
	LANG = en_US.UTF-8
	LC_ALL = 
	LC_CTYPE = 
	MFLAGS = 
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 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 ./main.c
compiling dmydln.c
compiling miniinit.c
In file included from vm_core.h:83:0,
                 from iseq.h:14,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
thread_pthread.h:108:43: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘struct’
     RUBY_EXTERN RB_THREAD_LOCAL_SPECIFIER struct rb_execution_context_struct *ruby_current_ec;
                                           ^
In file included from iseq.h:14:0,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
vm_core.h: In function ‘rb_current_execution_context’:
vm_core.h:1870:34: error: ‘ruby_current_ec’ undeclared (first use in this function)
     rb_execution_context_t *ec = ruby_current_ec;
                                  ^
vm_core.h:1870:34: note: each undeclared identifier is reported only once for each function it appears in
miniinit.c: At top level:
cc1: warning: unrecognized command line option "-Wno-tautological-compare" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-parentheses-equality" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-cast-function-type" [enabled by default]
make: *** [miniinit.o] Error 1

```

Both Ruby 3.0.4 and 3.1.2 build without error and pass (all but one of) the `make check` tests.

I know RHEL 7 is getting to be pretty old; I suspect a factor here are the ancient build tools available to me. But... EOL for Ruby 2.7 comes before the one for RHEL 7, so I'm trying to prioritize.



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ruby-core:111093] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7
  2022-11-29 20:30 [ruby-core:111075] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat 7 werebus (Matt Moretti)
                   ` (2 preceding siblings ...)
  2022-11-30  8:43 ` [ruby-core:111087] " mame (Yusuke Endoh)
@ 2022-11-30 17:17 ` werebus (Matt Moretti)
  2023-03-08 23:56 ` [ruby-core:112750] " hsbt (Hiroshi SHIBATA) via ruby-core
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: werebus (Matt Moretti) @ 2022-11-30 17:17 UTC (permalink / raw)
  To: ruby-core

Issue #19161 has been updated by werebus (Matt Moretti).


Thanks everyone,

I can confirm that adding `cflags="-std=gnu99"` to the configure step worked around my issue. Re-running `./autogen.sh` on the server in question also worked.

----------------------------------------
Bug #19161: Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7
https://bugs.ruby-lang.org/issues/19161#change-100358

* Author: werebus (Matt Moretti)
* Status: Closed
* Priority: Normal
* Backport: 2.7: DONTNEED, 3.0: REQUIRED, 3.1: REQUIRED
----------------------------------------
When attempting to run `make` on either the 3.0.5 or 3.1.3 release, I get the following error (I included the whole output as it's pretty short):


```
	BASERUBY = /opt/ruby/bin/ruby --disable=gems
	CC = gcc -std=gnu11
	LD = ld
	LDSHARED = gcc -std=gnu11 -shared
	CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable  
	XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -fPIE -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/13.0.0
	CPPFLAGS =   
	DLDFLAGS = -Wl,--compress-debug-sections=zlib -fstack-protector-strong -pie  
	SOLIBS = -lz -lpthread -lrt -lrt -ldl -lcrypt -lm 
	LANG = en_US.UTF-8
	LC_ALL = 
	LC_CTYPE = 
	MFLAGS = 
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 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 ./main.c
compiling dmydln.c
compiling miniinit.c
In file included from vm_core.h:83:0,
                 from iseq.h:14,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
thread_pthread.h:108:43: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘struct’
     RUBY_EXTERN RB_THREAD_LOCAL_SPECIFIER struct rb_execution_context_struct *ruby_current_ec;
                                           ^
In file included from iseq.h:14:0,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
vm_core.h: In function ‘rb_current_execution_context’:
vm_core.h:1870:34: error: ‘ruby_current_ec’ undeclared (first use in this function)
     rb_execution_context_t *ec = ruby_current_ec;
                                  ^
vm_core.h:1870:34: note: each undeclared identifier is reported only once for each function it appears in
miniinit.c: At top level:
cc1: warning: unrecognized command line option "-Wno-tautological-compare" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-parentheses-equality" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-cast-function-type" [enabled by default]
make: *** [miniinit.o] Error 1

```

Both Ruby 3.0.4 and 3.1.2 build without error and pass (all but one of) the `make check` tests.

I know RHEL 7 is getting to be pretty old; I suspect a factor here are the ancient build tools available to me. But... EOL for Ruby 2.7 comes before the one for RHEL 7, so I'm trying to prioritize.



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ruby-core:112750] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7
  2022-11-29 20:30 [ruby-core:111075] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat 7 werebus (Matt Moretti)
                   ` (3 preceding siblings ...)
  2022-11-30 17:17 ` [ruby-core:111093] " werebus (Matt Moretti)
@ 2023-03-08 23:56 ` hsbt (Hiroshi SHIBATA) via ruby-core
  2023-03-20  5:01 ` [ruby-core:112946] " naruse (Yui NARUSE) via ruby-core
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: hsbt (Hiroshi SHIBATA) via ruby-core @ 2023-03-08 23:56 UTC (permalink / raw)
  To: ruby-core; +Cc: hsbt (Hiroshi SHIBATA)

Issue #19161 has been updated by hsbt (Hiroshi SHIBATA).

Status changed from Closed to Open
Backport changed from 2.7: DONTNEED, 3.0: REQUIRED, 3.1: REQUIRED to 2.7: DONTNEED, 3.0: REQUIRED, 3.1: REQUIRED, 3.2: REQUIRED

@nobu Can you commit this?

----------------------------------------
Bug #19161: Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7
https://bugs.ruby-lang.org/issues/19161#change-102241

* Author: werebus (Matt Moretti)
* Status: Open
* Priority: Normal
* Backport: 2.7: DONTNEED, 3.0: REQUIRED, 3.1: REQUIRED, 3.2: REQUIRED
----------------------------------------
When attempting to run `make` on either the 3.0.5 or 3.1.3 release, I get the following error (I included the whole output as it's pretty short):


```
	BASERUBY = /opt/ruby/bin/ruby --disable=gems
	CC = gcc -std=gnu11
	LD = ld
	LDSHARED = gcc -std=gnu11 -shared
	CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable  
	XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -fPIE -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/13.0.0
	CPPFLAGS =   
	DLDFLAGS = -Wl,--compress-debug-sections=zlib -fstack-protector-strong -pie  
	SOLIBS = -lz -lpthread -lrt -lrt -ldl -lcrypt -lm 
	LANG = en_US.UTF-8
	LC_ALL = 
	LC_CTYPE = 
	MFLAGS = 
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 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 ./main.c
compiling dmydln.c
compiling miniinit.c
In file included from vm_core.h:83:0,
                 from iseq.h:14,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
thread_pthread.h:108:43: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘struct’
     RUBY_EXTERN RB_THREAD_LOCAL_SPECIFIER struct rb_execution_context_struct *ruby_current_ec;
                                           ^
In file included from iseq.h:14:0,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
vm_core.h: In function ‘rb_current_execution_context’:
vm_core.h:1870:34: error: ‘ruby_current_ec’ undeclared (first use in this function)
     rb_execution_context_t *ec = ruby_current_ec;
                                  ^
vm_core.h:1870:34: note: each undeclared identifier is reported only once for each function it appears in
miniinit.c: At top level:
cc1: warning: unrecognized command line option "-Wno-tautological-compare" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-parentheses-equality" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-cast-function-type" [enabled by default]
make: *** [miniinit.o] Error 1

```

Both Ruby 3.0.4 and 3.1.2 build without error and pass (all but one of) the `make check` tests.

I know RHEL 7 is getting to be pretty old; I suspect a factor here are the ancient build tools available to me. But... EOL for Ruby 2.7 comes before the one for RHEL 7, so I'm trying to prioritize.



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ruby-core:112946] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7
  2022-11-29 20:30 [ruby-core:111075] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat 7 werebus (Matt Moretti)
                   ` (4 preceding siblings ...)
  2023-03-08 23:56 ` [ruby-core:112750] " hsbt (Hiroshi SHIBATA) via ruby-core
@ 2023-03-20  5:01 ` naruse (Yui NARUSE) via ruby-core
  2023-03-21  7:50 ` [ruby-core:112967] " nagachika (Tomoyuki Chikanaga) via ruby-core
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: naruse (Yui NARUSE) via ruby-core @ 2023-03-20  5:01 UTC (permalink / raw)
  To: ruby-core; +Cc: naruse (Yui NARUSE)

Issue #19161 has been updated by naruse (Yui NARUSE).

Backport changed from 2.7: DONTNEED, 3.0: REQUIRED, 3.1: REQUIRED, 3.2: REQUIRED to 2.7: DONTNEED, 3.0: REQUIRED, 3.1: REQUIRED, 3.2: DONE

ruby_3_2 0555303464f3595223ec8093146041f96595865d merged revision(s) 96d1acfdf6c6b42f2029f44d5b5920961d6efa92.

----------------------------------------
Bug #19161: Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7
https://bugs.ruby-lang.org/issues/19161#change-102473

* Author: werebus (Matt Moretti)
* Status: Closed
* Priority: Normal
* Backport: 2.7: DONTNEED, 3.0: REQUIRED, 3.1: REQUIRED, 3.2: DONE
----------------------------------------
When attempting to run `make` on either the 3.0.5 or 3.1.3 release, I get the following error (I included the whole output as it's pretty short):


```
	BASERUBY = /opt/ruby/bin/ruby --disable=gems
	CC = gcc -std=gnu11
	LD = ld
	LDSHARED = gcc -std=gnu11 -shared
	CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable  
	XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -fPIE -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/13.0.0
	CPPFLAGS =   
	DLDFLAGS = -Wl,--compress-debug-sections=zlib -fstack-protector-strong -pie  
	SOLIBS = -lz -lpthread -lrt -lrt -ldl -lcrypt -lm 
	LANG = en_US.UTF-8
	LC_ALL = 
	LC_CTYPE = 
	MFLAGS = 
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 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 ./main.c
compiling dmydln.c
compiling miniinit.c
In file included from vm_core.h:83:0,
                 from iseq.h:14,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
thread_pthread.h:108:43: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘struct’
     RUBY_EXTERN RB_THREAD_LOCAL_SPECIFIER struct rb_execution_context_struct *ruby_current_ec;
                                           ^
In file included from iseq.h:14:0,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
vm_core.h: In function ‘rb_current_execution_context’:
vm_core.h:1870:34: error: ‘ruby_current_ec’ undeclared (first use in this function)
     rb_execution_context_t *ec = ruby_current_ec;
                                  ^
vm_core.h:1870:34: note: each undeclared identifier is reported only once for each function it appears in
miniinit.c: At top level:
cc1: warning: unrecognized command line option "-Wno-tautological-compare" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-parentheses-equality" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-cast-function-type" [enabled by default]
make: *** [miniinit.o] Error 1

```

Both Ruby 3.0.4 and 3.1.2 build without error and pass (all but one of) the `make check` tests.

I know RHEL 7 is getting to be pretty old; I suspect a factor here are the ancient build tools available to me. But... EOL for Ruby 2.7 comes before the one for RHEL 7, so I'm trying to prioritize.



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ruby-core:112967] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7
  2022-11-29 20:30 [ruby-core:111075] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat 7 werebus (Matt Moretti)
                   ` (5 preceding siblings ...)
  2023-03-20  5:01 ` [ruby-core:112946] " naruse (Yui NARUSE) via ruby-core
@ 2023-03-21  7:50 ` nagachika (Tomoyuki Chikanaga) via ruby-core
  2023-04-05  1:43 ` [ruby-core:113121] " eviljoel (evil joel) via ruby-core
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: nagachika (Tomoyuki Chikanaga) via ruby-core @ 2023-03-21  7:50 UTC (permalink / raw)
  To: ruby-core; +Cc: nagachika (Tomoyuki Chikanaga)

Issue #19161 has been updated by nagachika (Tomoyuki Chikanaga).

Backport changed from 2.7: DONTNEED, 3.0: REQUIRED, 3.1: REQUIRED, 3.2: DONE to 2.7: DONTNEED, 3.0: REQUIRED, 3.1: DONE, 3.2: DONE

ruby_3_1 bc04b38f72ba1f261fbb3e881e6ae65c4bc77797 merged revision(s) 96d1acfdf6c6b42f2029f44d5b5920961d6efa92.

----------------------------------------
Bug #19161: Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7
https://bugs.ruby-lang.org/issues/19161#change-102494

* Author: werebus (Matt Moretti)
* Status: Closed
* Priority: Normal
* Backport: 2.7: DONTNEED, 3.0: REQUIRED, 3.1: DONE, 3.2: DONE
----------------------------------------
When attempting to run `make` on either the 3.0.5 or 3.1.3 release, I get the following error (I included the whole output as it's pretty short):


```
	BASERUBY = /opt/ruby/bin/ruby --disable=gems
	CC = gcc -std=gnu11
	LD = ld
	LDSHARED = gcc -std=gnu11 -shared
	CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable  
	XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -fPIE -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/13.0.0
	CPPFLAGS =   
	DLDFLAGS = -Wl,--compress-debug-sections=zlib -fstack-protector-strong -pie  
	SOLIBS = -lz -lpthread -lrt -lrt -ldl -lcrypt -lm 
	LANG = en_US.UTF-8
	LC_ALL = 
	LC_CTYPE = 
	MFLAGS = 
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 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 ./main.c
compiling dmydln.c
compiling miniinit.c
In file included from vm_core.h:83:0,
                 from iseq.h:14,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
thread_pthread.h:108:43: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘struct’
     RUBY_EXTERN RB_THREAD_LOCAL_SPECIFIER struct rb_execution_context_struct *ruby_current_ec;
                                           ^
In file included from iseq.h:14:0,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
vm_core.h: In function ‘rb_current_execution_context’:
vm_core.h:1870:34: error: ‘ruby_current_ec’ undeclared (first use in this function)
     rb_execution_context_t *ec = ruby_current_ec;
                                  ^
vm_core.h:1870:34: note: each undeclared identifier is reported only once for each function it appears in
miniinit.c: At top level:
cc1: warning: unrecognized command line option "-Wno-tautological-compare" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-parentheses-equality" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-cast-function-type" [enabled by default]
make: *** [miniinit.o] Error 1

```

Both Ruby 3.0.4 and 3.1.2 build without error and pass (all but one of) the `make check` tests.

I know RHEL 7 is getting to be pretty old; I suspect a factor here are the ancient build tools available to me. But... EOL for Ruby 2.7 comes before the one for RHEL 7, so I'm trying to prioritize.



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ruby-core:113121] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7
  2022-11-29 20:30 [ruby-core:111075] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat 7 werebus (Matt Moretti)
                   ` (6 preceding siblings ...)
  2023-03-21  7:50 ` [ruby-core:112967] " nagachika (Tomoyuki Chikanaga) via ruby-core
@ 2023-04-05  1:43 ` eviljoel (evil joel) via ruby-core
  2023-04-05  5:31 ` [ruby-core:113124] " nobu (Nobuyoshi Nakada) via ruby-core
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: eviljoel (evil joel) via ruby-core @ 2023-04-05  1:43 UTC (permalink / raw)
  To: ruby-core; +Cc: eviljoel (evil joel)

Issue #19161 has been updated by eviljoel (evil joel).

File ruby322BuildFailure-20230404.Dockerfile added

@hsbt, @nagachika, and @nobu, despite the release notes, this was not successfully backported to Ruby 3.2 in Ruby 3.2.2. I've attached a Dockerfile that proves it. Assuming you have Docker installed, run the file with:
``` shell
docker build --file ruby322BuildFailure-20230404.Dockerfile .
```
You should get output:
```
compiling miniinit.c
In file included from vm_core.h:164:0,
                 from iseq.h:14,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
thread_pthread.h:109:39: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'struct'
 RUBY_EXTERN RB_THREAD_LOCAL_SPECIFIER struct rb_execution_context_struct *ruby_current_ec;
                                       ^
In file included from iseq.h:14:0,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
vm_core.h: In function 'rb_current_execution_context':
vm_core.h:1865:34: error: 'ruby_current_ec' undeclared (first use in this function)
     rb_execution_context_t *ec = ruby_current_ec;
                                  ^
vm_core.h:1865:34: note: each undeclared identifier is reported only once for each function it appears in
miniinit.c: At top level:
cc1: warning: unrecognized command line option "-Wno-tautological-compare" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-parentheses-equality" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-cast-function-type" [enabled by default]
make: *** [miniinit.o] Error 1
The command '/bin/sh -c cd ruby-3.2.2 && make' returned a non-zero code: 2
```
You can see in the configuration summary that it is still trying to use C11:
```
---
Configuration summary for ruby version 3.2.2

   * Installation prefix: /usr/local
   * exec prefix:         ${prefix}
   * arch:                x86_64-linux
   * 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:           linux
   * compiler:            gcc -std=gnu11
   * with thread:         pthread
   * with coroutine:      amd64
   * enable shared libs:  no
   * dynamic library ext: so
   * CFLAGS:              ${optflags} ${debugflags} ${warnflags}
   * LDFLAGS:             -L. -fstack-protector-strong -rdynamic \
                          -Wl,-export-dynamic
   * DLDFLAGS:            -Wl,--compress-debug-sections=zlib
   * optflags:            -O3 -fno-fast-math
   * debugflags:          -ggdb3
   * warnflags:           -Wall -Wextra -Wdeprecated-declarations \
                          -Wdiv-by-zero -Wimplicit-function-declaration \
                          -Wimplicit-int -Wpointer-arith -Wwrite-strings \
                          -Wold-style-definition -Wmissing-noreturn \
                          -Wno-cast-function-type \
                          -Wno-constant-logical-operand -Wno-long-long \
                          -Wno-missing-field-initializers \
                          -Wno-overlength-strings \
                          -Wno-packed-bitfield-compat \
                          -Wno-parentheses-equality -Wno-self-assign \
                          -Wno-tautological-compare -Wno-unused-parameter \
                          -Wno-unused-value -Wsuggest-attribute=format \
                          -Wsuggest-attribute=noreturn -Wunused-variable \
                          -Wno-maybe-uninitialized
   * strip command:       strip -S -x
   * install doc:         rdoc
   * MJIT support:        yes
   * YJIT support:        no
   * man page type:       doc

---
```

----------------------------------------
Bug #19161: Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7
https://bugs.ruby-lang.org/issues/19161#change-102656

* Author: werebus (Matt Moretti)
* Status: Closed
* Priority: Normal
* Backport: 2.7: DONTNEED, 3.0: REQUIRED, 3.1: DONE, 3.2: DONE
----------------------------------------
When attempting to run `make` on either the 3.0.5 or 3.1.3 release, I get the following error (I included the whole output as it's pretty short):


```
	BASERUBY = /opt/ruby/bin/ruby --disable=gems
	CC = gcc -std=gnu11
	LD = ld
	LDSHARED = gcc -std=gnu11 -shared
	CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable  
	XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -fPIE -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/13.0.0
	CPPFLAGS =   
	DLDFLAGS = -Wl,--compress-debug-sections=zlib -fstack-protector-strong -pie  
	SOLIBS = -lz -lpthread -lrt -lrt -ldl -lcrypt -lm 
	LANG = en_US.UTF-8
	LC_ALL = 
	LC_CTYPE = 
	MFLAGS = 
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 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 ./main.c
compiling dmydln.c
compiling miniinit.c
In file included from vm_core.h:83:0,
                 from iseq.h:14,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
thread_pthread.h:108:43: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘struct’
     RUBY_EXTERN RB_THREAD_LOCAL_SPECIFIER struct rb_execution_context_struct *ruby_current_ec;
                                           ^
In file included from iseq.h:14:0,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
vm_core.h: In function ‘rb_current_execution_context’:
vm_core.h:1870:34: error: ‘ruby_current_ec’ undeclared (first use in this function)
     rb_execution_context_t *ec = ruby_current_ec;
                                  ^
vm_core.h:1870:34: note: each undeclared identifier is reported only once for each function it appears in
miniinit.c: At top level:
cc1: warning: unrecognized command line option "-Wno-tautological-compare" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-parentheses-equality" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-cast-function-type" [enabled by default]
make: *** [miniinit.o] Error 1

```

Both Ruby 3.0.4 and 3.1.2 build without error and pass (all but one of) the `make check` tests.

I know RHEL 7 is getting to be pretty old; I suspect a factor here are the ancient build tools available to me. But... EOL for Ruby 2.7 comes before the one for RHEL 7, so I'm trying to prioritize.

---Files--------------------------------
ruby322BuildFailure-20230404.Dockerfile (531 Bytes)


-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ruby-core:113124] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7
  2022-11-29 20:30 [ruby-core:111075] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat 7 werebus (Matt Moretti)
                   ` (7 preceding siblings ...)
  2023-04-05  1:43 ` [ruby-core:113121] " eviljoel (evil joel) via ruby-core
@ 2023-04-05  5:31 ` nobu (Nobuyoshi Nakada) via ruby-core
  2023-04-05  5:52 ` [ruby-core:113125] " nobu (Nobuyoshi Nakada) via ruby-core
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: nobu (Nobuyoshi Nakada) via ruby-core @ 2023-04-05  5:31 UTC (permalink / raw)
  To: ruby-core; +Cc: nobu (Nobuyoshi Nakada)

Issue #19161 has been updated by nobu (Nobuyoshi Nakada).

Status changed from Closed to Feedback

@eviljoel Can't you share the generated config.log and config.status files?

----------------------------------------
Bug #19161: Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7
https://bugs.ruby-lang.org/issues/19161#change-102659

* Author: werebus (Matt Moretti)
* Status: Feedback
* Priority: Normal
* Backport: 2.7: DONTNEED, 3.0: REQUIRED, 3.1: DONE, 3.2: DONE
----------------------------------------
When attempting to run `make` on either the 3.0.5 or 3.1.3 release, I get the following error (I included the whole output as it's pretty short):


```
	BASERUBY = /opt/ruby/bin/ruby --disable=gems
	CC = gcc -std=gnu11
	LD = ld
	LDSHARED = gcc -std=gnu11 -shared
	CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable  
	XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -fPIE -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/13.0.0
	CPPFLAGS =   
	DLDFLAGS = -Wl,--compress-debug-sections=zlib -fstack-protector-strong -pie  
	SOLIBS = -lz -lpthread -lrt -lrt -ldl -lcrypt -lm 
	LANG = en_US.UTF-8
	LC_ALL = 
	LC_CTYPE = 
	MFLAGS = 
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 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 ./main.c
compiling dmydln.c
compiling miniinit.c
In file included from vm_core.h:83:0,
                 from iseq.h:14,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
thread_pthread.h:108:43: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘struct’
     RUBY_EXTERN RB_THREAD_LOCAL_SPECIFIER struct rb_execution_context_struct *ruby_current_ec;
                                           ^
In file included from iseq.h:14:0,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
vm_core.h: In function ‘rb_current_execution_context’:
vm_core.h:1870:34: error: ‘ruby_current_ec’ undeclared (first use in this function)
     rb_execution_context_t *ec = ruby_current_ec;
                                  ^
vm_core.h:1870:34: note: each undeclared identifier is reported only once for each function it appears in
miniinit.c: At top level:
cc1: warning: unrecognized command line option "-Wno-tautological-compare" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-parentheses-equality" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-cast-function-type" [enabled by default]
make: *** [miniinit.o] Error 1

```

Both Ruby 3.0.4 and 3.1.2 build without error and pass (all but one of) the `make check` tests.

I know RHEL 7 is getting to be pretty old; I suspect a factor here are the ancient build tools available to me. But... EOL for Ruby 2.7 comes before the one for RHEL 7, so I'm trying to prioritize.

---Files--------------------------------
ruby322BuildFailure-20230404.Dockerfile (531 Bytes)


-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ruby-core:113125] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7
  2022-11-29 20:30 [ruby-core:111075] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat 7 werebus (Matt Moretti)
                   ` (8 preceding siblings ...)
  2023-04-05  5:31 ` [ruby-core:113124] " nobu (Nobuyoshi Nakada) via ruby-core
@ 2023-04-05  5:52 ` nobu (Nobuyoshi Nakada) via ruby-core
  2023-04-05 11:24 ` [ruby-core:113126] " nobu (Nobuyoshi Nakada) via ruby-core
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: nobu (Nobuyoshi Nakada) via ruby-core @ 2023-04-05  5:52 UTC (permalink / raw)
  To: ruby-core; +Cc: nobu (Nobuyoshi Nakada)

Issue #19161 has been updated by nobu (Nobuyoshi Nakada).


BTW, off topic:
You can check the checksum more simply.
```sh
RUN echo "4b352d0f7ec384e332e3e44cdbfdcd5ff2d594af3c8296b5636c710975149e23 *ruby-3.2.2.tar.xz" | sha256sum -c
```

----------------------------------------
Bug #19161: Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7
https://bugs.ruby-lang.org/issues/19161#change-102660

* Author: werebus (Matt Moretti)
* Status: Feedback
* Priority: Normal
* Backport: 2.7: DONTNEED, 3.0: REQUIRED, 3.1: DONE, 3.2: DONE
----------------------------------------
When attempting to run `make` on either the 3.0.5 or 3.1.3 release, I get the following error (I included the whole output as it's pretty short):


```
	BASERUBY = /opt/ruby/bin/ruby --disable=gems
	CC = gcc -std=gnu11
	LD = ld
	LDSHARED = gcc -std=gnu11 -shared
	CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable  
	XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -fPIE -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/13.0.0
	CPPFLAGS =   
	DLDFLAGS = -Wl,--compress-debug-sections=zlib -fstack-protector-strong -pie  
	SOLIBS = -lz -lpthread -lrt -lrt -ldl -lcrypt -lm 
	LANG = en_US.UTF-8
	LC_ALL = 
	LC_CTYPE = 
	MFLAGS = 
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 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 ./main.c
compiling dmydln.c
compiling miniinit.c
In file included from vm_core.h:83:0,
                 from iseq.h:14,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
thread_pthread.h:108:43: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘struct’
     RUBY_EXTERN RB_THREAD_LOCAL_SPECIFIER struct rb_execution_context_struct *ruby_current_ec;
                                           ^
In file included from iseq.h:14:0,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
vm_core.h: In function ‘rb_current_execution_context’:
vm_core.h:1870:34: error: ‘ruby_current_ec’ undeclared (first use in this function)
     rb_execution_context_t *ec = ruby_current_ec;
                                  ^
vm_core.h:1870:34: note: each undeclared identifier is reported only once for each function it appears in
miniinit.c: At top level:
cc1: warning: unrecognized command line option "-Wno-tautological-compare" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-parentheses-equality" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-cast-function-type" [enabled by default]
make: *** [miniinit.o] Error 1

```

Both Ruby 3.0.4 and 3.1.2 build without error and pass (all but one of) the `make check` tests.

I know RHEL 7 is getting to be pretty old; I suspect a factor here are the ancient build tools available to me. But... EOL for Ruby 2.7 comes before the one for RHEL 7, so I'm trying to prioritize.

---Files--------------------------------
ruby322BuildFailure-20230404.Dockerfile (531 Bytes)


-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ruby-core:113126] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7
  2022-11-29 20:30 [ruby-core:111075] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat 7 werebus (Matt Moretti)
                   ` (9 preceding siblings ...)
  2023-04-05  5:52 ` [ruby-core:113125] " nobu (Nobuyoshi Nakada) via ruby-core
@ 2023-04-05 11:24 ` nobu (Nobuyoshi Nakada) via ruby-core
  2023-04-05 17:41 ` [ruby-core:113134] " eviljoel (evil joel) via ruby-core
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: nobu (Nobuyoshi Nakada) via ruby-core @ 2023-04-05 11:24 UTC (permalink / raw)
  To: ruby-core; +Cc: nobu (Nobuyoshi Nakada)

Issue #19161 has been updated by nobu (Nobuyoshi Nakada).


The gcc on CentOS7 is based on old 4.8.5 and its C11 support seems half-baked, i.e., `_Thread_local` storage class is not supported.


----------------------------------------
Bug #19161: Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7
https://bugs.ruby-lang.org/issues/19161#change-102661

* Author: werebus (Matt Moretti)
* Status: Feedback
* Priority: Normal
* Backport: 2.7: DONTNEED, 3.0: REQUIRED, 3.1: DONE, 3.2: DONE
----------------------------------------
When attempting to run `make` on either the 3.0.5 or 3.1.3 release, I get the following error (I included the whole output as it's pretty short):


```
	BASERUBY = /opt/ruby/bin/ruby --disable=gems
	CC = gcc -std=gnu11
	LD = ld
	LDSHARED = gcc -std=gnu11 -shared
	CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable  
	XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -fPIE -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/13.0.0
	CPPFLAGS =   
	DLDFLAGS = -Wl,--compress-debug-sections=zlib -fstack-protector-strong -pie  
	SOLIBS = -lz -lpthread -lrt -lrt -ldl -lcrypt -lm 
	LANG = en_US.UTF-8
	LC_ALL = 
	LC_CTYPE = 
	MFLAGS = 
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 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 ./main.c
compiling dmydln.c
compiling miniinit.c
In file included from vm_core.h:83:0,
                 from iseq.h:14,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
thread_pthread.h:108:43: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘struct’
     RUBY_EXTERN RB_THREAD_LOCAL_SPECIFIER struct rb_execution_context_struct *ruby_current_ec;
                                           ^
In file included from iseq.h:14:0,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
vm_core.h: In function ‘rb_current_execution_context’:
vm_core.h:1870:34: error: ‘ruby_current_ec’ undeclared (first use in this function)
     rb_execution_context_t *ec = ruby_current_ec;
                                  ^
vm_core.h:1870:34: note: each undeclared identifier is reported only once for each function it appears in
miniinit.c: At top level:
cc1: warning: unrecognized command line option "-Wno-tautological-compare" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-parentheses-equality" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-cast-function-type" [enabled by default]
make: *** [miniinit.o] Error 1

```

Both Ruby 3.0.4 and 3.1.2 build without error and pass (all but one of) the `make check` tests.

I know RHEL 7 is getting to be pretty old; I suspect a factor here are the ancient build tools available to me. But... EOL for Ruby 2.7 comes before the one for RHEL 7, so I'm trying to prioritize.

---Files--------------------------------
ruby322BuildFailure-20230404.Dockerfile (531 Bytes)


-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ruby-core:113134] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7
  2022-11-29 20:30 [ruby-core:111075] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat 7 werebus (Matt Moretti)
                   ` (10 preceding siblings ...)
  2023-04-05 11:24 ` [ruby-core:113126] " nobu (Nobuyoshi Nakada) via ruby-core
@ 2023-04-05 17:41 ` eviljoel (evil joel) via ruby-core
  2023-04-06  4:37 ` [ruby-core:113146] " nobu (Nobuyoshi Nakada) via ruby-core
  2024-03-25  7:42 ` [ruby-core:117309] " Aile5ooQuaerah1oiyoh (- -) via ruby-core
  13 siblings, 0 replies; 15+ messages in thread
From: eviljoel (evil joel) via ruby-core @ 2023-04-05 17:41 UTC (permalink / raw)
  To: ruby-core; +Cc: eviljoel (evil joel)

Issue #19161 has been updated by eviljoel (evil joel).

File ruby-3.0.6-config.log added
File ruby-3.0.6-config.status added
File ruby-3.1.4-config.log added
File ruby-3.1.4-config.status added
File ruby-3.2.2-config.log added
File ruby-3.2.2-config.status added

@nobu, attached are the requested files. I also included files for Ruby 3.1.4 and 3.0.6. All three versions reported this was fixed but all three versions get the same build error.

I agree that GCC 4.8.5 has incomplete C11 support, but I want to remind you that this is a regression for Ruby 3.1 and 3.0. Ruby 3.1.2 and Ruby 3.0.4 build fine on CentOS 7. It would also be nice if Ruby 3.2 supported building on CentOS 7.

Would a better solution be to just revert to using Autoconf 2.69?

Concerning checking the SHA256SUM, geeze, that was obvious. Thanks for the tip.

----------------------------------------
Bug #19161: Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7
https://bugs.ruby-lang.org/issues/19161#change-102669

* Author: werebus (Matt Moretti)
* Status: Feedback
* Priority: Normal
* Backport: 2.7: DONTNEED, 3.0: REQUIRED, 3.1: DONE, 3.2: DONE
----------------------------------------
When attempting to run `make` on either the 3.0.5 or 3.1.3 release, I get the following error (I included the whole output as it's pretty short):


```
	BASERUBY = /opt/ruby/bin/ruby --disable=gems
	CC = gcc -std=gnu11
	LD = ld
	LDSHARED = gcc -std=gnu11 -shared
	CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable  
	XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -fPIE -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/13.0.0
	CPPFLAGS =   
	DLDFLAGS = -Wl,--compress-debug-sections=zlib -fstack-protector-strong -pie  
	SOLIBS = -lz -lpthread -lrt -lrt -ldl -lcrypt -lm 
	LANG = en_US.UTF-8
	LC_ALL = 
	LC_CTYPE = 
	MFLAGS = 
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 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 ./main.c
compiling dmydln.c
compiling miniinit.c
In file included from vm_core.h:83:0,
                 from iseq.h:14,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
thread_pthread.h:108:43: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘struct’
     RUBY_EXTERN RB_THREAD_LOCAL_SPECIFIER struct rb_execution_context_struct *ruby_current_ec;
                                           ^
In file included from iseq.h:14:0,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
vm_core.h: In function ‘rb_current_execution_context’:
vm_core.h:1870:34: error: ‘ruby_current_ec’ undeclared (first use in this function)
     rb_execution_context_t *ec = ruby_current_ec;
                                  ^
vm_core.h:1870:34: note: each undeclared identifier is reported only once for each function it appears in
miniinit.c: At top level:
cc1: warning: unrecognized command line option "-Wno-tautological-compare" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-parentheses-equality" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-cast-function-type" [enabled by default]
make: *** [miniinit.o] Error 1

```

Both Ruby 3.0.4 and 3.1.2 build without error and pass (all but one of) the `make check` tests.

I know RHEL 7 is getting to be pretty old; I suspect a factor here are the ancient build tools available to me. But... EOL for Ruby 2.7 comes before the one for RHEL 7, so I'm trying to prioritize.

---Files--------------------------------
ruby322BuildFailure-20230404.Dockerfile (531 Bytes)
ruby-3.0.6-config.status (33.2 KB)
ruby-3.0.6-config.log (1.33 MB)
ruby-3.1.4-config.log (1.36 MB)
ruby-3.1.4-config.status (32.8 KB)
ruby-3.2.2-config.status (33.4 KB)
ruby-3.2.2-config.log (1.44 MB)


-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ruby-core:113146] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7
  2022-11-29 20:30 [ruby-core:111075] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat 7 werebus (Matt Moretti)
                   ` (11 preceding siblings ...)
  2023-04-05 17:41 ` [ruby-core:113134] " eviljoel (evil joel) via ruby-core
@ 2023-04-06  4:37 ` nobu (Nobuyoshi Nakada) via ruby-core
  2024-03-25  7:42 ` [ruby-core:117309] " Aile5ooQuaerah1oiyoh (- -) via ruby-core
  13 siblings, 0 replies; 15+ messages in thread
From: nobu (Nobuyoshi Nakada) via ruby-core @ 2023-04-06  4:37 UTC (permalink / raw)
  To: ruby-core; +Cc: nobu (Nobuyoshi Nakada)

Issue #19161 has been updated by nobu (Nobuyoshi Nakada).


WIP https://github.com/nobu/ruby/tree/detect-tls

----------------------------------------
Bug #19161: Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7
https://bugs.ruby-lang.org/issues/19161#change-102681

* Author: werebus (Matt Moretti)
* Status: Feedback
* Priority: Normal
* Backport: 2.7: DONTNEED, 3.0: REQUIRED, 3.1: DONE, 3.2: DONE
----------------------------------------
When attempting to run `make` on either the 3.0.5 or 3.1.3 release, I get the following error (I included the whole output as it's pretty short):


```
	BASERUBY = /opt/ruby/bin/ruby --disable=gems
	CC = gcc -std=gnu11
	LD = ld
	LDSHARED = gcc -std=gnu11 -shared
	CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable  
	XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -fPIE -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/13.0.0
	CPPFLAGS =   
	DLDFLAGS = -Wl,--compress-debug-sections=zlib -fstack-protector-strong -pie  
	SOLIBS = -lz -lpthread -lrt -lrt -ldl -lcrypt -lm 
	LANG = en_US.UTF-8
	LC_ALL = 
	LC_CTYPE = 
	MFLAGS = 
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 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 ./main.c
compiling dmydln.c
compiling miniinit.c
In file included from vm_core.h:83:0,
                 from iseq.h:14,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
thread_pthread.h:108:43: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘struct’
     RUBY_EXTERN RB_THREAD_LOCAL_SPECIFIER struct rb_execution_context_struct *ruby_current_ec;
                                           ^
In file included from iseq.h:14:0,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
vm_core.h: In function ‘rb_current_execution_context’:
vm_core.h:1870:34: error: ‘ruby_current_ec’ undeclared (first use in this function)
     rb_execution_context_t *ec = ruby_current_ec;
                                  ^
vm_core.h:1870:34: note: each undeclared identifier is reported only once for each function it appears in
miniinit.c: At top level:
cc1: warning: unrecognized command line option "-Wno-tautological-compare" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-parentheses-equality" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-cast-function-type" [enabled by default]
make: *** [miniinit.o] Error 1

```

Both Ruby 3.0.4 and 3.1.2 build without error and pass (all but one of) the `make check` tests.

I know RHEL 7 is getting to be pretty old; I suspect a factor here are the ancient build tools available to me. But... EOL for Ruby 2.7 comes before the one for RHEL 7, so I'm trying to prioritize.

---Files--------------------------------
ruby322BuildFailure-20230404.Dockerfile (531 Bytes)
ruby-3.0.6-config.status (33.2 KB)
ruby-3.0.6-config.log (1.33 MB)
ruby-3.1.4-config.log (1.36 MB)
ruby-3.1.4-config.status (32.8 KB)
ruby-3.2.2-config.status (33.4 KB)
ruby-3.2.2-config.log (1.44 MB)


-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ruby-core:117309] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7
  2022-11-29 20:30 [ruby-core:111075] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat 7 werebus (Matt Moretti)
                   ` (12 preceding siblings ...)
  2023-04-06  4:37 ` [ruby-core:113146] " nobu (Nobuyoshi Nakada) via ruby-core
@ 2024-03-25  7:42 ` Aile5ooQuaerah1oiyoh (- -) via ruby-core
  13 siblings, 0 replies; 15+ messages in thread
From: Aile5ooQuaerah1oiyoh (- -) via ruby-core @ 2024-03-25  7:42 UTC (permalink / raw)
  To: ruby-core; +Cc: Aile5ooQuaerah1oiyoh (- -)

Issue #19161 has been updated by Aile5ooQuaerah1oiyoh (- -).


> From here, I found a simple workaround: ./configure cflags="-std=gnu99". Just FYI.

> I can confirm that adding cflags="-std=gnu99" to the configure step worked around my issue. Re-running ./autogen.sh on the server in question also worked.

Just a notice/heads-up that when modifying CFLAGS you need to remember to keep optimization flags "-O2"/"-O3".
Failure to build Ruby with optimizations was observed to cause a multi-fold performance decrease when CRuby is operated under production-level loads (in Rails).

E.g., when building CRuby 3.x using Rbenv on CentOS 7, the proper command would be:

```
$ RUBY_CFLAGS='-std=gnu99 -O2' rbenv install 3.0.6
```

----------------------------------------
Bug #19161: Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7
https://bugs.ruby-lang.org/issues/19161#change-107451

* Author: werebus (Matt Moretti)
* Status: Feedback
* Backport: 2.7: DONTNEED, 3.0: REQUIRED, 3.1: DONE, 3.2: DONE
----------------------------------------
When attempting to run `make` on either the 3.0.5 or 3.1.3 release, I get the following error (I included the whole output as it's pretty short):


```
	BASERUBY = /opt/ruby/bin/ruby --disable=gems
	CC = gcc -std=gnu11
	LD = ld
	LDSHARED = gcc -std=gnu11 -shared
	CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable  
	XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -fPIE -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/13.0.0
	CPPFLAGS =   
	DLDFLAGS = -Wl,--compress-debug-sections=zlib -fstack-protector-strong -pie  
	SOLIBS = -lz -lpthread -lrt -lrt -ldl -lcrypt -lm 
	LANG = en_US.UTF-8
	LC_ALL = 
	LC_CTYPE = 
	MFLAGS = 
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 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 ./main.c
compiling dmydln.c
compiling miniinit.c
In file included from vm_core.h:83:0,
                 from iseq.h:14,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
thread_pthread.h:108:43: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘struct’
     RUBY_EXTERN RB_THREAD_LOCAL_SPECIFIER struct rb_execution_context_struct *ruby_current_ec;
                                           ^
In file included from iseq.h:14:0,
                 from mini_builtin.c:3,
                 from miniinit.c:51:
vm_core.h: In function ‘rb_current_execution_context’:
vm_core.h:1870:34: error: ‘ruby_current_ec’ undeclared (first use in this function)
     rb_execution_context_t *ec = ruby_current_ec;
                                  ^
vm_core.h:1870:34: note: each undeclared identifier is reported only once for each function it appears in
miniinit.c: At top level:
cc1: warning: unrecognized command line option "-Wno-tautological-compare" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-parentheses-equality" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-cast-function-type" [enabled by default]
make: *** [miniinit.o] Error 1

```

Both Ruby 3.0.4 and 3.1.2 build without error and pass (all but one of) the `make check` tests.

I know RHEL 7 is getting to be pretty old; I suspect a factor here are the ancient build tools available to me. But... EOL for Ruby 2.7 comes before the one for RHEL 7, so I'm trying to prioritize.

---Files--------------------------------
ruby322BuildFailure-20230404.Dockerfile (531 Bytes)
ruby-3.0.6-config.status (33.2 KB)
ruby-3.0.6-config.log (1.33 MB)
ruby-3.1.4-config.log (1.36 MB)
ruby-3.1.4-config.status (32.8 KB)
ruby-3.2.2-config.status (33.4 KB)
ruby-3.2.2-config.log (1.44 MB)


-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2024-03-25  7:42 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-29 20:30 [ruby-core:111075] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat 7 werebus (Matt Moretti)
2022-11-30  2:18 ` [ruby-core:111078] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7 nobu (Nobuyoshi Nakada)
2022-11-30  7:52 ` [ruby-core:111085] " hsbt (Hiroshi SHIBATA)
2022-11-30  8:43 ` [ruby-core:111087] " mame (Yusuke Endoh)
2022-11-30 17:17 ` [ruby-core:111093] " werebus (Matt Moretti)
2023-03-08 23:56 ` [ruby-core:112750] " hsbt (Hiroshi SHIBATA) via ruby-core
2023-03-20  5:01 ` [ruby-core:112946] " naruse (Yui NARUSE) via ruby-core
2023-03-21  7:50 ` [ruby-core:112967] " nagachika (Tomoyuki Chikanaga) via ruby-core
2023-04-05  1:43 ` [ruby-core:113121] " eviljoel (evil joel) via ruby-core
2023-04-05  5:31 ` [ruby-core:113124] " nobu (Nobuyoshi Nakada) via ruby-core
2023-04-05  5:52 ` [ruby-core:113125] " nobu (Nobuyoshi Nakada) via ruby-core
2023-04-05 11:24 ` [ruby-core:113126] " nobu (Nobuyoshi Nakada) via ruby-core
2023-04-05 17:41 ` [ruby-core:113134] " eviljoel (evil joel) via ruby-core
2023-04-06  4:37 ` [ruby-core:113146] " nobu (Nobuyoshi Nakada) via ruby-core
2024-03-25  7:42 ` [ruby-core:117309] " Aile5ooQuaerah1oiyoh (- -) via ruby-core

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).