omplapp icon indicating copy to clipboard operation
omplapp copied to clipboard

modernize cmake syntax

Open mamoll opened this issue 1 year ago • 3 comments

This PR mirrors the changes in https://github.com/ompl/ompl/pull/1066.

The pkg-config file ompl.pc that is generated is actually broken. The same is true for the ompl repo. I'm thinking we should just remove the png-config related stuff.

I noticed that in the ompl repo, libompl gets installed in CMAKE_INSTALL_DATAROOTDIR (i.e., /usr/share) rather than CMAKE_INSTALL_LIBDIR (i.e. /usr/lib). That is fixed in this PR for omplapp, but if this is right, we need to make the same change in ompl.

mamoll avatar Sep 08 '24 00:09 mamoll

@Ryanf55 FYSA

mamoll avatar Sep 08 '24 00:09 mamoll

I tried your PR in an isolated environment, and it didn't compile. After cloning and changing directory into the repo:

docker run --net host -v $(pwd):/ws -w /ws -it ubuntu:22.04 bash
apt update
apt install -y \
    build-essential libboost-filesystem-dev libboost-serialization-dev libboost-system-dev libboost-program-options-dev \
    cmake libeigen3-dev libassimp-dev libfcl-dev
cmake -B build/Release
cmake --build build/Release/ --parallel $(nproc)

Results in

[ 87%] Built target demo_MultiLevelPlanningRigidBody2D
[ 88%] Building CXX object src/omplapp/CMakeFiles/ompl_app_base.dir/apps/detail/appUtil.cpp.o
[ 88%] Linking CXX executable ../../bin/demo_MultiLevelPlanningRigidBody3D
[ 88%] Built target demo_MultiLevelPlanningRigidBody3D
[ 88%] Building CXX object src/omplapp/CMakeFiles/ompl_app_base.dir/geometry/RigidBodyGeometry.cpp.o
gmake[2]: *** No rule to make target '/usr/lib/x86_64-linux-gnu/libz.so', needed by 'lib/libompl_app_base.so.1.6.0'.  Stop.
gmake[2]: *** Waiting for unfinished jobs....
[ 88%] Building CXX object src/omplapp/CMakeFiles/ompl_app_base.dir/geometry/detail/assimpUtil.cpp.o
[ 88%] Linking CXX executable ../../bin/demo_Koules
[ 88%] Linking CXX executable ../../bin/demo_MultiLevelPlanningHyperCube
[ 88%] Built target demo_Koules
[ 88%] Built target demo_MultiLevelPlanningHyperCube
[ 89%] Linking CXX executable ../../bin/demo_ConstrainedPlanningKinematicChain
[ 89%] Built target demo_ConstrainedPlanningKinematicChain
[ 89%] Linking CXX executable ../../bin/demo_ConstrainedPlanningSphere
[ 89%] Built target demo_ConstrainedPlanningSphere
[ 90%] Linking CXX executable ../../bin/demo_ConstrainedPlanningTorus
[ 90%] Built target demo_ConstrainedPlanningTorus
[ 90%] Linking CXX executable ../../bin/demo_MultiLevelPlanningKinematicChain
[ 90%] Built target demo_MultiLevelPlanningKinematicChain
[ 90%] Linking CXX executable ../../bin/demo_ConstrainedPlanningImplicitChain
[ 90%] Built target demo_ConstrainedPlanningImplicitChain
[ 90%] Linking CXX executable ../../bin/demo_MultiLevelPlanningHyperCubeBenchmark
[ 90%] Built target demo_MultiLevelPlanningHyperCubeBenchmark
[ 90%] Linking CXX executable ../../bin/demo_ConstrainedPlanningImplicitParallel
[ 90%] Built target demo_ConstrainedPlanningImplicitParallel
gmake[1]: *** [CMakeFiles/Makefile2:1298: src/omplapp/CMakeFiles/ompl_app_base.dir/all] Error 2

Note I use slightly different build instructions rather than calling make directly, but it works much the same, with less typing.

Ryanf55 avatar Sep 08 '24 04:09 Ryanf55

The docker build error looks to me like libassimp-dev's Debian package is broken and doesn't declare a dependency on zlib1g-dev. Once you install the later, the build succeeds

mamoll avatar Sep 09 '24 02:09 mamoll