pybind / pybind/pybind11

[BUG]: Pybind 11 not working with Intel C++ / DPC++ compilers (2022)

Open
#3,799 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

compiler issue compiler: intel
Dominant language
C++
Stars
18k
Forks
2.3k
Avg merge
5d 17h
Merged PRs (30d)
10

Description

Required prerequisites
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.
image

Reproducible example code

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.