Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install fail to link #162

Open
HernandoR opened this issue Dec 20, 2024 · 0 comments
Open

pip install fail to link #162

HernandoR opened this issue Dec 20, 2024 · 0 comments

Comments

@HernandoR
Copy link

HernandoR commented Dec 20, 2024

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}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant