Bug 1605019 - ld fails with "defined in discarded section", e.g. stockfish: FTBFS in Fedora rawhide
Summary: ld fails with "defined in discarded section", e.g. stockfish: FTBFS in Fedora...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: stockfish
Version: rawhide
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Raphael Groner
QA Contact: Fedora Extras Quality Assurance
URL: http://apps.fedoraproject.org/koschei...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-20 02:01 UTC by Raphael Groner
Modified: 2018-07-26 06:12 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-07-26 06:08:43 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1576362 0 unspecified CLOSED binutils: annobin notes and discarded sections 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1600431 0 unspecified CLOSED binutils: gold chokes on files assembled with --generate-missing-build-notes 2021-02-22 00:41:40 UTC

Internal Links: 1576362 1600431

Description Raphael Groner 2018-07-20 02:01:27 UTC
Description of problem:
Package stockfish fails to build from source in Fedora rawhide.

Version-Release number of selected component (if applicable):
9-3.fc29

Steps to Reproduce:
koji build --scratch f29 stockfish-9-3.fc29.src.rpm

Additional info:
This package is tracked by Koschei. See:
http://apps.fedoraproject.org/koschei/package/stockfish

Comment 1 Raphael Groner 2018-07-20 02:04:16 UTC
From build.log:
`_GLOBAL__sub_I_Threads' referenced in section `.init_array' of CMakeFiles/stockfish.dir/thread.cpp.o: defined in discarded section `.text.startup[_ZNK10ThreadPool4mainEv]' of CMakeFiles/stockfish.dir/thread.cpp.o
`_GLOBAL__sub_I__ZN3UCI4loopEiPPc' referenced in section `.init_array' of CMakeFiles/stockfish.dir/uci.cpp.o: defined in discarded section `.text.startup[_ZNK10ThreadPool4mainEv]' of CMakeFiles/stockfish.dir/uci.cpp.o
collect2: error: ld returned 1 exit status

This seems to be an issue [1] with linkage of boost. Please try to rebuild boost because of the bump to gcc [2].

[1] https://stackoverflow.com/questions/9811503/unusual-c-linker-error-defined-in-discarded-section
[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49665

Comment 2 Jonathan Wakely 2018-07-20 08:59:34 UTC
Why do you think this is related to Boost? The symbols given in the errors are nothing to do with Boost, and the GCC bug you reference was fixed seven years ago.

Comment 3 Jonathan Wakely 2018-07-20 09:02:34 UTC
Stockfish doesn't even depend on boost! This has nothing to do with Boost at all.

Comment 4 Raphael Groner 2018-07-20 16:26:31 UTC
Okay and thanks for looking into this issue. Sorry for any useless confusion. Taking this bug back.

Comment 5 Raphael Groner 2018-07-26 06:08:43 UTC
Magically fixed in rawhide. I would really like to know what happened.


Note You need to log in before you can comment on or make changes to this bug.