Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gold linker is deprecated now #1952

Closed
opoplawski opened this issue Aug 7, 2020 · 3 comments · Fixed by #2133
Closed

gold linker is deprecated now #1952

opoplawski opened this issue Aug 7, 2020 · 3 comments · Fixed by #2133
Assignees
Labels
type:Bug Inconsistencies or issues which will cause an incorrect result under some or all circumstances
Milestone

Comments

@opoplawski
Copy link

Description

ITK defaults to using the "gold" linker on linux if present. Word on the street is that this linker is deprecated - at least as of Fedora 33 - and in particular does not support LTO (link time optimizations) that Fedora is starting to enable by default. The build fails with:

/usr/bin/ld.gold: fatal error: lto-wrapper failed
collect2: error: ld returned 1 exit status
gmake[2]: *** 
[Modules/Filtering/ImageIntensity/test/CMakeFiles/ITKImageIntensityTestDriver.dir/build.make:1307: 
bin/ITKImageIntensityTestDriver] Error 1

When compiled with -flto=auto -ffat-lto-objects

A test of compiles on Fedora rawhide saw no overall speed different between using "gold" and the default linker. Time to change the default?

Versions

4.13.3

@opoplawski opoplawski added the type:Bug Inconsistencies or issues which will cause an incorrect result under some or all circumstances label Aug 7, 2020
@opoplawski
Copy link
Author

I will not however that reverting to the standard linker does not resolve the LTO build failure, so it's less of a concern than I initially thought it was. At least for now.

@thewtex
Copy link
Member

thewtex commented Aug 17, 2020

When performing a fresh, build compile times dominate over link times, so the linker speed benefits only really shine with incremental (development builds).

But, if the gold linker is not well maintained, we could remove support for it.

@thewtex thewtex added this to the ITK v5.2.0 milestone Aug 17, 2020
thewtex added a commit to thewtex/ITK that referenced this issue Nov 29, 2020
Deprecated and does conflicts with LTO. Closes InsightSoftwareConsortium#1952
hjmjohnson pushed a commit that referenced this issue Nov 29, 2020
Deprecated and does conflicts with LTO. Closes #1952
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:Bug Inconsistencies or issues which will cause an incorrect result under some or all circumstances
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants