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

Fix linking to the wrong Python library for Debug built type on Windows #514

Open
wants to merge 5 commits into
base: devel
Choose a base branch
from

Conversation

duburcqa
Copy link
Contributor

@duburcqa duburcqa commented Nov 2, 2024

No description provided.

@jcarpent jcarpent requested a review from jorisv November 4, 2024 09:23
@jorisv
Copy link
Contributor

jorisv commented Nov 4, 2024

Hello @duburcqa,

Thank for the PR.
When I read wrap_python.hpp and your PR title I'm a little confuse. Did this PR allow to:

  • Build our Python modules in debug mode and be loaded by a Python release runtime on Windows ?
  • Build our Python module in debug mode and be loaded by a Python debug runtime on Windows ?
  • Both ?

@duburcqa
Copy link
Contributor Author

duburcqa commented Nov 4, 2024

The point is rather linking with the Python library that Boost::Python wants us to link with. The current implementation in Eigenpy is by-passing Boost::Python logics entirely. Even worst, only compilation units that includes "include/eigenpy/numpy.hpp" are affected, but not the others, which means that the whole project may end up linking against multiple Python libraries at the same time.

To answer for question, it allows both, depending on whether the pragma definition "BOOST_PYTHON_DEBUG" is set. However, in practice what we want is linking with the release Python library even in debug, which is the default with Boost::Python but not with barebone Python (and hence not with numpy either).

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

Successfully merging this pull request may close these issues.

2 participants