rust_eh_personality already defined in dynamic library
Open
Nobody has claimed this yet.
A-diagnostics
T-compiler
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Code
Follow the steps to build https://github.com/ldesgoui/discord_game_sdk
This can also happen when directly linking Discord GameSDK libraries by bindgen separately.
Current output
error: linking with `link.exe` failed: exit code: 1169
|
= note: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.40.33807\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" .. (a lot of libraries)
= note: libstd-af7a289140bfd09b.rlib(std-af7a289140bfd09b.std.9b8e320a6364d5d1-cgu.0.rcgu.o) : error LNK2005: rust_eh_personality already defined in discord_game_sdk.lib(discord_game_sdk.dll)
D:\..\discord_game_sdk\target\debug\deps\discord_game_sdk_sys-7c33338da05ee15f.exe : fatal error LNK1169: one or more multiply defined symbols found
Desired output
Compile and build successfully
Rationale and extra context
No response
Other cases
No response
Rust Version
rustc 1.79.0 (129f3b996 2024-06-10)
binary: rustc
commit-hash: 129f3b9964af4d4a709d1383930ade12dfe7c081
commit-date: 2024-06-10
host: x86_64-pc-windows-msvc
release: 1.79.0
LLVM version: 18.1.7
Anything else?
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the steps in ldesgoui/discord_game_sdk with Rust 1.79.0 on x86_64-pc-windows-msvc. Start with the link.exe output showing the duplicate rust_eh_personality definition between libstd and discord_game_sdk.lib. Done means the reported build completes successfully without the multiply defined symbol error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100