/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 ***