x86_64-pc-linux-gnu-gcc -c -I. -I. -DHAVE_CONFIG_H -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=500 -DFLEXLEXER_HDR=\"`echo FlexLexer|sed 's,^,re,'`.h\" -pipe -march=native -fno-diagnostics-color -O2 yylex.c x86_64-pc-linux-gnu-gcc -pipe -march=native -fno-diagnostics-color -O2 -o flex -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 ccl.o dfa.o ecs.o gen.o main.o misc.o nfa.o parse.o scan.o skel.o sym.o tblcmp.o yylex.o libfl.a /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: yylex.o: warning: relocation against `yytext' in read-only section `.text' /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: main.o: in function `flexinit': main.c:(.text+0x277c): undefined reference to `set_input_file' /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: dfa.o: in function `ntod': dfa.c:(.text+0x1a14): undefined reference to `flex_free' ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.1_desktop_gnome_systemd-j4-20221127-160925 ------------------------------------------------------------------- GNUMAKEFLAGS="$GNUMAKEFLAGS --jobserver-style=pipe" GNUMAKEFLAGS="$GNUMAKEFLAGS --shuffle" gcc-config -l: [1] x86_64-pc-linux-gnu-11 [2] x86_64-pc-linux-gnu-12 * clang/llvm (if any): clang version 15.0.5 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm/15/bin Configuration file: /etc/clang/clang.cfg /usr/lib/llvm/15 15.0.5 Python 3.10.8 Available Ruby profiles: [1] ruby27 (with Rubygems) [2] ruby31 (with Rubygems) * Available Rust versions: [1] rust-bin-1.65.0 * The following VMs are available for generation-2: *) Eclipse Temurin JDK 17.0.5_p8 [openjdk-bin-17] 2) Eclipse Temurin JDK 8.352_p08 [openjdk-bin-8] Available Java Virtual Machines: [1] openjdk-bin-8 [2] openjdk-bin-17 system-vm php cli (if any): [1] php7.4 * [2] php8.0 [3] php8.1 HEAD of ::gentoo commit 778e45dc15e4ddaf1657741f0230427df3d219a8 Author: Repository mirror & CI <repomirrorci@gentoo.org> Date: Tue Nov 29 14:02:03 2022 +0000 2022-11-29 14:02:02 UTC emerge -qpvO sys-devel/reflex [ebuild N ] sys-devel/reflex-20221012 USE="-verify-sig"
Created attachment 838083 [details] emerge-info.txt
Created attachment 838085 [details] emerge-history.txt.bz2
Created attachment 838087 [details] environment
Created attachment 838089 [details] etc.clang.tar.bz2
Created attachment 838091 [details] etc.portage.tar.bz2
Created attachment 838093 [details] logs.tar.bz2
Created attachment 838095 [details] sys-devel:reflex-20221012:20221129-152755.log
Created attachment 838097 [details] temp.tar.bz2
Reproduced with reflex-20230206 (to-be-pushed) with: 1. make distclean 2. ./configure 2. make --shuffle=1146935951 -j32 ``` gcc -c -I. -I. -DHAVE_CONFIG_H -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=500 -DFLEXLEXER_HDR=\"`echo FlexLexer|sed 's,^,re,'`.h\" -g -O2 main.c cp ./initscan.c scan.c gcc -c -I. -I. -DHAVE_CONFIG_H -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=500 -DFLEXLEXER_HDR=\"`echo FlexLexer|sed 's,^,re,'`.h\" -g -O2 tblcmp.c /bin/sh ./mkscan.sh ./flex -t -p ./scan.l >scan.c byacc -d ./parse.y gcc -c -I. -I. -DHAVE_CONFIG_H -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=500 -DFLEXLEXER_HDR=\"`echo FlexLexer|sed 's,^,re,'`.h\" -g -O2 libmain.c gcc -c -I. -I. -DHAVE_CONFIG_H -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=500 -DFLEXLEXER_HDR=\"`echo FlexLexer|sed 's,^,re,'`.h\" -g -O2 libyywrap.c touch .bootstrap gcc -c -I. -I. -DHAVE_CONFIG_H -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=500 -DFLEXLEXER_HDR=\"`echo FlexLexer|sed 's,^,re,'`.h\" -g -O2 nfa.c gcc -c -I. -I. -DHAVE_CONFIG_H -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=500 -DFLEXLEXER_HDR=\"`echo FlexLexer|sed 's,^,re,'`.h\" -g -O2 gen.c gcc -c -I. -I. -DHAVE_CONFIG_H -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=500 -DFLEXLEXER_HDR=\"`echo FlexLexer|sed 's,^,re,'`.h\" -g -O2 ecs.c ./mkscan.sh: 10: ./flex: not found gcc -c -I. -I. -DHAVE_CONFIG_H -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=500 -DFLEXLEXER_HDR=\"`echo FlexLexer|sed 's,^,re,'`.h\" -g -O2 skel.c gcc -c -I. -I. -DHAVE_CONFIG_H -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=500 -DFLEXLEXER_HDR=\"`echo FlexLexer|sed 's,^,re,'`.h\" -g -O2 ccl.c gcc -c -I. -I. -DHAVE_CONFIG_H -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=500 -DFLEXLEXER_HDR=\"`echo FlexLexer|sed 's,^,re,'`.h\" -g -O2 sym.c gcc -c -I. -I. -DHAVE_CONFIG_H -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=500 -DFLEXLEXER_HDR=\"`echo FlexLexer|sed 's,^,re,'`.h\" -g -O2 misc.c gcc -c -I. -I. -DHAVE_CONFIG_H -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=500 -DFLEXLEXER_HDR=\"`echo FlexLexer|sed 's,^,re,'`.h\" -g -O2 dfa.c gcc -c -I. -I. -DHAVE_CONFIG_H -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=500 -DFLEXLEXER_HDR=\"`echo FlexLexer|sed 's,^,re,'`.h\" -g -O2 scan.c gcc -c -I. -I. -DHAVE_CONFIG_H -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=500 -DFLEXLEXER_HDR=\"`echo FlexLexer|sed 's,^,re,'`.h\" -g -O2 parse.c gcc -c -I. -I. -DHAVE_CONFIG_H -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=500 -DFLEXLEXER_HDR=\"`echo FlexLexer|sed 's,^,re,'`.h\" -g -O2 yylex.c ar -curvU libfl.a libmain.o libyywrap.o a - libmain.o a - libyywrap.o ranlib libfl.a gcc -g -O2 -o flex ccl.o dfa.o ecs.o gen.o main.o misc.o nfa.o parse.o scan.o skel.o sym.o tblcmp.o yylex.o libfl.a /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: yylex.o: warning: relocation against `yytext' in read-only section `.text' /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: main.o: in function `flexinit': /var/tmp/portage/sys-devel/reflex-20230206/work/reflex-20230206/main.c:924: undefined reference to `set_input_file' /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: dfa.o: in function `ntod': /var/tmp/portage/sys-devel/reflex-20230206/work/reflex-20230206/dfa.c:711: undefined reference to `flex_free' /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/sys-devel/reflex-20230206/work/reflex-20230206/dfa.c:712: undefined reference to `flex_free' /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: gen.o: in function `gentabs': /var/tmp/portage/sys-devel/reflex-20230206/work/reflex-20230206/gen.c:940: undefined reference to `flex_free' /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: gen.o: in function `make_tables': /var/tmp/portage/sys-devel/reflex-20230206/work/reflex-20230206/gen.c:1447: undefined reference to `flexscan' /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: misc.o: in function `allocate_array': /var/tmp/portage/sys-devel/reflex-20230206/work/reflex-20230206/misc.c:107: undefined reference to `flex_alloc' /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: misc.o: in function `copy_string': /var/tmp/portage/sys-devel/reflex-20230206/work/reflex-20230206/misc.c:210: undefined reference to `flex_alloc' /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: misc.o: in function `reallocate_array': /var/tmp/portage/sys-devel/reflex-20230206/work/reflex-20230206/misc.c:827: undefined reference to `flex_realloc' /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: misc.o: in function `allocate_array': /var/tmp/portage/sys-devel/reflex-20230206/work/reflex-20230206/misc.c:107: undefined reference to `flex_alloc' /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: misc.o: in function `reallocate_array': /var/tmp/portage/sys-devel/reflex-20230206/work/reflex-20230206/misc.c:827: undefined reference to `flex_realloc' /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: misc.o: in function `yy_flex_xmalloc': /var/tmp/portage/sys-devel/reflex-20230206/work/reflex-20230206/misc.c:916: undefined reference to `flex_alloc' /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: sym.o: in function `addsym': /var/tmp/portage/sys-devel/reflex-20230206/work/reflex-20230206/sym.c:65: undefined reference to `flex_alloc' /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: yylex.o: in function `yylex': /var/tmp/portage/sys-devel/reflex-20230206/work/reflex-20230206/yylex.c:47: undefined reference to `flexscan' /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: yylex.o: in function `fprintf': /usr/include/bits/stdio2.h:79: undefined reference to `yytext' /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/include/bits/stdio2.h:79: undefined reference to `yytext' /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: warning: creating DT_TEXTREL in a PIE collect2: error: ld returned 1 exit status make: *** [Makefile:130: flex] Error 1 shuffle=1146935951 ```
(to be clear, don't need distclean to reproduce this, I just did it as a hack because I can only hit it rarely with `./configure && make`.)
Created attachment 850126 [details] build with MAKEOPTS="-d --shuffle=1146935951 -j32"
Note that there's two bugs: 1. The race condition 2. mkscan.sh doesn't fail when the pipeline fails, and nothing notices it fails either, so a corrupted scan.o is generated with barely any contents, the failure happens later on when linking goes wrong: ``` $ nm scan.o 0000000000000000 n wm4.0.e19e8bb94d9c36428d25f5949bc3e9e0 0000000000000000 n wm4.stdcpredef.h.19.88fdbfd5cf6f83ed579effc3e425f09b ``` Arsen took a look and thinks the scan target should use initscan unless flex exists & is executable.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0cd9c28600309bcce0f00078d01dc7c5c13dac4e commit 0cd9c28600309bcce0f00078d01dc7c5c13dac4e Author: Sam James <sam@gentoo.org> AuthorDate: 2023-02-09 03:06:37 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-02-09 03:06:42 +0000 sys-devel/reflex: force -j1 for now We need to report the issue upstream still. Bug: https://bugs.gentoo.org/883611 Signed-off-by: Sam James <sam@gentoo.org> sys-devel/reflex/reflex-20230206.ebuild | 5 +++++ 1 file changed, 5 insertions(+)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f14870405eb92a33d12a55c38fa67ffe93b9a86 commit 5f14870405eb92a33d12a55c38fa67ffe93b9a86 Author: Sam James <sam@gentoo.org> AuthorDate: 2023-02-09 22:45:06 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-02-09 22:52:49 +0000 sys-devel/reflex: fix parallel build Closes: https://bugs.gentoo.org/883611 Thanks-to: Arsen Arsenović <arsen@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org> .../files/reflex-20230206-parallel-build.patch | 54 ++++++++++++++++++++++ sys-devel/reflex/reflex-20230206.ebuild | 7 ++- 2 files changed, 57 insertions(+), 4 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6d4a902041340144bba7f67ee8a2591bc6be8bc commit f6d4a902041340144bba7f67ee8a2591bc6be8bc Author: Sam James <sam@gentoo.org> AuthorDate: 2023-05-31 00:14:54 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-05-31 00:22:56 +0000 sys-devel/reflex: add 20230523 Bug: https://bugs.gentoo.org/883611 Closes: https://bugs.gentoo.org/906965 Signed-off-by: Sam James <sam@gentoo.org> sys-devel/reflex/Manifest | 2 ++ sys-devel/reflex/reflex-20230523.ebuild | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+)