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

[boost-python] python39_d.dll not found when BOOST_DEBUG_PYTHON is defined in a custom triplet #15350

Closed
klalumiere opened this issue Dec 28, 2020 · 0 comments · Fixed by #15352
Assignees
Labels
category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team. category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist

Comments

@klalumiere
Copy link
Contributor

Is your feature request related to a problem? Please describe.
As a workaround to #5097, I decided to define BOOST_DEBUG_PYTHON in our custom triplet, which is the official way to use Python Debug libraries with Boost (this could be seen as a fix to #5097, but I'm going to let the author of the issue decide if it is). However, linking failed saying that python39_d.dll could not be found. Investigations lead me to the conclusion that the B2 option python-debugging should be set to on when BOOST_DEBUG_PYTHON is defined.

Proposed solution
Building on #15274, we can add python-debugging=on to B2_OPTIONS_DBG when BOOST_DEBUG_PYTHON is inside the VCPKG_CXX_FLAGS_DEBUG. A pull request is coming.

Describe alternatives you've considered
I see no alternative to fix the current issue. However, the initial goal was to find a workaround to #5097.

As a workaround to #5097, one alternative is to not use BOOST_DEBUG_PYTHON, i.e. to always link to the release library python39.dll. However, as frivard-coveo commented, when trying to do this in a build where the CMAKE_BUILD_TYPE is Debug, the script applocal.ps1 did not copy python39.dll inside the binaries directory because it searches for DLLs inside vcpkg_installed/x64-windows/debug. Hence, one alternative is to modify the port python3 so that the release library python39.dll is copied inside vcpkg_installed/x64-windows/debug. This is, to say the least, unconventional. Another alternative is to modify applocal.ps1 so that it can search inside both vcpkg_installed/x64-windows/debug and vcpkg_installed/x64-windows when the CMAKE_BUILD_TYPE is Debug. This alternative seems to me like a significant change, which we may want to think about before doing.

@PhoebeHui PhoebeHui added category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team. category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist labels Dec 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team. category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants