Open alyti opened 1 year ago
Does it compile correctly if you don't specify default-features = false
for deno_core
?
Does it compile correctly if you don't specify
default-features = false
fordeno_core
?
No, that was just my last ditch attempt hoping the default feature was breaking it.
edit:
I even tried again by removing it, it actually yielded absolutely no change, not even forcing a recompile of deno_core or it's deps.
So I forced it to rebuild via cargo clean
, still linker error.
Does it fail if you use LLD for linking? (ie: linker = "rust-lld.exe"
like the below config)
Does it fail if you use LLD for linking? (ie:
linker = "rust-lld.exe"
like the below config)
I got the same error, but in a different candy wrapping:
= note: rust-lld: error: duplicate symbol: public: __cdecl std::exception_ptr::exception_ptr(void)
>>> defined at liblibrocksdb_sys-4e44dbb3539271d1.rlib(backup_engine.o)
>>> defined at libv8-3f830b40b203b7f8.rlib(exception.obj)
rust-lld: error: duplicate symbol: public: __cdecl std::exception_ptr::exception_ptr(class std::exception_ptr const &)
>>> defined at liblibrocksdb_sys-4e44dbb3539271d1.rlib(backup_engine.o)
>>> defined at libv8-3f830b40b203b7f8.rlib(exception.obj)
rust-lld: error: duplicate symbol: public: class std::exception_ptr & __cdecl std::exception_ptr::operator=(class std::exception_ptr const &)
>>> defined at liblibrocksdb_sys-4e44dbb3539271d1.rlib(backup_engine.o)
>>> defined at libv8-3f830b40b203b7f8.rlib(exception.obj)
rust-lld: error: duplicate symbol: public: __cdecl std::exception_ptr::~exception_ptr(void)
>>> defined at liblibrocksdb_sys-4e44dbb3539271d1.rlib(backup_engine.o)
>>> defined at libv8-3f830b40b203b7f8.rlib(exception.obj)
rust-lld: error: duplicate symbol: public: bool __cdecl std::exception_ptr::operator bool(void) const
>>> defined at liblibrocksdb_sys-4e44dbb3539271d1.rlib(backup_engine.o)
>>> defined at libv8-3f830b40b203b7f8.rlib(exception.obj)
At least it's more readable now I guess...
In similar vein I tried this and it actually worked. I am not sure what issues this might cause in runtime though.
[target.x86_64-pc-windows-msvc]
rustflags = ["-C", "link-arg=/FORCE:MULTIPLE"]
It also only applies to the msvc linker, so I am not sure if this would build on other platforms (if they have this issue? Idk) For the immediate time I'll keep testing it out and keep this issue open in case there's a proper solution available.
Hello, I am using this crate as part of deno_core, alongside surrealdb. This project and surrealdb's rocksdb are the cpp based dependencies here. When I try to run a very basic setup with both, I get a linker error:
To reproduce, this is on following toolchain:
With following
cargo.toml
:And
main.rs
:It's a pretty basic example from Deno + a connect call to surrealdb which in turn calls rocksdb. If either of those are commented out, their respective CPP libs never get linked and the application builds. But if left as show above it will fail.
I've already made a tracking issue on rocksdb side: https://github.com/rust-rocksdb/rust-rocksdb/issues/795