You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
alexbool@alexbool-osx ~/D/I/r/user> cargo build
Compiling quote v0.3.5
Compiling unicode-xid v0.0.3
Compiling syn v0.10.3
Compiling serde_codegen_internals v0.11.1
Compiling serde_codegen v0.8.18
Compiling serde_derive v0.8.18
Compiling library v0.1.0 (file:///Users/alexbool/Documents/IdeaProjects/rust-fail/library)
warning: custom derive crates and `#[no_link]` crates have no effect without `#[macro_use]`
--> /Users/alexbool/Documents/IdeaProjects/rust-fail/library/src/lib.rs:1:1
|
1 | extern crate serde_derive;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
Compiling user v0.1.0 (file:///Users/alexbool/Documents/IdeaProjects/rust-fail/user)
Finished debug [unoptimized + debuginfo] target(s) in 13.74 secs
alexbool@alexbool-osx ~/D/I/r/user> otool -L ../target/debug/libuser.dylib
../target/debug/libuser.dylib:
/Users/alexbool/Documents/IdeaProjects/rust-fail/target/debug/deps/libuser.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libstd-1357b93f.dylib (compatibility version 0.0.0, current version 0.0.0)
/Users/alexbool/Documents/IdeaProjects/rust-fail/target/debug/deps/libserde_derive-7dacf7ca26e124d8.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.0.0)
Whoa! This artifact depends on libserde_derive-7dacf7ca26e124d8.dylib and libstd-1357b93f.dylib.
If you try staticlib, you get an error:
Compiling user v0.1.0 (file:///Users/alexbool/Documents/IdeaProjects/rust-fail/user)
error: dependency `serde_derive` not found in rlib format
error: aborting due to previous error
error: Could not compile `user`.
If you try a binary, it compiles but obviously cannot be run:
alexbool@alexbool-osx ~/D/I/r/user> ../target/debug/user
dyld: Library not loaded: @rpath/libstd-1357b93f.dylib
Referenced from: /Users/alexbool/Documents/IdeaProjects/rust-fail/user/../target/debug/user
Reason: image not found
fish: '../target/debug/user' terminated by signal SIGABRT (Abort)
The text was updated successfully, but these errors were encountered:
alexbool
changed the title
Nightly regression: symbols from proc-macro crates suddenly leak into downstream artifacts
Nightly regression: downstream artifacts suddenly depend on proc-macro crate's dylib
Nov 20, 2016
As we wait for that to land, you can work around this issue by reordering the extern crates in user/src/lib.rs so that proc-macro crates precede other crates.
Consider a project:
./Cargo.toml
:library/Cargo.toml
:library/src/lib.rs
:user/Cargo.toml
:user/src/lib.rs
:Then:
Whoa! This artifact depends on
libserde_derive-7dacf7ca26e124d8.dylib
andlibstd-1357b93f.dylib
.If you try staticlib, you get an error:
If you try a binary, it compiles but obviously cannot be run:
Meta:
macOS Sierra
Also reproduces on Windows i686 msvc.
The text was updated successfully, but these errors were encountered: