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

Build System not finding system versions of pybind installed by conda #811

Open
donaldwj opened this issue May 3, 2024 · 1 comment
Open

Comments

@donaldwj
Copy link
Contributor

donaldwj commented May 3, 2024

Short description explaining the high-level reason for the new issue.

Current behavior

The ngen build system is installing its own copy of pybind when there is a system install used.

Expected behavior

The build system should use the system pybind install unless it is out of date.

Steps to replicate behavior (include URLs)

Screenshots

@program--
Copy link
Contributor

As a note: this is expected behavior (currently) and doesn't have to do with conda. We intentionally use the vendored version of pybind11 (line 275):

ngen/CMakeLists.txt

Lines 271 to 276 in dd66466

if(NGEN_WITH_PYTHON)
add_compile_definitions(ACTIVATE_PYTHON=true)
find_package(Python 3.6.8 REQUIRED COMPONENTS Interpreter Development NumPy)
set(PYTHON_EXECUTABLE ${Python_EXECUTABLE}) # Case-sensitive difference
add_subdirectory(extern/pybind11 pybind11)
endif()

The easiest change/fix for this is probably replacing line 275 with a find_package(pybind11 CONFIG) call, and conditionally calling add_subdirectory if pybind11_FOUND is false.

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

No branches or pull requests

2 participants