https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112021-08-09T18:01:15ZRuby Issue Tracking SystemRuby master - Bug #18073: test/ruby/test_jit.rb: "error: invalid use of '__builtin_va_arg_pack ()'" on Ruby 2.7.4 on gcc 4.8.5https://redmine.ruby-lang.org/issues/18073?journal_id=931982021-08-09T18:01:15Zjaruga (Jun Aruga)
<ul><li><strong>File</strong> <a href="/attachments/8965">configure.log</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/8965/configure.log">configure.log</a> added</li><li><strong>File</strong> <a href="/attachments/8966">make.log</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/8966/make.log">make.log</a> added</li><li><strong>File</strong> <a href="/attachments/8967">make_test-all_test_jit.log</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/8967/make_test-all_test_jit.log">make_test-all_test_jit.log</a> added</li></ul> Ruby master - Bug #18073: test/ruby/test_jit.rb: "error: invalid use of '__builtin_va_arg_pack ()'" on Ruby 2.7.4 on gcc 4.8.5https://redmine.ruby-lang.org/issues/18073?journal_id=931992021-08-09T18:06:23Zjaruga (Jun Aruga)
<ul><li><strong>Subject</strong> changed from <i>test/ruby/test_jit.rb: failures "error: invalid use of '__builtin_va_arg_pack ()'" on Ruby 2.7.4 on gcc 4.8.5 on RHEL7 </i> to <i>test/ruby/test_jit.rb: "error: invalid use of '__builtin_va_arg_pack ()'" on Ruby 2.7.4 on gcc 4.8.5</i></li></ul> Ruby master - Bug #18073: test/ruby/test_jit.rb: "error: invalid use of '__builtin_va_arg_pack ()'" on Ruby 2.7.4 on gcc 4.8.5https://redmine.ruby-lang.org/issues/18073?journal_id=932132021-08-10T07:28:44Zjaruga (Jun Aruga)
<ul></ul><p>I confirmed this failures are reproduced at RubyCI - CentOS 7.6(1810) x86_64 - 2.7 case.<br>
<a href="http://rubyci.s3.amazonaws.com/centos7/ruby-2.7/log/20210810T041843Z.fail.html.gz" class="external">http://rubyci.s3.amazonaws.com/centos7/ruby-2.7/log/20210810T041843Z.fail.html.gz</a></p> Ruby master - Bug #18073: test/ruby/test_jit.rb: "error: invalid use of '__builtin_va_arg_pack ()'" on Ruby 2.7.4 on gcc 4.8.5https://redmine.ruby-lang.org/issues/18073?journal_id=932162021-08-10T09:02:46Zjaruga (Jun Aruga)
<ul></ul><p>I executed <code>git bisect</code> between <code>v2_7_3</code> and <code>v2_7_4</code>. And I found the following commit causes these test failures.</p>
<p>Fix 2.7 build<br>
<a href="https://github.com/ruby/ruby/commit/29bbad939939c6dceb804aac667ba372fdee4ef5" class="external">https://github.com/ruby/ruby/commit/29bbad939939c6dceb804aac667ba372fdee4ef5</a></p>
<hr>
<p>I checked like this by <code>git bisect</code></p>
<pre><code>$ cat ~/work/test.sh
#!/bin/bash
set -ex
git clean -fdx
autoconf
./configure --enable-shared --prefix $(pwd)/dest
make
make test-all TESTS="-v test/ruby/test_jit.rb -n TestJIT#test_compile_insn_local"
</code></pre>
<p>Then run.</p>
<pre><code>$ git bisect start v2_7_4 v2_7_3
$ git bisect run ~/work/test.sh
...
29bbad939939c6dceb804aac667ba372fdee4ef5 is the first bad commit
...
bisect run success
</code></pre> Ruby master - Bug #18073: test/ruby/test_jit.rb: "error: invalid use of '__builtin_va_arg_pack ()'" on Ruby 2.7.4 on gcc 4.8.5https://redmine.ruby-lang.org/issues/18073?journal_id=932172021-08-10T09:52:05Zjaruga (Jun Aruga)
<ul><li><strong>Backport</strong> changed from <i>2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN</i> to <i>2.6: UNKNOWN, 2.7: REQUIRED, 3.0: UNKNOWN</i></li></ul> Ruby master - Bug #18073: test/ruby/test_jit.rb: "error: invalid use of '__builtin_va_arg_pack ()'" on Ruby 2.7.4 on gcc 4.8.5https://redmine.ruby-lang.org/issues/18073?journal_id=932182021-08-10T09:54:34Zjaruga (Jun Aruga)
<ul><li><strong>Backport</strong> changed from <i>2.6: UNKNOWN, 2.7: REQUIRED, 3.0: UNKNOWN</i> to <i>2.6: UNKNOWN, 2.7: REQUIRED, 3.0: DONTNEED</i></li></ul> Ruby master - Bug #18073: test/ruby/test_jit.rb: "error: invalid use of '__builtin_va_arg_pack ()'" on Ruby 2.7.4 on gcc 4.8.5https://redmine.ruby-lang.org/issues/18073?journal_id=932202021-08-10T10:03:50Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul></ul><p>jaruga (Jun Aruga) wrote in <a href="#note-4">#note-4</a>:</p>
<blockquote>
<p>I executed <code>git bisect</code> between <code>v2_7_3</code> and <code>v2_7_4</code>. And I found the following commit causes these test failures.</p>
<p>Fix 2.7 build<br>
<a href="https://github.com/ruby/ruby/commit/29bbad939939c6dceb804aac667ba372fdee4ef5" class="external">https://github.com/ruby/ruby/commit/29bbad939939c6dceb804aac667ba372fdee4ef5</a></p>
</blockquote>
<p>This commit is for configure only.<br>
How the results of <code>configure</code> (config.status and config.h files) differ before and after this commit?</p> Ruby master - Bug #18073: test/ruby/test_jit.rb: "error: invalid use of '__builtin_va_arg_pack ()'" on Ruby 2.7.4 on gcc 4.8.5https://redmine.ruby-lang.org/issues/18073?journal_id=932212021-08-10T10:54:27Zjaruga (Jun Aruga)
<ul></ul><blockquote>
<p>This commit is for configure only.<br>
How the results of configure (config.status and config.h files) differ before and after this commit?</p>
</blockquote>
<p>I did ssh login to RubyCI CentOS7 server, and checked the files between commits <code>fd95a18059</code> (previous commit for <code>29bbad9399</code>) and <code>29bbad9399</code> (first failure),</p>
<pre><code>config.status
./.ext/include/x86_64-linux/ruby/config.h
</code></pre>
<p>by running the following commands.</p>
<pre><code>git clean -fdx
autoconf
./configure --enable-shared
</code></pre>
<p>For the <code>config.status</code>, here is the result of the difference. There are some differences by not sorted items.</p>
<pre><code>$ \diff -u ok.fd95a18059.config.status err.29bbad9399.config.status
--- ok.fd95a18059.config.status 2021-08-10 10:38:05.000139654 +0000
+++ err.29bbad9399.config.status 2021-08-10 10:25:19.967182125 +0000
@@ -791,18 +791,18 @@
S["GNU_LD"]="yes"
S["LD"]="ld"
S["GCC"]="yes"
-S["EGREP"]="/bin/grep -E"
-S["GREP"]="/bin/grep"
-S["CPP"]="$(CC) -E"
S["ac_ct_CXX"]=""
S["CXXFLAGS"]=""
S["CXX"]="g++"
+S["EGREP"]="/bin/grep -E"
+S["GREP"]="/bin/grep"
+S["CPP"]="gcc -E"
S["OBJEXT"]="o"
S["EXEEXT"]=""
+S["ac_ct_CC"]="gcc"
S["CPPFLAGS"]=" $(DEFS) ${cppflags}"
S["LDFLAGS"]="-L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic"
-S["CFLAGS"]="${cflags} -fPIC"
-S["ac_ct_CC"]="gcc"
+S["CFLAGS"]="-g -O2 -fPIC"
S["CC"]="gcc -std=gnu99"
S["target_os"]="linux"
S["target_vendor"]="pc"
</code></pre>
<p>However the essential difference is the following part.</p>
<pre><code>-S["CFLAGS"]="${cflags} -fPIC"
+S["CFLAGS"]="-g -O2 -fPIC"
</code></pre>
<p>For the <code>config.h</code>, here is the difference.</p>
<pre><code>$ \diff -u ok.fd95a18059.config.h err.29bbad9399.config.h
--- ok.fd95a18059.config.h 2021-08-10 10:38:04.799141259 +0000
+++ err.29bbad9399.config.h 2021-08-10 10:25:19.775183599 +0000
@@ -169,11 +169,8 @@
#define PRI_SIZE_PREFIX "z"
#define PRI_PTRDIFF_PREFIX "t"
#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
-#define HAVE_ST_BLKSIZE 1
#define HAVE_STRUCT_STAT_ST_BLOCKS 1
-#define HAVE_ST_BLOCKS 1
#define HAVE_STRUCT_STAT_ST_RDEV 1
-#define HAVE_ST_RDEV 1
#define SIZEOF_STRUCT_STAT_ST_SIZE SIZEOF_OFF_T
#define SIZEOF_STRUCT_STAT_ST_BLOCKS SIZEOF_OFF_T
#define SIZEOF_STRUCT_STAT_ST_INO SIZEOF_LONG
</code></pre> Ruby master - Bug #18073: test/ruby/test_jit.rb: "error: invalid use of '__builtin_va_arg_pack ()'" on Ruby 2.7.4 on gcc 4.8.5https://redmine.ruby-lang.org/issues/18073?journal_id=932282021-08-11T02:17:48Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul></ul><p>jaruga (Jun Aruga) wrote in <a href="#note-8">#note-8</a>:</p>
<blockquote>
<p>However the essential difference is the following part.</p>
<pre><code>-S["CFLAGS"]="${cflags} -fPIC"
+S["CFLAGS"]="-g -O2 -fPIC"
</code></pre>
</blockquote>
<p><code>${cflags}</code> should contain <code>${optflags} ${debugflags} ${warnflags}</code> by the default.<br>
That means the latter <code>CFLAGS</code> lacks these flags.<br>
Possibly it might affect the precompiled header.</p> Ruby master - Bug #18073: test/ruby/test_jit.rb: "error: invalid use of '__builtin_va_arg_pack ()'" on Ruby 2.7.4 on gcc 4.8.5https://redmine.ruby-lang.org/issues/18073?journal_id=932322021-08-11T06:38:46Zjaruga (Jun Aruga)
<ul></ul><blockquote>
<p><code>${cflags}</code> should contain ${optflags} ${debugflags} ${warnflags} by the default.<br>
That means the latter CFLAGS lacks these flags.<br>
Possibly it might affect the precompiled header.</p>
</blockquote>
<p><a class="user active user-mention" href="https://redmine.ruby-lang.org/users/4">@nobu (Nobuyoshi Nakada)</a> OK. Could you provide a patch to change only from <code>S["CFLAGS"]="-g -O2 -fPIC"</code> to <code>S["CFLAGS"]="${cflags} -fPIC"</code> in <code>config.status</code>? Then I am happy to test the patch or you can test it on the RubyCI CentOS7 server. Thanks.</p> Ruby master - Bug #18073: test/ruby/test_jit.rb: "error: invalid use of '__builtin_va_arg_pack ()'" on Ruby 2.7.4 on gcc 4.8.5https://redmine.ruby-lang.org/issues/18073?journal_id=932342021-08-11T07:48:24Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul></ul><p>jaruga (Jun Aruga) wrote in <a href="#note-10">#note-10</a>:</p>
<blockquote>
<p><a class="user active user-mention" href="https://redmine.ruby-lang.org/users/4">@nobu (Nobuyoshi Nakada)</a> OK. Could you provide a patch to change only from <code>S["CFLAGS"]="-g -O2 -fPIC"</code> to <code>S["CFLAGS"]="${cflags} -fPIC"</code> in <code>config.status</code>? Then I am happy to test the patch or you can test it on the RubyCI CentOS7 server. Thanks.</p>
</blockquote>
<p>It should be the default, unless you set <code>CFLAGS</code> at the command line or as the environment variable.</p> Ruby master - Bug #18073: test/ruby/test_jit.rb: "error: invalid use of '__builtin_va_arg_pack ()'" on Ruby 2.7.4 on gcc 4.8.5https://redmine.ruby-lang.org/issues/18073?journal_id=932362021-08-11T09:20:19Zjaruga (Jun Aruga)
<ul></ul><blockquote>
<p>It should be the default, unless you set CFLAGS at the command line or as the environment variable.</p>
</blockquote>
<p>As we chat, I confirmed the environment variable <code>CFLAGS</code> is not set before running <code>autoconf</code>, <code>./configure</code> again. The <code>CFLAGS: ${optflags} ${debugflags} ${warnflags}</code> is printed as an output of the <code>./configure</code>, but the actual value is <code>S["CFLAGS"]="-g -O2 -fPIC"</code> in <code>config.status</code>.</p>
<pre><code>$ git checkout 29bbad939939c6dceb804aac667ba372fdee4ef5
$ git clean -fdx
$ echo "CFLAGS: $CFLAGS"
CFLAGS:
$ env | grep CFLAGS
$ echo $?
1
$ unset CFLAGS
$ echo $?
0
$ autoconf
$ ./configure --enable-shared 2>&1 | tee configure.log
...
---
Configuration summary for ruby version 2.7.4
...
* CFLAGS: ${optflags} ${debugflags} ${warnflags}
...
$ grep '"CFLAGS"' config.status
S["CFLAGS"]="-g -O2 -fPIC"
</code></pre>
<p>I also compared the difference of the outputs of the <code>./configure --enable-shared</code>, sorting the result by the <code>sort</code> command to only see the essential differences. And here is the result of the difference.</p>
<pre><code>$ \diff -u ok.fd95a18059.configure_sorted.log err.29bbad9399.configure_sorted.log
--- ok.fd95a18059.configure_sorted.log 2021-08-11 09:10:44.858148283 +0000
+++ err.29bbad9399.configure_sorted.log 2021-08-11 09:11:11.689938763 +0000
@@ -507,7 +507,7 @@
checking grp.h presence... yes
checking grp.h usability... yes
checking host system type... x86_64-pc-linux-gnu
-checking how to run the C preprocessor... gcc -std=gnu99 -E
+checking how to run the C preprocessor... gcc -E
checking ieeefp.h presence... no
checking ieeefp.h usability... no
checking if enum over int is allowed... yes
@@ -543,7 +543,6 @@
checking pthread.h usability... yes
checking pwd.h presence... yes
checking pwd.h usability... yes
-checking return type of signal handlers... void
checking sanitizer/asan_interface.h presence... no
checking sanitizer/asan_interface.h usability... no
checking sanitizer/msan_interface.h presence... no
@@ -694,7 +693,7 @@
checking whether dtrace USDT is available... no
checking whether finite is declared... yes
checking whether g++ accepts -g... no
-checking whether gcc -std=gnu99 -E accepts -o... yes
+checking whether gcc -E accepts -o... yes
checking whether gcc -std=gnu99 needs -traditional... no
checking whether gcc accepts -g... yes
checking whether getenv is declared... yes
</code></pre> Ruby master - Bug #18073: test/ruby/test_jit.rb: "error: invalid use of '__builtin_va_arg_pack ()'" on Ruby 2.7.4 on gcc 4.8.5https://redmine.ruby-lang.org/issues/18073?journal_id=932482021-08-11T17:51:11Zxtkoba (Tee KOBAYASHI)
<ul></ul><p>It seems that in <code>configure.ac</code>, <code>AC_PROG_CC_C99</code> must come before <code>AC_PREPROC_IFELSE</code> to set <code>CPP</code> correctly. That is,</p>
<pre><code>AC_INIT
ac_cv_prog_cc_c99=-std=gnu99
AC_PROG_CC_C99
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[]])],[],[])
echo "CC:" "$CC"
echo "CPP:" "$CPP"
</code></pre>
<p>works fine, while</p>
<pre><code>AC_INIT
ac_cv_prog_cc_c99=-std=gnu99
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[]])],[],[])
AC_PROG_CC_C99
echo "CC:" "$CC"
echo "CPP:" "$CPP"
</code></pre>
<p>does not.</p>
<p>The relevant part of <code>configure.ac</code> diff is shown below:</p>
<pre><code class="diff syntaxhl" data-language="diff"><span class="gd">--- ruby-2.7.3/configure.ac
</span><span class="gi">+++ ruby-2.7.4/configure.ac
</span><span class="err">
</span><span class="p">@@ -177,12 +180,14 @@</span>
# clang version 1.0 (http://llvm.org/svn/llvm-project/cfe/tags/Apple/clang-23 exported)
# Apple clang version 2.0 (tags/Apple/clang-137) (based on LLVM 2.9svn)
# Apple clang version 2.1 (tags/Apple/clang-163.7.1) (based on LLVM 3.0svn)
<span class="gd">- AS_IF([! $CC -E -xc - <<SRC >/dev/null], [
- @%:@if defined __APPLE_CC__ && defined __clang_major__ && __clang_major__ < 3
- @%:@error premature clang
- @%:@endif
-SRC
- AC_MSG_ERROR([clang version 3.0 or later is required])
</span><span class="gi">+ AC_PREPROC_IFELSE(
+ [AC_LANG_PROGRAM([
+ @%:@if defined __APPLE_CC__ && defined __clang_major__ && __clang_major__ < 3
+ @%:@error premature clang
+ @%:@endif
+ ])],
+ [],
+ [AC_MSG_ERROR([clang version 3.0 or later is required])
</span> ])],
[openbsd*:openbsd*], [
AC_CHECK_TOOLS(CC, [cc])
<span class="p">@@ -191,7 +196,9 @@</span>
AC_CHECK_TOOL(CC, gcc)
])
<span class="gd">-AC_PROG_CC_C99
</span><span class="gi">+dnl Seems necessarily in order to add -std=gnu99 option for gcc 4.9.
+m4_version_prereq([2.70], [], [AC_PROG_CC_C99])
+
</span> AS_CASE([$CC],
[gcc-*], [
gcc_prefix=gcc- gcc_suffix=`echo "$CC" | sed 's/^gcc//'`
</code></pre> Ruby master - Bug #18073: test/ruby/test_jit.rb: "error: invalid use of '__builtin_va_arg_pack ()'" on Ruby 2.7.4 on gcc 4.8.5https://redmine.ruby-lang.org/issues/18073?journal_id=932542021-08-12T08:49:58Zjaruga (Jun Aruga)
<ul></ul><p><a class="user active user-mention" href="https://redmine.ruby-lang.org/users/48178">@xtkoba (Tee KOBAYASHI)</a> thanks for the info. I confirmed the value of <code>CPP</code> on RHEL 7 autoconf version 2.69.</p>
<p>The following <code>configure.ac</code> works fine.</p>
<pre><code>$ cat configure.ac
AC_INIT
ac_cv_prog_cc_c99=-std=gnu99
AC_PROG_CC_C99
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[]])],[],[])
echo "CC:" "$CC"
echo "CPP:" "$CPP"
$ autoconf
$ ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for gcc option to accept ISO C99... (cached) -std=gnu99
checking how to run the C preprocessor... gcc -std=gnu99 -E
CC: gcc -std=gnu99
CPP: gcc -std=gnu99 -E
</code></pre>
<p>The following <code>configure.ac</code> doesn't.</p>
<pre><code>$ cat configure.ac
AC_INIT
ac_cv_prog_cc_c99=-std=gnu99
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[]])],[],[])
AC_PROG_CC_C99
echo "CC:" "$CC"
echo "CPP:" "$CPP"
$ autoconf
$ ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for gcc option to accept ISO C99... (cached) -std=gnu99
CC: gcc -std=gnu99
CPP: gcc -E
</code></pre> Ruby master - Bug #18073: test/ruby/test_jit.rb: "error: invalid use of '__builtin_va_arg_pack ()'" on Ruby 2.7.4 on gcc 4.8.5https://redmine.ruby-lang.org/issues/18073?journal_id=932612021-08-12T18:16:15Zjaruga (Jun Aruga)
<ul></ul><p>jaruga (Jun Aruga) wrote in <a href="#note-4">#note-4</a>:</p>
<blockquote>
<p>I executed <code>git bisect</code> between <code>v2_7_3</code> and <code>v2_7_4</code>. And I found the following commit causes these test failures.</p>
<p>Fix 2.7 build<br>
<a href="https://github.com/ruby/ruby/commit/29bbad939939c6dceb804aac667ba372fdee4ef5" class="external">https://github.com/ruby/ruby/commit/29bbad939939c6dceb804aac667ba372fdee4ef5</a></p>
</blockquote>
<p>As a temporary workaround to build Ruby 2.7.4 on RHEL7, I am applying a patch to revert above commit, and I see the test failures in test/ruby/test_jit.rb are gone.</p> Ruby master - Bug #18073: test/ruby/test_jit.rb: "error: invalid use of '__builtin_va_arg_pack ()'" on Ruby 2.7.4 on gcc 4.8.5https://redmine.ruby-lang.org/issues/18073?journal_id=951242021-12-03T15:04:02Zivoanjo (Ivo Anjo)ivo.anjo@datadoghq.com
<ul></ul><p>I run into a similar issue (in <a href="https://github.com/DataDog/dd-trace-rb/issues/1799" class="external">https://github.com/DataDog/dd-trace-rb/issues/1799</a>); in my case, I was running the Semaphore CI Ruby image for 2.7.5 and when trying to run with JIT I get the same failures</p>
<pre><code>semaphore@semaphore-vm:~$ ruby -v
ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [x86_64-linux]
semaphore@semaphore-vm:~$ gcc -v 2>&1 | grep "gcc version"
gcc version 4.8.5 (Ubuntu 4.8.5-4ubuntu8)
semaphore@semaphore-vm:~$ ruby --jit --jit-warnings --jit-debug --jit-verbose=2 -e 'def foo; end; while true; foo; end'
MJIT: CC defaults to /usr/bin/gcc
MJIT: tmp_dir is /tmp
Creating precompiled header
Starting process: /usr/bin/gcc /usr/bin/gcc -std=gnu99 -w -Wfatal-errors -fPIC -shared -w -pipe -ggdb3 -nodefaultlibs -nostdlib -o /tmp/_ruby_mjit_hp4368u0.h.gch /home/semaphore/.rbenv/versions/2.7.5/include/ruby-2.7.0/x86_64-linux/rb_mjit_min_header-2.7.5.h
start compilation: foo@-e:1 -> /tmp/_ruby_mjit_p4368u1.c
Starting process: /usr/bin/gcc /usr/bin/gcc -std=gnu99 -w -Wfatal-errors -fPIC -shared -w -pipe -ggdb3 -o /tmp/_ruby_mjit_p4368u1.o /tmp/_ruby_mjit_p4368u1.c -c -nostartfiles -nodefaultlibs -nostdlib
/home/semaphore/.rbenv/versions/2.7.5/include/ruby-2.7.0/x86_64-linux/rb_mjit_min_header-2.7.5.h: In function 'sprintf':
/home/semaphore/.rbenv/versions/2.7.5/include/ruby-2.7.0/x86_64-linux/rb_mjit_min_header-2.7.5.h:406:3: error: invalid use of '__builtin_va_arg_pack ()'
return __builtin___sprintf_chk (__s, 2 - 1,
^
compilation terminated due to -Wfatal-errors.
compile_c_to_o: compile error: 1
Failed to generate so: /tmp/_ruby_mjit_p4368u1.so
start compilation: block in already_loaded?@/home/semaphore/.rbenv/versions/2.7.5/lib/ruby/site_ruby/2.7.0/rubygems.rb:1290 -> /tmp/_ruby_mjit_p4368u0.c
Starting process: /usr/bin/gcc /usr/bin/gcc -std=gnu99 -w -Wfatal-errors -fPIC -shared -w -pipe -ggdb3 -o /tmp/_ruby_mjit_p4368u0.o /tmp/_ruby_mjit_p4368u0.c -c -nostartfiles -nodefaultlibs -nostdlib
/home/semaphore/.rbenv/versions/2.7.5/include/ruby-2.7.0/x86_64-linux/rb_mjit_min_header-2.7.5.h: In function 'sprintf':
/home/semaphore/.rbenv/versions/2.7.5/include/ruby-2.7.0/x86_64-linux/rb_mjit_min_header-2.7.5.h:406:3: error: invalid use of '__builtin_va_arg_pack ()'
return __builtin___sprintf_chk (__s, 2 - 1,
^
compilation terminated due to -Wfatal-errors.
compile_c_to_o: compile error: 1
Failed to generate so: /tmp/_ruby_mjit_p4368u0.so
</code></pre>
<p>Would it make sense to perhaps validate that the mjit header is compilable after generating it?</p> Ruby master - Bug #18073: test/ruby/test_jit.rb: "error: invalid use of '__builtin_va_arg_pack ()'" on Ruby 2.7.4 on gcc 4.8.5https://redmine.ruby-lang.org/issues/18073?journal_id=1043472023-08-25T16:48:56Zjeremyevans0 (Jeremy Evans)merch-redmine@jeremyevans.net
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li></ul><p>These failures look related to MJIT, which has been removed.</p>