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 packaged dlls not found #7108

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fegorsch
Copy link

Type

Motivation and Context

This PR introduced winmode=0 for loading DLLs during import. This however leads to directories added via os.add_dll_directory not being considered, when loading DLLs (see here or here). In particular this leads to open3d/tbb12.dll not being found.

Fix this by going back to the default DLL-search mode (winmode=None).

In order to still be able to find CUDA-DLLs, that are not part of the open3d-package, search their directory in PATH and explicitly add it to the DLL-search-locations for CUDA-builds.

Note that this PR results in DLLs generally not being searched in PATH anymore, when importing open3d, as is the default behaviour of Python-packages since 3.8. The exception are CUDA-libraries in the heuristically determined directory. If anyone relies on PATH being searched, this PR breaks functionality.

Checklist:

  • I have run python util/check_style.py --apply to apply Open3D code style
    to my code.
  • This PR changes Open3D behavior or adds new functionality.
    • Both C++ (Doxygen) and Python (Sphinx / Google style) documentation is
      updated accordingly.
    • I have added or updated C++ and / or Python unit tests OR included test
      results
      (e.g. screenshots or numbers) here.
  • I will follow up and update the code if CI fails.
  • For fork PRs, I have selected Allow edits from maintainers.

Description

Copy link

update-docs bot commented Dec 20, 2024

Thanks for submitting this pull request! The maintainers of this repository would appreciate if you could update the CHANGELOG.md based on your changes.

@fegorsch fegorsch changed the title Fix package dlls not found Fix packaged dlls not found Dec 20, 2024
@fegorsch fegorsch force-pushed the fix-package-dlls-not-found branch 2 times, most recently from 0d24ec9 to d28f514 Compare December 20, 2024 12:26
This PR introduced `winmode=0` for loading DLLs during import:
isl-org#5259

This however leads to directories added via `os.add_dll_directory` not
being considered, when loading DLLs (see
isl-org#7104 (comment)).
In particular this leads to open3d/tbb12.dll not being found.

Fix this by going back to the default DLL-search mode (`winmode=None`).

In order to still be able to find CUDA-DLLs, that are not part of the
open3d-package, search their directory in PATH and explicitly add it to
the DLL-search-locations for CUDA-builds.
@fegorsch fegorsch force-pushed the fix-package-dlls-not-found branch from d28f514 to 9b67487 Compare December 20, 2024 19:02
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.

Open3D Python cannot find DLLs in add_dll_directory-locations
2 participants