Skip to content
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

[ossia-score] Build issue with mingw64 #22656

Open
3 of 6 tasks
jcelerier opened this issue Nov 26, 2024 · 1 comment
Open
3 of 6 tasks

[ossia-score] Build issue with mingw64 #22656

jcelerier opened this issue Nov 26, 2024 · 1 comment
Labels

Comments

@jcelerier
Copy link
Contributor

jcelerier commented Nov 26, 2024

Description / Steps to reproduce the issue

While trying to build my software, it fails with the mingw64 toolchain with the following error:

FAILED: score.exe 
C:\Windows\system32\cmd.exe /C "cd . && D:\a\_temp\msys64\mingw64\bin\c++.exe -Wa,-mbig-obj -O3 -DNDEBUG -mwindows @CMakeFiles\score.rsp -o score.exe -Wl,--out-implib,src\app\libscore.dll.a -Wl,--major-image-version,0,--minor-image-version,0 && cd ."

D:/a/_temp/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
3rdparty/libossia/src/libossia_x64.a(node_functions.cpp.obj):node_functions.cpp:(.text$_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEy[_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEy]+0x0): 
  multiple definition of `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::reserve(unsigned long long)'; 
    D:/a/_temp/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib/libstdc++.dll.a(libstdc___6_dll_d004526.o):(.text+0x0): first defined here

D:/a/_temp/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
3rdparty/libossia/src/libossia_x64.a(osc_factory.cpp.obj):osc_factory.cpp:(.text$_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEyc[_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEyc]+0x0): 
  multiple definition of `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::resize(unsigned long long, char)'; 
    D:/a/_temp/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../lib/libstdc++.dll.a(libstdc___6_dll_d004499.o):(.text+0x0): first defined here

in short, duplicate definitions of template functions that should have weak linkage (or whatever is the equivalent for PE, I forgot the exact name of the COMDAT thing). It looks like it would be related somehow to this issue: #6855

In particular, I am seeing this issue when building with mingw-w64 and ucrt64 :

But not with clang64 which builds fine :

Expected behavior

No duplicate symbol error for std::string::resize

Actual behavior

Duplicate symbol error for std::string::resize

Verification

Windows Version

Github Actions image

MINGW environments affected

  • MINGW64
  • MINGW32
  • UCRT64
  • CLANG64
  • CLANGARM64

Are you willing to submit a PR?

I can try !

@jcelerier jcelerier added the bug label Nov 26, 2024
@lazka lazka changed the title Build issue with mingw64 [ossia-score] Build issue with mingw64 Nov 28, 2024
@Kreijstal
Copy link
Contributor

I guess this is a mingw-w64 bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants