Summary: | sys-devel/reflex-20221012 - main.c:(.text+<snip>): undefined reference to set_input_file | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Toralf Förster <toralf> |
Component: | Current packages | Assignee: | Sam James <sam> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | arsen |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=906965 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 899976 | ||
Bug Blocks: | 351559 | ||
Attachments: |
emerge-info.txt
emerge-history.txt.bz2 environment etc.clang.tar.bz2 etc.portage.tar.bz2 logs.tar.bz2 sys-devel:reflex-20221012:20221129-152755.log temp.tar.bz2 build with MAKEOPTS="-d --shuffle=1146935951 -j32" |
Description
Toralf Förster
![]() 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(+) |