incremental compilation + proc macros: undefined symbol error #47292
Closed
Description
opened on Jan 9, 2018
error: /home/rubic/Projects/Crates/syn/examples/heapsize2/example/target/debug/deps/libheapsize_derive-3ef99e9f83ff68d2.so: undefined symbol: __rustc_derive_registrar__59da0d2c3725c53af805cb0071a3b093_24
--> src/main.rs:2:1
|
2 | extern crate heapsize_derive;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Disabling incremental compilation or deleting the build files fixes the issue.
$ rustc --version --verbose
rustc 1.25.0-nightly (b5392f545 2018-01-08)
binary: rustc
commit-hash: b5392f54503fdaf04df4b9578510b2baa944f4af
commit-date: 2018-01-08
host: x86_64-unknown-linux-gnu
release: 1.25.0-nightly
LLVM version: 4.0
Steps to reproduce
- git clone https://github.com/dtolnay/syn
- cd syn/examples/heapsize2/example/src/ && CARGO_INCREMENTAL=1 cargo run (build succeeds as expected)
- at syn/examples/heapsize2/heapsize_derive/src/lib.rs:20 insert a line "foo()"
- cd syn/examples/heapsize2/example/src/ && CARGO_INCREMENTAL=1 cargo run (build fails as expected)
- at syn/examples/heapsize2/heapsize_derive/src/lib.rs:16 insert a line "fn foo() { }"
- cd syn/examples/heapsize2/example/src/ && CARGO_INCREMENTAL=1 cargo run (build fails with error above)
In case the changes to source code above weren't clear, refer to the commits 1 & 2 https://github.com/rukai/syn/commits/bug
Activity