/tmp/portage/x11-libs/motif-2.3.6-r1/temp/ccUSupjl.lto.o /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../lib64/crt1.o:function _start: error: undefined reference to 'main' .... collect2: error: ld returned 1 exit status make: *** [Makefile:495: wmluiltok] Error 1 make: Leaving directory '/tmp/portage/x11-libs/motif-2.3.6-r1/work/motif-2.3.6-abi_x86_64.amd64/tools/wml' Reproducible: Always
Created attachment 470464 [details] emerge --info
Created attachment 470466 [details] build.log
See bug 592868 comment 5.
(In reply to Ulrich Müller from comment #3) > See bug 592868 comment 5. Flex is compiled fine with LTO but the problem persists. Although when portage is stripping flex I get this warning: 6_64-pc-linux-gnu-strip --strip-unneeded -R .comment -R .GCC.command.line -R .note.gnu.gold-version usr/bin/flex usr/lib64/libfl.a usr/lib32/libfl.a x86_64-pc-linux-gnu-strip: /tmp/portage/sys-devel/flex-2.6.3-r1/image/usr/lib64/stiQrNMe/libmain.o: plugin needed to handle lto object x86_64-pc-linux-gnu-strip: /tmp/portage/sys-devel/flex-2.6.3-r1/image/usr/lib64/stiQrNMe/libyywrap.o: plugin needed to handle lto object x86_64-pc-linux-gnu-strip: /tmp/portage/sys-devel/flex-2.6.3-r1/image/usr/lib32/stLHlSlf/libmain.o: plugin needed to handle lto object x86_64-pc-linux-gnu-strip: /tmp/portage/sys-devel/flex-2.6.3-r1/image/usr/lib32/stLHlSlf/libyywrap.o: plugin needed to handle lto object ecompressdir: bzip2 -9 /usr/share/man Does this mean that flex isn't built with LTO? Strip has nothing to do with linking... PS Please let me know if I have to put this context in the 592868 bug :)
Have you tried dropping -fno-fat-lto-objects from CFLAGS, or adding an explict -ffat-lto-objects when compiling flex, as suggested in bug 592868?
(In reply to Ulrich Müller from comment #5) > Have you tried dropping -fno-fat-lto-objects from CFLAGS, or adding an > explict -ffat-lto-objects when compiling flex, as suggested in bug 592868? Yes, adding -ffat-lto-objects when compiling flex, allowed x11-libs/motif-2.3.6-r1 to link without problem. Should this bug be marked as RESOLVED?
*** This bug has been marked as a duplicate of bug 592868 ***
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd25aa948453fae21f85d607bde480904da451d6 commit dd25aa948453fae21f85d607bde480904da451d6 Author: Sam James <sam@gentoo.org> AuthorDate: 2025-05-02 00:30:46 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-05-06 08:45:08 +0000 sys-devel/flex: use dot-a.eclass for LTO This means that USE=static-libs doesn't produce a "broken" library when built w/ LTO. Closes: https://bugs.gentoo.org/592868 Closes: https://bugs.gentoo.org/616106 Closes: https://bugs.gentoo.org/876430 Closes: https://bugs.gentoo.org/924183 Closes: https://bugs.gentoo.org/936172 Closes: https://bugs.gentoo.org/938858 Closes: https://bugs.gentoo.org/940541 Closes: https://bugs.gentoo.org/944291 Closes: https://bugs.gentoo.org/945923 Signed-off-by: Sam James <sam@gentoo.org> sys-devel/flex/flex-2.6.4-r6.ebuild | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)