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

Get rid of manually compiled qhull? #1350

Closed
traversaro opened this issue Feb 20, 2023 · 4 comments · Fixed by #1351
Closed

Get rid of manually compiled qhull? #1350

traversaro opened this issue Feb 20, 2023 · 4 comments · Fixed by #1351

Comments

@traversaro
Copy link
Member

Back in #517 we added support for compiling qhull as part of the superbuild. As qhull is also installed via apt, we should see if it is possible to get rid of it and just use the qhull installed by apt, for better compatibility with other apt-provided packages that uses qhull (such as PCL or MoveIt!).

See also #1275, that basically implemented this for all the non-apt platforms.

cc @GiulioRomualdi

@traversaro
Copy link
Member Author

On Ubuntu 20.04 the blf build is failing with:

2023-02-20T17:11:00.8898742Z CMake Error at cmake/BipedalLocomotionFrameworkFindDependencies.cmake:58 (find_package):
2023-02-20T17:11:00.8899236Z   By not providing "FindQhull.cmake" in CMAKE_MODULE_PATH this project has
2023-02-20T17:11:00.8899681Z   asked CMake to find a package configuration file provided by "Qhull", but
2023-02-20T17:11:00.8900036Z   CMake did not find one.
2023-02-20T17:11:00.8900195Z 
2023-02-20T17:11:00.8900408Z   Could not find a package configuration file provided by "Qhull" (requested
2023-02-20T17:11:00.8900729Z   version 8.0.0) with any of the following names:
2023-02-20T17:11:00.8900889Z 
2023-02-20T17:11:00.8900980Z     QhullConfig.cmake
2023-02-20T17:11:00.8901234Z     qhull-config.cmake
2023-02-20T17:11:00.8901369Z 
2023-02-20T17:11:00.8901529Z   Add the installation prefix of "Qhull" to CMAKE_PREFIX_PATH or set
2023-02-20T17:11:00.8901873Z   "Qhull_DIR" to a directory containing one of the above files.  If "Qhull"
2023-02-20T17:11:00.8902218Z   provides a separate development package or SDK, be sure it has been
2023-02-20T17:11:00.8902471Z   installed.
2023-02-20T17:11:00.8902687Z Call Stack (most recent call first):
2023-02-20T17:11:00.8903047Z   cmake/BipedalLocomotionFrameworkDependencies.cmake:32 (checkandset_dependency)
2023-02-20T17:11:00.8903474Z   CMakeLists.txt:21 (include)
2023-02-20T17:11:00.8903644Z 
2023-02-20T17:11:00.8903650Z 
2023-02-20T17:11:00.8903838Z -- Configuring incomplete, errors occurred!

I am not sure if it is just that QhullConfig.cmake is missing (and that could be fixed by providing a FindQhull.cmake) or even by linking the library correctly the compilation still fails.

@GiulioRomualdi
Copy link
Member

GiulioRomualdi commented Feb 21, 2023

Only .cmake is missing. If I'm not mistaken qhull is privately linked in blf so we can avoid installing the FindQhull.cmake

We may try to add something similar to https://github.com/PointCloudLibrary/pcl/blob/master/cmake/Modules/FindQhull.cmake in blf

@traversaro
Copy link
Member Author

Apparently in Ubuntu 20.04 only the qhullcpp headers are installed, but no library contained the compiled symbols, so it is impossible to use apt-provided package via qhullcpp .

@traversaro
Copy link
Member Author

Apparently in Ubuntu 20.04 only the qhullcpp headers are installed, but no library contained the compiled symbols, so it is impossible to use apt-provided package via qhullcpp .

So, to minimize the possible problems, I still think that it make sense to at least solve the problem on Ubuntu 22.04 and future version. To do so, I modified #1351 to:

  • Always install libqhull-dev via apt
  • Only build qhull on Ubuntu 20.04 (Focal)

Note that this may be problematic on 20.04 as both qhull from apt and qhull from superbuild is installed. However, this is already the case in CI and in the laptop of most developers, as libqhull-dev is a dependency of libpcl-dev . So, the PR does not make the situation worse on 20.04, and instead permit to avoid building qhull on 22.04, so I think it is a net gain.

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