Skip to content

Check that rustc's output is writable before linking #1472

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

Closed
brson opened this issue Jan 9, 2012 · 3 comments
Closed

Check that rustc's output is writable before linking #1472

brson opened this issue Jan 9, 2012 · 3 comments
Labels
A-driver Area: rustc_driver that ties everything together into the `rustc` compiler A-linkage Area: linking into static, shared libraries and binaries E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@brson
Copy link
Contributor

brson commented Jan 9, 2012

If the final output file is not writable we end up failing with a cryptic linker error and a dump of the gcc command line. This could largely be avoided by doing some check before running the linker.

@brson
Copy link
Contributor Author

brson commented Jan 9, 2012

Maybe it's possible from the gcc error code to determine what the error was. That would potentially be less error prone than doing the check ahead of time.

@ghost ghost assigned brson Apr 12, 2012
@sammykim
Copy link
Contributor

sammykim commented Apr 5, 2013

Even if the final output file is not writable, the error message is working properly.
When I make output file in /usr/bin, the error message is "Could not write output : error opening output file"

I am sure it's not still problem.

@catamorphism
Copy link
Contributor

@sammykim is correct. Closing.

bjorn3 added a commit to bjorn3/rust that referenced this issue Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-driver Area: rustc_driver that ties everything together into the `rustc` compiler A-linkage Area: linking into static, shared libraries and binaries E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

3 participants