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

Linking with gold does not search /usr/local/lib #30784

Open
brson opened this Issue Jan 8, 2016 · 5 comments

Comments

Projects
None yet
7 participants
@brson
Copy link
Contributor

brson commented Jan 8, 2016

If it thinks it can rustc will link with the gold linker. Unfortunately ld.bfd and ld.gold do not search the same paths for libraries. The bfd linker looks in the runtime linker path, while gold does not. This creates a very confusing difference in behavior.

Original report.

@eddyb

This comment has been minimized.

Copy link
Member

eddyb commented Jan 8, 2016

Like I said on the on the PR, this seems to be a distro/user bug, since it would affect everything using gold, not just rustc.

@birkenfeld

This comment has been minimized.

Copy link
Contributor

birkenfeld commented Jan 8, 2016

How it can be a distro bug I'm not sure, if that's just the way that gold works.

Does any distro actually install gold as the default linker (ld)? There is usually a mechanism to switch to it, but it isn't the default.

By the way, since there usually is this mechanism, why not let that extend to Rust as well, and let the user choose by whatever is ld on their system?

@rprichard

This comment has been minimized.

Copy link
Contributor

rprichard commented Jan 10, 2016

The title says /etc/local/lib. I think it should be /usr/local/lib?

@brson brson changed the title Linking with gold does not search /etc/local/lib Linking with gold does not search /usr/local/lib Jan 11, 2016

@brson

This comment has been minimized.

Copy link
Contributor Author

brson commented Jan 11, 2016

@rprichard updated the op. Thanks.

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jan 27, 2016

Removing nomination/regression tags but leaving open as to why we reverted gold

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.