ompl / ompl/ompl

Broken pkg-config file ompl.pc

Open
#1,218 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
2.2k
Forks
713
Avg merge
9d 12h
Merged PRs (30d)
2

Description

OMPL generates a broken pkg-config file since PR #1066

(Following outputs are generated inside an Ubuntu 20.04 docker container, with -DCMAKE_INSTALL_PREFIX=/opt/workspace/install)

Before #1066 (good):

# This file was generated by CMake for ompl
prefix=/opt/workspace/install
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include/ompl-1.6

Name: ompl
Description: The Open Motion Planning Library
Version: 1.6.0
Requires: eigen3 
Libs: -L${libdir} -lompl /usr/lib/x86_64-linux-gnu/libboost_serialization.so /usr/lib/x86_64-linux-gnu/libboost_filesystem.so /usr/lib/x86_64-linux-gnu/libboost_system.so -lpthread
Cflags: -std=c++17 -I${includedir} -I/usr/include

After #1066 (bad, Boost::* are no valid pkg-config dependencies):

# This file was generated by CMake for ompl
prefix=/opt/workspace/install
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include/ompl-1.6

Name: ompl
Description: The Open Motion Planning Library
Version: 1.6.0
Requires: eigen3 Boost::filesystem Boost::program_options Boost::serialization Boost::system
Libs: -L${libdir} -lompl -lpthread
Cflags: -std=c++17 -I${includedir} -I/usr/include

Trying to use pkg-config will thus lead to an error:

$ pkg-config ompl --cflags
Package Boost::filesystem was not found in the pkg-config search path.
Perhaps you should add the directory containing `Boost::filesystem.pc'
to the PKG_CONFIG_PATH environment variable
Package 'Boost::filesystem', required by 'ompl', not found

On the current main branch the following ompl.pc is generated (which is even more broken):

# This file was generated by CMake for ompl
prefix=/opt/workspace/install
exec_prefix=${prefix}
libdir=/opt/workspace/install/lib
includedir=/opt/workspace/install/include

Name: ompl
Description: The Open Motion Planning Library
Version: 1.6.0
Requires: Eigen3::Eigen Boost::filesystem Boost::serialization Boost::system Eigen3::Eigen $<$<BOOL:TRUE>:Threads::Threads> $<$<BOOL:>:flann::flann> $<$<BOOL:FALSE>:Triangle::Triangle> $<$<BOOL:>:Spot::Spot>
Libs: -L${libdir} -lompl 
Cflags: -std=c++17 -I${includedir} -I/usr/include

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the CMake/pkg-config generation changed by PR #1066 and comparing the generated ompl.pc examples in this report. Reproduce the install in an Ubuntu 20.04 container with -DCMAKE_INSTALL_PREFIX=/opt/workspace/install, then verify pkg-config ompl --cflags and --libs. Done means ompl.pc contains valid pkg-config dependencies and works without treating CMake target names as package names.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.