Skip to content

rustc vs permissions #2360

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
jesse99 opened this issue May 6, 2012 · 2 comments
Closed

rustc vs permissions #2360

jesse99 opened this issue May 6, 2012 · 2 comments
Labels
A-codegen Area: Code generation A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@jesse99
Copy link
Contributor

jesse99 commented May 6, 2012

So I have a library where make essentialy does mkdir bin 2> /dev/null && rustc --out-dir bin -O src/rparse.rc. If I start with an empty bin directory and do something lame like sudo make followed by make I get a half-way reasonable error message on Mac:

error: linking with cc failed with code 1
note: cc arguments: -L/usr/local/lib/rustc/x86_64-apple-darwin/lib -m64 -o bin/librparse-613e24f4d58a7a16-0.3.dylib bin/rparse.o -L/usr/local/lib/rustc/x86_64-apple-darwin/lib -lcore-d27e4777a53c3e50-0.2 -L/usr/local/lib/rustc/x86_64-apple-darwin/lib -lstd-d399da1ab6f5bec0-0.2 -dynamiclib -Wl,-install_name,@rpath/librparse-613e24f4d58a7a16-0.3.dylib -lrustrt -Wl,-no_compact_unwind -lmorestack -Wl,-rpath,@executable_path/../../../../../../usr/local/lib/rustc/x86_64-apple-darwin/lib -Wl,-rpath,/usr/local/lib/rustc/x86_64-apple-darwin/lib
note: ld: can't write output file: bin/librparse-613e24f4d58a7a16-0.3.dylib for architecture x86_64
collect2: ld returned 1 exit status

error: aborting due to previous errors
rust: upcall fail 'explicit failure', src/librustsyntax/diagnostic.rs:77
rust: upcall fail 'explicit failure', src/rustc/driver/rustc.rs:232
rust: domain main @0x7f8774000010 root task failed
make: *** [lib] Error 101

But if I start with no bin directory and do the same thing I get the highly unhelpful:

Assertion failed: (FD >= 0 && "File not yet open!"), function preferred_buffer_size, file /Users/jessejones/Source/Third_Party/rust/src/llvm/lib/Support/raw_ostream.cpp, line 590.
make: *** [lib] Illegal instruction: 4

(which I originally thought was an ICE).

@pcwalton
Copy link
Contributor

pcwalton commented May 6, 2012

This is really an LLVM bug, but there's probably a way to work around it.

@graydon
Copy link
Contributor

graydon commented Jul 25, 2012

This gives a nice error message as of #2910, so closing.

@graydon graydon closed this as completed Jul 25, 2012
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
tshepang pushed a commit to tshepang/rust that referenced this issue May 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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