ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: "werebus (Matt Moretti)" <noreply@ruby-lang.org>
To: ruby-core@ml.ruby-lang.org
Subject: [ruby-core:111093] [Ruby master Bug#19161] Cannot compile 3.0.5 or 3.1.3 on Red Hat Enterprise Linux 7
Date: Wed, 30 Nov 2022 17:17:40 +0000 (UTC)	[thread overview]
Message-ID: <redmine.journal-100358.20221130171739.52579@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-19161.20221129203034.52579@ruby-lang.org

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/

  parent reply	other threads:[~2022-11-30 17:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` werebus (Matt Moretti) [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-100358.20221130171739.52579@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    --cc=ruby-core@ml.ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).