pip install fail to link

Offen
#162 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
25/100
Issue-Typ
Bug
Klarheit
Muss geklärt werden
Aktivitätsstatus
Veraltet
Tech-Stack
anaconda, cmake, cpp, opencv, python

Rechercherichtung

Beginne mit pyproject.toml und der angehängten CMakeLists.txt; reproduziere pip install -e . innerhalb der conda-Umgebung und vergleiche es mit den erfolgreichen CMake- und pipx-Builds. Erledigt ist die Aufgabe, wenn die Editable-Installation ohne den gemeldeten OpenCV/libjpeg-Linkerfehler abgeschlossen wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

I'm doing a Python extended library based on CMake and C++, and the dependencies include OpenCV and PCL, which are installed in the system.

The Python environment is managed by conda.

While the CMake build and system-wide pipx build succeeded, pip install -e . fails on linking: a bunch of error like /home/vscode/miniforge3/envs/lidar_od/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.4.6.0: undefined reference to jpeg_calc_output_dimensions@LIBJPEG_8.0'`

I think there is something missing in my configurations. But I could not find any tutorials or examples.

structure is as follows:

.
├── apps
│   ├── io
│   ├── logs
│   ├── test
│   └── tools
├── build
│   ├── apps
│   └── CMakeFiles
├── cmake
├── dist
├── images
├── include
│   └── lidar_odometry
├── python_bind
│   └── example_data
├── scripts
├── src
│   ├── cam_model
│   ├── cloud_process
│   ├── factors
│   ├── feature
│   ├── lidar_map
│   ├── lins
│   ├── misc
│   ├── registration
│   └── viewer
└── thirdparty
    └── x86_64

CMakeLists.txt

# pyproject.toml
[build-system]
requires = ["scikit-build-core>=0.10", "pybind11", "cmake", "ninja"]
build-backend = "scikit_build_core.build"


[project]
name = "lidar_odometry"
version = "0.0.1"
description = "A minimal example package (with pybind11)"
readme = "README.md"
authors = [
    { name = "xb", email = "[email protected]" },
    { name = "lzn", email = "[email protected]" },
]
requires-python = ">=3.9, <3.11"
classifiers = [
    "Development Status :: 4 - Beta",
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python :: 3 :: Only",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
]


[tool.scikit-build]
wheel.expand-macos-universal-tags = true
minimum-version = "build-system.requires"
cmake = { build-type = "Release", args = ['-GNinja'] }
build-dir = "build/{wheel_tag}"


Vorherrschende Sprache
Python
Sterne
147
Forks
39
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus pybind/scikit_build_example

Alle Issues in pybind/scikit_build_example

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.