[boost-python] python39_d.dll
not found when BOOST_DEBUG_PYTHON
is defined in a custom triplet
#15350
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
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 thatpython39_d.dll
could not be found. Investigations lead me to the conclusion that theB2
optionpython-debugging
should be set toon
whenBOOST_DEBUG_PYTHON
is defined.Proposed solution
Building on #15274, we can add
python-debugging=on
toB2_OPTIONS_DBG
whenBOOST_DEBUG_PYTHON
is inside theVCPKG_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 librarypython39.dll
. However, as frivard-coveo commented, when trying to do this in a build where theCMAKE_BUILD_TYPE
isDebug
, the scriptapplocal.ps1
did not copypython39.dll
inside the binaries directory because it searches for DLLs insidevcpkg_installed/x64-windows/debug
. Hence, one alternative is to modify the portpython3
so that the release librarypython39.dll
is copied insidevcpkg_installed/x64-windows/debug
. This is, to say the least, unconventional. Another alternative is to modifyapplocal.ps1
so that it can search inside bothvcpkg_installed/x64-windows/debug
andvcpkg_installed/x64-windows
when theCMAKE_BUILD_TYPE
isDebug
. This alternative seems to me like a significant change, which we may want to think about before doing.The text was updated successfully, but these errors were encountered: