Behavior difference when the prefix line is quoted #186

Closed
opened 2018-06-09 04:32:52 +00:00 by lantw44 · 0 comments
lantw44 commented 2018-06-09 04:32:52 +00:00 (Migrated from github.com)

This is libgit2.pc found on Arch Linux, whose first line prefix is quoted:

prefix="/usr"
libdir=${prefix}/lib
includedir=${prefix}/include

Name: libgit2
Description: The git library, take 2
Version: 0.27.0

Libs: -L${libdir} -lgit2
Libs.private: -lrt -lpthread -lcurl -lssh2
Requires.private: openssl zlib

Cflags: -I${includedir}

When we use pkg-config to get the value of libdir, we get the expected result:

$ ./pkg-config --variable=libdir libgit2
/usr/lib

When we use pkgconf to get the value of libdir, /usr is quoted so the result is invalid:

$ ./pkgconf --variable=libdir libgit2
"/usr"/lib

The latter result seems to cause guile-git to fail to build. This problem was reported by an Arch Linux user: https://aur.archlinux.org/packages/guile-git-lib/

Is it a bug of pkgconf, or we should ask libgit2 to stop using quotes in .pc files?

This is libgit2.pc found on Arch Linux, whose first line `prefix` is quoted: ``` prefix="/usr" libdir=${prefix}/lib includedir=${prefix}/include Name: libgit2 Description: The git library, take 2 Version: 0.27.0 Libs: -L${libdir} -lgit2 Libs.private: -lrt -lpthread -lcurl -lssh2 Requires.private: openssl zlib Cflags: -I${includedir} ``` When we use `pkg-config` to get the value of `libdir`, we get the expected result: ``` $ ./pkg-config --variable=libdir libgit2 /usr/lib ``` When we use `pkgconf` to get the value of `libdir`, `/usr` is quoted so the result is invalid: ``` $ ./pkgconf --variable=libdir libgit2 "/usr"/lib ``` The latter result seems to cause guile-git to fail to build. This problem was reported by an Arch Linux user: https://aur.archlinux.org/packages/guile-git-lib/ Is it a bug of pkgconf, or we should ask libgit2 to stop using quotes in .pc files?
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ariadne/pkgconf#186
There is no content yet.