-
Notifications
You must be signed in to change notification settings - Fork 393
Open
Description
I have a project where we expose some Rust code to C++ code via a staticlib, using cxx.
Today I tested out updating to the newest version, 1.0.189 and I get the following error. (On 1.0.188 it works fine.)
We have a backend_server_staticlib project that depends on a backend_server project, and exposes a staticlib crate-type, and a few extern "C" functions that are invoked from our C++ code base.
[package]
name = "backend_server_staticlib"
version = "0.1.0"
edition = "2024"
[dependencies.backend_server]
path = "../../backend-server"
[lib]
crate-type = ["staticlib"]
I understand it may be hard to go just based on this error, but since it is a error that happens only since the last release, maybe someone has an idea how to fix it. Otherwise I must try to make a standalone reproducer, but that will require some time.
[build] /usr/bin/ld: backend_cpp_bridge/libbackend_server_staticlib.a(a8ac3b080008f8da-cpp_bridge.rs.o): in function `cxxbridge1$shared_ptr$backend_cpp_bridge$Location$null':
[build] cpp_bridge.rs.cc:(.text.cxxbridge1$shared_ptr$backend_cpp_bridge$Location$null+0x0): multiple definition of `cxxbridge1$shared_ptr$backend_cpp_bridge$Location$null'; backend_cpp_bridge/libbackend_cpp_bridge_generated.a(generated_from_rust.cpp.o):generated_from_rust.cpp:(.text+0x2538): first defined here
[build] /usr/bin/ld: backend_cpp_bridge/libbackend_server_staticlib.a(a8ac3b080008f8da-cpp_bridge.rs.o): in function `cxxbridge1$shared_ptr$backend_cpp_bridge$Location$uninit':
[build] cpp_bridge.rs.cc:(.text.cxxbridge1$shared_ptr$backend_cpp_bridge$Location$uninit+0x0): multiple definition of `cxxbridge1$shared_ptr$backend_cpp_bridge$Location$uninit'; backend_cpp_bridge/libbackend_cpp_bridge_generated.a(generated_from_rust.cpp.o):generated_from_rust.cpp:(.text+0x2578): first defined here
[build] /usr/bin/ld: backend_cpp_bridge/libbackend_server_staticlib.a(a8ac3b080008f8da-cpp_bridge.rs.o): in function `cxxbridge1$shared_ptr$backend_cpp_bridge$Location$raw':
[build] cpp_bridge.rs.cc:(.text.cxxbridge1$shared_ptr$backend_cpp_bridge$Location$raw+0x0): multiple definition of `cxxbridge1$shared_ptr$backend_cpp_bridge$Location$raw'; backend_cpp_bridge/libbackend_cpp_bridge_generated.a(generated_from_rust.cpp.o):generated_from_rust.cpp:(.text+0x2618): first defined here
[build] /usr/bin/ld: backend_cpp_bridge/libbackend_server_staticlib.a(a8ac3b080008f8da-cpp_bridge.rs.o): in function `cxxbridge1$shared_ptr$backend_cpp_bridge$Location$clone':
[build] cpp_bridge.rs.cc:(.text.cxxbridge1$shared_ptr$backend_cpp_bridge$Location$clone+0x0): multiple definition of `cxxbridge1$shared_ptr$backend_cpp_bridge$Location$clone'; backend_cpp_bridge/libbackend_cpp_bridge_generated.a(generated_from_rust.cpp.o):generated_from_rust.cpp:(.text+0x2678): first defined here
.... cut off
Metadata
Metadata
Assignees
Labels
No labels