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

Add rustc's sysroot/lib to LD_LIBRARY_PATH #6498

Conversation

naseschwarz
Copy link

The default way to use rust is rustup. Rustup maintains its own sysroot. This is fine for most rust applications, as they don't dynamically link to anything in that sysroot. rustfmt does, however, and thus must be called with the correct LD_LIBRARY_PATH.

(I'm honestly not sure whether anybody checks bootstrap.sh. Quite a few of the tests are failing and the script is not referenced anywhere.)

The default way to use rust is rustup. Rustup maintains its own sysroot.
This is fine for most rust applications, as they don't dynamically link
to anything in that sysroot. rustfmt does, however, and thus must be
called with the correct LD_LIBRARY_PATH.
@ytmimi
Copy link
Contributor

ytmimi commented Mar 11, 2025

I don't think bootstrap.sh is used anywhere. The script looks like it was used to run rustfmt against itself.

The contributor docs already explain how to run rustfmt from source, and the recommendation is to use cargo run since it'll configure the LD_LIBRARY_PATH correctly.

@ytmimi ytmimi closed this Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants