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

Avoid generating empty -I directives in Cflags of .pc files #445

Closed
tho- opened this issue Jun 24, 2013 · 2 comments
Closed

Avoid generating empty -I directives in Cflags of .pc files #445

tho- opened this issue Jun 24, 2013 · 2 comments
Assignees

Comments

@tho-
Copy link

tho- commented Jun 24, 2013

Many groovy .pc files have empty -I directives.
This is harmful since an empty -I followed by another flag may be wrongly interpreted by compilers.

For instance, I have 87 such .pc files:
% cd /opt/ros/groovy/lib/pkgconfig/
% grep -- '-I$' *.pc | wc -l
87

Here is a small patch fixing this:

--- cmake/em/pkg.pc.em~ 2013-06-18 23:56:13.000000000 +0200
+++ cmake/em/pkg.pc.em  2013-06-23 17:42:07.000000000 +0200
@@ -1,6 +1,6 @@
 Name: @(CATKIN_PACKAGE_PREFIX + PROJECT_NAME)
 Description: Description of @PROJECT_NAME
 Version: @PROJECT_VERSION
-Cflags: @(' '.join(['-I%s' % include for include in PROJECT_ABSOLUTE_INCLUDE_DIRS.split(';')]))
+Cflags: @(' '.join(['-I%s' % include for include in PROJECT_ABSOLUTE_INCLUDE_DIRS.split(';') if include]))
 Libs: -L@PROJECT_SPACE_DIR/lib @(' '.join([lib for lib in PKG_CONFIG_LIBRARIES_WITH_PREFIX.split(';')]))
 Requires: @(PROJECT_CATKIN_DEPENDS.replace(';', ' '))
'''
@dirk-thomas
Copy link
Member

Can you please mention at least one package for which this is the case? That makes it easier to verify the patch.

Update: python_qt_binding is one example

@tho-
Copy link
Author

tho- commented Jun 25, 2013

Or catkin.pc :)

@ghost ghost assigned dirk-thomas Jun 25, 2013
PierrickKoch pushed a commit to PierrickKoch/robotpkg that referenced this issue Feb 21, 2014
This is a major update from 0.4.5 (ros-fuerte) to 0.5.67 (ros-groovy),
featuring a massive rewrite. This version is not compatible with the previous.
See CHANGELOG.rst in the sources for the gory details.

Local patches fix issues regarding .pc files, introducing an incompatibility
with official binarary package until this is merged upstream. See:
 ros/catkin#444
 ros/catkin#445

Another local patch installs env.sh, setup.sh at al. in etc/ros instead of the
root prefix. Their functionality is unchanged, though.

While here, rename the package from catkin to ros-catkin, for consistency with
other ros packages and easier package management from the command line
(e.g. robotpkg_delete ros-\*) or in robotpkg.conf (e.g. PKG_OPTIONS.ros-%)
cwecht pushed a commit to cwecht/catkin that referenced this issue Mar 20, 2018
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