pybind / pybind/cuda_example

Failed to import cmake_example

Open
#71 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
670
Forks
219
Avg merge
8d 2h
Merged PRs (30d)
1

Description

After successfully installing cmake_example after running pip install . command. I try to import cmake_example module, but it shows undefined symbol

(pybind11) xx@xx:~/code/cmake_example$ pip install . --user
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Processing /home/py/code/cmake_example
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: cmake-example
  Building wheel for cmake-example (pyproject.toml) ... done
  Created wheel for cmake-example: filename=cmake_example-0.0.1-cp38-cp38-linux_x86_64.whl size=48911 sha256=9ebbda22de67d214c2039da9003236fe2d8e8eda90c4e2bbee1f4fa7778d7aa5
  Stored in directory: /tmp/pip-ephem-wheel-cache-jcrqt4zq/wheels/15/39/14/4a8a39410655bf49353e750dd2e25ce81174f227c1bbb4635b
Successfully built cmake-example
Installing collected packages: cmake-example
Successfully installed cmake-example-0.0.1
(pybind11) xx@xx::~/code/cmake_example$ python
Python 3.8.10 (default, Nov 26 2021, 20:14:08) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cmake_example as m
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /home/py/.local/lib/python3.8/site-packages/cmake_example.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZTVN10__cxxabiv120__si_class_type_infoE

Contributor guide

No contributing guide indexed for this repository

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

Reproduce the failure with pip install . and import cmake_example in the reported Python 3.8 environment. Inspect the CMake-based build and generated cmake_example extension around the reported undefined C++ symbol. Done means the package installs successfully and imports without the linker error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp, python
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.