[BUG]: Pybind 11 not working with Intel C++ / DPC++ compilers (2022)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 18k
- Forks
- 2.3k
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 10
Description
Required prerequisites
- Make sure you've read the documentation. Your issue may be addressed there.
- Search the issue tracker and Discussions to verify that this hasn't already been reported. +1 or comment there if it has.
- Consider asking first in the Gitter chat room or in a Discussion.
Problem description
Apologies for a lack of detail in this bug report, i cant specify too much as i dont actually know whats causing the problem, only that it happens exclusively with pybind11.
The issue is that when using intels C++ or DPC++ compilers included in the oneapi toolkit version 2022.1.3 a module i work on compiles successfully but python throws a DLL not found error upon loading. To be clear, it compilers successfully, a .pyd is generated and it looks ok from the outside.
Just as a sanity check i decided to open up the module compiled in MSVC in a hex editor and search for its name (in this case GavinBackendDatasetUtils) and it was present in the file near the end. But in the Intel C++ / DPC++ compiler versions it can not be found in the .pyd file.
I have no clue if this is an issue on intels end or on pybind11s end. So i am posting this here while also following up with intel about the issue. If anyone knows of a fix or has encountered the same issue please reply with any additional information.
The image below is a screencapture of hex editor opening the MSVC compiled module showing the content which is NOT present in the Intel C++/ DPC++ compiled module.

Reproducible example code
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported failure with Intel C++ or DPC++ from oneAPI 2022.1.3 and compare the generated .pyd with the MSVC build. There is no reproducible example, named file, or test in the report; done requires determining whether the failure is in pybind11 or the compiler and documenting a minimal reproduction or fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100