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

build error with demo programs, missing libusb, JsonCpp, FLANN, QHULL etc #53

Open
hoangsep opened this issue Feb 19, 2025 · 2 comments

Comments

@hoangsep
Copy link

hoangsep commented Feb 19, 2025

When I tried to build the demo programs, I have a lot of errors such as

CMake Error at CMakeLists.txt:266 (add_executable):
  Target "demo_benchmark" links to target "libusb::libusb" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?


CMake Error at CMakeLists.txt:266 (add_executable):
  Target "demo_benchmark" links to target "libusb::libusb" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?


CMake Error at CMakeLists.txt:266 (add_executable):
  Target "demo_benchmark" links to target "JsonCpp::JsonCpp" but the target
  was not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?


CMake Error at CMakeLists.txt:266 (add_executable):
  Target "demo_benchmark" links to target "FLANN::FLANN" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?


CMake Error at CMakeLists.txt:266 (add_executable):
  Target "demo_benchmark" links to target "QHULL::QHULL" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?

What could be the issue here?
Thanks in advance.

BTW, I can build Iridescence and run all the tests without issue. I can also build gtsam_points without demo.
Ubuntu 22.04, cuda 12.1

@hoangsep hoangsep changed the title build error build error with demo programs, missing libusb, JsonCpp, FLANN, QHULL etc Feb 19, 2025
@koide3
Copy link
Owner

koide3 commented Feb 19, 2025

These errors look like about libraries linked to PCL. Did you manually install PCL with selecting out some submodules?

@hoangsep
Copy link
Author

the options I am using:

option(BUILD_TESTS "Build test" ON)
option(BUILD_DEMO "Build demo programs" ON)
option(BUILD_EXAMPLE "Build example programs" ON)
option(BUILD_TOOLS "Build tools" ON)
option(BUILD_WITH_TBB "Build with TBB support" ON)
option(BUILD_WITH_OPENMP "Build with OpenMP support" ON)
option(BUILD_WITH_CUDA "Build with GPU support" ON)
option(BUILD_WITH_CUDA_MULTIARCH "Build with CUDA multi-architecture support" OFF)
option(BUILD_WITH_MARCH_NATIVE "Build with -march=native" OFF)
option(ENABLE_CPPCHECK "Enable cppcheck" OFF)
option(ENABLE_COVERAGE "Enable coverage check" OFF)

I am running this in a ROS 2 environments, so PCL was installed:

apt list --installed | grep libpcl


libpcl-apps1.12/jammy,now 1.12.1+dfsg-3build1 amd64 [installed,automatic]
libpcl-common1.12/jammy,now 1.12.1+dfsg-3build1 amd64 [installed,automatic]
libpcl-dev/jammy,now 1.12.1+dfsg-3build1 amd64 [installed,automatic]
libpcl-features1.12/jammy,now 1.12.1+dfsg-3build1 amd64 [installed,automatic]
libpcl-filters1.12/jammy,now 1.12.1+dfsg-3build1 amd64 [installed,automatic]
libpcl-io1.12/jammy,now 1.12.1+dfsg-3build1 amd64 [installed,automatic]
libpcl-kdtree1.12/jammy,now 1.12.1+dfsg-3build1 amd64 [installed,automatic]
libpcl-keypoints1.12/jammy,now 1.12.1+dfsg-3build1 amd64 [installed,automatic]
libpcl-ml1.12/jammy,now 1.12.1+dfsg-3build1 amd64 [installed,automatic]
libpcl-octree1.12/jammy,now 1.12.1+dfsg-3build1 amd64 [installed,automatic]
libpcl-outofcore1.12/jammy,now 1.12.1+dfsg-3build1 amd64 [installed,automatic]
libpcl-people1.12/jammy,now 1.12.1+dfsg-3build1 amd64 [installed,automatic]
libpcl-recognition1.12/jammy,now 1.12.1+dfsg-3build1 amd64 [installed,automatic]
libpcl-registration1.12/jammy,now 1.12.1+dfsg-3build1 amd64 [installed,automatic]
libpcl-sample-consensus1.12/jammy,now 1.12.1+dfsg-3build1 amd64 [installed,automatic]
libpcl-search1.12/jammy,now 1.12.1+dfsg-3build1 amd64 [installed,automatic]
libpcl-segmentation1.12/jammy,now 1.12.1+dfsg-3build1 amd64 [installed,automatic]
libpcl-stereo1.12/jammy,now 1.12.1+dfsg-3build1 amd64 [installed,automatic]
libpcl-surface1.12/jammy,now 1.12.1+dfsg-3build1 amd64 [installed,automatic]
libpcl-tracking1.12/jammy,now 1.12.1+dfsg-3build1 amd64 [installed,automatic]
libpcl-visualization1.12/jammy,now 1.12.1+dfsg-3build1 amd64 [installed,automatic]

I also installed the latest cmake, which gave me a more detailed error

CMake Error at /usr/local/lib/cmake/iridescence/iridescence-targets.cmake:61 (set_target_properties):
  The link interface of target "Iridescence::iridescence" contains:

    FLANN::FLANN

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  /usr/local/lib/cmake/iridescence/iridescence-config.cmake:42 (include)
  CMakeLists.txt:277 (find_package)

I would try building in a clean environment without ROS 2

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

2 participants