Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 616106 - =x11-libs/motif-2.3.6-r1 fails with LTO -- crt1.o:function _start: error: undefined reference to 'main'
Summary: =x11-libs/motif-2.3.6-r1 fails with LTO -- crt1.o:function _start: error: und...
Status: RESOLVED DUPLICATE of bug 592868
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ulrich Müller
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-20 11:00 UTC by Petross404(Petros S)
Modified: 2017-04-25 10:57 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (info,23.22 KB, text/plain)
2017-04-20 11:00 UTC, Petross404(Petros S)
Details
build.log (x11-libs:motif-2.3.6-r1:20170420-105223.log,26.65 KB, text/x-log)
2017-04-20 11:01 UTC, Petross404(Petros S)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petross404(Petros S) 2017-04-20 11:00:03 UTC
/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
Comment 1 Petross404(Petros S) 2017-04-20 11:00:53 UTC
Created attachment 470464 [details]
emerge --info
Comment 2 Petross404(Petros S) 2017-04-20 11:01:44 UTC
Created attachment 470466 [details]
build.log
Comment 3 Ulrich Müller gentoo-dev 2017-04-23 13:44:34 UTC
See bug 592868 comment 5.
Comment 4 Petross404(Petros S) 2017-04-24 10:32:42 UTC
(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 :)
Comment 5 Ulrich Müller gentoo-dev 2017-04-24 10:54:41 UTC
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?
Comment 6 Petross404(Petros S) 2017-04-25 10:41:49 UTC
(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?
Comment 7 Ulrich Müller gentoo-dev 2017-04-25 10:57:01 UTC

*** This bug has been marked as a duplicate of bug 592868 ***