Skip to content

C++ example: linking on Windows started to fail on CI with undefined reference to nanobind::detail::error_what(nanobind::detail::error_payload*)'` #557

Description

@slayoo
-- Building for: Ninja
-- The CXX compiler identification is GNU 16.1.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: D:/a/_temp/msys64/ucrt64/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Python: C:/hostedtoolcache/windows/Python/3.12.10/x64/python3.exe (found suitable version "3.12.10", minimum required is "3.8") found components: Interpreter 
-- Found Python: C:/hostedtoolcache/windows/Python/3.12.10/x64/python3.exe (found suitable version "3.12.10", minimum required is "3.8") found components: Interpreter Development Development.Module Development.Embed 
-- Found PyPartMC: C:\hostedtoolcache\windows\Python\3.12.10\x64\Lib\site-packages\PyPartMC
-- Configuring done (2.8s)
-- Generating done (0.0s)
-- Build files have been written to: D:/a/PyPartMC/PyPartMC/readme_cpp/build
[1/2] Building CXX object CMakeFiles/my_test.dir/test.cpp.obj
[2/2] Linking CXX executable my_test.exe
FAILED: [code=1] my_test.exe 
cmd.exe /C "cd . && D:\a\_temp\msys64\ucrt64\bin\c++.exe   CMakeFiles/my_test.dir/test.cpp.obj -o my_test.exe -Wl,--out-implib,libmy_test.dll.a -Wl,--major-image-version,0,--minor-image-version,0  C:/hostedtoolcache/windows/Python/3.12.10/x64/Lib/site-packages/PyPartMC/lib/libpartmclib.a  C:/hostedtoolcache/windows/Python/3.12.10/x64/Lib/site-packages/PyPartMC/_PyPartMC.pyd  C:/hostedtoolcache/windows/Python/3.12.10/x64/libs/python312.lib  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cmd.exe /C "cd /D D:\a\PyPartMC\PyPartMC\readme_cpp\build && C:\hostedtoolcache\windows\cmake\3.26.6\x64\cmake-3.26.6-windows-x86_64\bin\cmake.exe -E copy_if_different C:\hostedtoolcache\windows\Python\3.12.10\x64\Lib\site-packages\PyPartMC\_PyPartMC.pyd D:/a/PyPartMC/PyPartMC/readme_cpp/build""
D:/a/_temp/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/16.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/my_test.dir/test.cpp.obj:test.cpp:(.text$_ZN8nanobind4abi112python_errorD1Ev[_ZN8nanobind4abi112python_errorD1Ev]+0x26): undefined reference to `nanobind::detail::error_release(nanobind::detail::error_payload*)'
D:/a/_temp/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/16.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/my_test.dir/test.cpp.obj:test.cpp:(.text$_ZNK8nanobind4abi112python_error4whatEv[_ZNK8nanobind4abi112python_error4whatEv]+0x18): undefined reference to `nanobind::detail::error_what(nanobind::detail::error_payload*)'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Error: Process completed with exit code 1.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions