Skip to content

Mingw builds fail #4

Description

@atollk

When building copper_tests in CI with Mingw64, the linking fails for both GCC and Clang but with different errors and only when building in Debug mode.

see e.g. https://github.com/atollk/copper/actions/runs/794387279

Clang:

[100%] Linking CXX executable copper_tests
D:/a/_temp/msys/msys64/mingw64/bin/ld: DWARF error: could not find variable specification at offset 141e
D:/a/_temp/msys/msys64/mingw64/bin/ld: DWARF error: could not find variable specification at offset 7ce5
D:/a/_temp/msys/msys64/mingw64/bin/ld: DWARF error: could not find variable specification at offset 7d2f
CMakeFiles/copper_tests.dir/tests/main.cpp.obj:main.cpp:(.debug_info+0x16): relocation truncated to fit: IMAGE_REL_AMD64_SECREL against `.debug_line'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

GCC:

[100%] Linking CXX executable copper_tests
D:/a/_temp/msys/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/copper_tests.dir/tests/main.cpp.obj:main.cpp:(.text+0xa2e): undefined reference to `typeinfo for Catch::TestFailureException'
D:/a/_temp/msys/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/copper_tests.dir/tests/main.cpp.obj: in function `Catch::handleExceptionMatchExpr(Catch::AssertionHandler&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Catch::StringRef const&)':
D:/a/copper/copper/build/_deps/catch2-src/single_include/catch2/catch.hpp:8275: undefined reference to `Catch::Matchers::StdString::EqualsMatcher::~EqualsMatcher()'
D:/a/_temp/msys/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/a/copper/copper/build/_deps/catch2-src/single_include/catch2/catch.hpp:8275: undefined reference to `Catch::Matchers::StdString::EqualsMatcher::~EqualsMatcher()'
D:/a/_temp/msys/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/copper_tests.dir/tests/main.cpp.obj: in function `Catch::handleExceptionMatchExpr(Catch::AssertionHandler&, Catch::Matchers::Impl::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > const&, Catch::StringRef const&)':

...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions