pkg-config not correctly parsing some cflags and libs formats

Bug #1460490 reported by Valmiki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pkg-config (Ubuntu)
New
Undecided
Unassigned

Bug Description

I am running Ubuntu 14.04 64-bit. All updates installed. pkg-config version 0.26

Running 'pkg-config --cflags --libs' on the following (and attached) foo.pc, outputs:

'-I/usr/include/ -I/usr/include/foo -I/usr/include/foo/ -L/usr/lib/ -L/usr/lib/foo -L/usr/lib/foo/ -lfoo'

The contents of foo.pc:
# Begin file

prefix=/usr
exec_prefix=${prefix}

includedir_1=${prefix}/include
includedir_2=${prefix}/include/
includedir_3=${prefix}/include/foo
includedir_4=${prefix}/include/foo/

libdir_1=${exec_prefix}/lib
libdir_2=${exec_prefix}/lib/
libdir_3=${exec_prefix}/lib/foo
libdir_4=${exec_prefix}/lib/foo/

Name: foo
Description: The foo library
Version: 1.0.0
Cflags: -I${includedir_2} -I${includedir_1} -I${includedir_3} -I${includedir_4}
Libs: -L${libdir_2} -L${libdir_1} -L${libdir_3} -L${libdir_4} -lfoo

#End file

Notice that 'includedir_1' and 'libdir_1' are not in the output. A trailing slash had to be added to to their values to be parsed correctly. This affects other libraries that use such variable use in their pc config file, such as x11.pc and opencv.pc.

Revision history for this message
Valmiki (valmiki-rampersad) wrote :
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.