-
Notifications
You must be signed in to change notification settings - Fork 104
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
cannot compile due to linker error #1411
Comments
I thought it might be because of our linker config
But after removing it, compilation still fails (with a different msg)
|
I tried this, and them compilation succeeded.. diff --git a/Cargo.toml b/Cargo.toml
index dc38b19e2..a5663eccb 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -193,6 +193,9 @@ redundant_explicit_links = "allow"
[profile.dev]
lto = 'off'
+[profile.dev.package.protobuf-native]
+codegen-backend = "llvm"
+
[profile.release]
debug = "full"
split-debuginfo = "packed" |
Sorry for the delay, was busy for the last couple of days. I can reproduce this by trying to compile the test suite of protobuf-native. I don't have a clue what the issue could be though unfortunately. I indeed can't find any definition of the symbol in question. In fact I can't find where it is supposed to be defined anywhere in the source code. |
RUSTC_WRAPPER=$PWD/misc/fuzzshim/rustc_wrapper.py cargo fuzz run --dev --sanitizer none fuzz_target_1 Unfortunately still failing lining on protobuf-native: target/x86_64-unknown-linux-gnu/debug/build/protobuf-native-b0ba7c5e922fceec/out/cxxbridge/sources/protobuf-native/src/io.rs.cc:1086:(.text.protobuf_native$io$cxxbridge1$DeleteCodedOutputStream+0x13): undefined reference to `protobuf_native::io::DeleteCodedOutputStream(google::protobuf::io::CodedOutputStream*)' There was a similar error before in rust-lang/rustc_codegen_cranelift#1411, but their workaround doesn't work for me (we're already using llvm codegen-backend)
This is actually a bug in rust-protobuf-native, I opened a PR: MaterializeInc/rust-protobuf-native#12 |
Thanks for letting me know! |
RUSTC_WRAPPER=$PWD/misc/fuzzshim/rustc_wrapper.py cargo fuzz run --dev --sanitizer none fuzz_target_1 Unfortunately still failing lining on protobuf-native: target/x86_64-unknown-linux-gnu/debug/build/protobuf-native-b0ba7c5e922fceec/out/cxxbridge/sources/protobuf-native/src/io.rs.cc:1086:(.text.protobuf_native$io$cxxbridge1$DeleteCodedOutputStream+0x13): undefined reference to `protobuf_native::io::DeleteCodedOutputStream(google::protobuf::io::CodedOutputStream*)' There was a similar error before in rust-lang/rustc_codegen_cranelift#1411, but their workaround doesn't work for me (we're already using llvm codegen-backend)
RUSTC_WRAPPER=$PWD/misc/fuzzshim/rustc_wrapper.py cargo fuzz run --dev --sanitizer none fuzz_target_1 Unfortunately still failing lining on protobuf-native: target/x86_64-unknown-linux-gnu/debug/build/protobuf-native-b0ba7c5e922fceec/out/cxxbridge/sources/protobuf-native/src/io.rs.cc:1086:(.text.protobuf_native$io$cxxbridge1$DeleteCodedOutputStream+0x13): undefined reference to `protobuf_native::io::DeleteCodedOutputStream(google::protobuf::io::CodedOutputStream*)' There was a similar error before in rust-lang/rustc_codegen_cranelift#1411, but their workaround doesn't work for me (we're already using llvm codegen-backend)
RUSTC_WRAPPER=$PWD/misc/fuzzshim/rustc_wrapper.py cargo fuzz run --dev --sanitizer none fuzz_target_1 Unfortunately still failing lining on protobuf-native: target/x86_64-unknown-linux-gnu/debug/build/protobuf-native-b0ba7c5e922fceec/out/cxxbridge/sources/protobuf-native/src/io.rs.cc:1086:(.text.protobuf_native$io$cxxbridge1$DeleteCodedOutputStream+0x13): undefined reference to `protobuf_native::io::DeleteCodedOutputStream(google::protobuf::io::CodedOutputStream*)' There was a similar error before in rust-lang/rustc_codegen_cranelift#1411, but their workaround doesn't work for me (we're already using llvm codegen-backend)
returns error:
The text was updated successfully, but these errors were encountered: