Failed to import cmake_example

Đang mở
#71 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
cmake, cpp, python
Lĩnh vực
build-system

Hướng nghiên cứu

Tái hiện lỗi bằng pip install . và import cmake_example trong môi trường Python 3.8 đã được báo cáo. Kiểm tra quá trình build dựa trên CMake và extension cmake_example được tạo ra, liên quan đến symbol C++ không xác định đã được báo cáo. Hoàn tất khi package được cài đặt thành công và import mà không gặp lỗi linker.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
C++
Star
671
Fork
220
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của pybind/cuda_example

Tất cả issue của pybind/cuda_example

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.