-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Compiling rust on OSX fails with Assertion failed: ((unsigned)Val < Attribute::EndAttrKinds && "Attribute out of range!") #10907
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
Comments
You see the failed command there:
If you run it as:
does it succeed? |
Yes, with 'ar rS' the command succeeds. If I try to 'make' after that to continue building, it'll end up failing again at the same line for the same reason, so I guess I need to make the change somewhere in the Makefile to get further. |
Thanks for confirming! I've opened #10908 to always run 'rS' instead of just 'r' in these situations. |
Turns out that one some platforms the ar/ranlib tool will die with an assertion if the file being added doesn't actually have any symbols (or if it's just not an object file presumably). This functionality is already all exercised on the bots, it just turns out that the bots don't have an ar tool which dies in this situation, so it's difficult for me to add a test. Closes #10907
This issue still persists on OSX 10.9 at HEAD on
|
Closing as a dupe of #11162 |
…=Jarcho Direct towards late passes in `cargo dev new_lint` changelog: none This would be the tooling part of rust-lang#9311 - `--pass late` is now the default - It prints a message recommending the use of a late pass if you choose `--pass early`
Trying to compile latest rust (fresh clone from git) from master (487e58c) on OS X 10.8.5.
$ ./configure
...
$ make
...
compile_and_link: x86_64-apple-darwin/stage0/lib/rustc/x86_64-apple-darwin/bin/rustc
cp: x86_64-apple-darwin/stage1/lib/librustrt.a
cp: x86_64-apple-darwin/stage1/lib/libstd.dylib
cp: x86_64-apple-darwin/stage1/lib/libextra.dylib
cp: x86_64-apple-darwin/stage1/lib/librustuv.dylib
cp: x86_64-apple-darwin/stage1/lib/libsyntax.dylib
cp: x86_64-apple-darwin/stage1/lib/librustc.dylib
cp: x86_64-apple-darwin/stage1/bin/rustc
compile: x86_64-apple-darwin/rt/stage1/rust_cxx_glue.o
compile: x86_64-apple-darwin/rt/stage1/rust_builtin.o
compile: x86_64-apple-darwin/rt/stage1/rust_upcall.o
compile: x86_64-apple-darwin/rt/stage1/miniz.o
compile: x86_64-apple-darwin/rt/stage1/rust_android_dummy.o
compile: x86_64-apple-darwin/rt/stage1/rust_test_helpers.o
compile: x86_64-apple-darwin/rt/stage1/arch/x86_64/_context.o
compile: x86_64-apple-darwin/rt/stage1/arch/x86_64/record_sp.o
link: x86_64-apple-darwin/rt/stage1/librustrt.a
/opt/local/bin/ranlib: file: x86_64-apple-darwin/rt/stage1/librustrt.a(rust_android_dummy.o) has no symbols
/opt/local/bin/ranlib: file: x86_64-apple-darwin/rt/stage1/librustrt.a(record_sp.o) has no symbols
cp: x86_64-apple-darwin/stage1/lib/rustc/x86_64-apple-darwin/lib/librustrt.a
compile: x86_64-apple-darwin/rt/stage1/arch/x86_64/morestack.o
link: x86_64-apple-darwin/rt/stage1/arch/x86_64/libmorestack.a
cp: x86_64-apple-darwin/stage1/lib/rustc/x86_64-apple-darwin/lib/libmorestack.a
compile_and_link: x86_64-apple-darwin/stage1/lib/rustc/x86_64-apple-darwin/lib/libstd.dylib
error: ar r x86_64-apple-darwin/stage1/lib/rustc/x86_64-apple-darwin/lib/libstd-6425b930ca146ae9-0.9-pre.rlib x86_64-apple-darwin/stage1/lib/rustc/x86_64-apple-darwin/lib/std.bc failed with: exit code: 1
note: stdout ---
note: stderr ---
Assertion failed: ((unsigned)Val < Attribute::EndAttrKinds && "Attribute out of range!"), function addAttribute, file Attributes.cpp, line 948.
ar: fatal error in /opt/local/bin/ranlib
error: aborting due to previous error
' failed at 'explicit failure', /Users/sami/dev/rust/src/librustc/lib.rs:394task 'rustc' failed at 'explicit failure', /Users/sami/dev/rust/src/libsyntax/diagnostic.rs:102
task '
make: *** [x86_64-apple-darwin/stage1/lib/rustc/x86_64-apple-darwin/lib/libstd.dylib] Error 101
The text was updated successfully, but these errors were encountered: