Skip to contentSkip to conversation

pkgconf: Always keep system libs

PATCH New Thomas Preston 2 participants 3 messages Nov 21, 2019 – Nov 25, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pkgconf: Always keep system libs

Normally pkgconf ignores the system include and system lib directories, which is useful because it allows the correct ordering of -I, -isystem and compiler default search paths. However, many packages use libtool, which relies on pkgconf to print the system libs dirs in order to locate the Libtool Archive (.la) files.

Instead of adding PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 to each of these packages, just allow system libs globally in the pkg-config wrapper. This allows libtool to find the .la files, and retains the correct include ordering.

Fixes (at least):
- http://autobuild.buildroot.org/results/a79e0487135ad90530595d5c6ecc32f9c8cea7c4/
- http://autobuild.buildroot.net/results/089/08952dbf89bf3c49da7697943441cee411940420/

---
 package/pkgconf/pkg-config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/pkgconf/pkg-config.in +1 -1
index f411eb0926..e5a23a10f7 100644
@@ -9,4 +9,4 @@ PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR:-${DEFAULT_PKG_CONFIG_LIBDIR}} \
 	PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR:-${DEFAULT_PKG_CONFIG_SYSROOT_DIR}} \
 	PKG_CONFIG_SYSTEM_INCLUDE_PATH=${PKG_CONFIG_SYSTEM_INCLUDE_PATH:-${DEFAULT_PKG_CONFIG_SYSTEM_INCLUDE_PATH}} \
 	PKG_CONFIG_SYSTEM_LIBRARY_PATH=${PKG_CONFIG_SYSTEM_LIBRARY_PATH:-${DEFAULT_PKG_CONFIG_SYSTEM_LIBRARY_PATH}} \
-	exec ${PKGCONFDIR}/pkgconf @STATIC@ "$@"
+	exec ${PKGCONFDIR}/pkgconf --keep-system-libs @STATIC@ "$@"
Signature · 1 line
2.23.0
#1 lore raw

PATCH 1/1 pkgconf: Always keep system libs

Hello Thomas,

Quoted 11 lines · Thomas Preston

Normally pkgconf ignores the system include and system lib directories, which is useful because it allows the correct ordering of -I, -isystem and compiler default search paths. However, many packages use libtool, which relies on pkgconf to print the system libs dirs in order to locate the Libtool Archive (.la) files.

Instead of adding PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 to each of these packages, just allow system libs globally in the pkg-config wrapper. This allows libtool to find the .la files, and retains the correct include ordering.

Quoted 5 lines

Fixes (at least):
- http://autobuild.buildroot.org/results/a79e0487135ad90530595d5c6ecc32f9c8cea7c4/
- http://autobuild.buildroot.net/results/089/08952dbf89bf3c49da7697943441cee411940420/

In favour of a general pgkconf solution (instead fixing individual packages) and tested for the libv4l and gmpc cases, you can add my

Only nitpick for the subject line s/Always/always/...

Regards,
Peter

Quoted 14 lines
---
 package/pkgconf/pkg-config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/pkgconf/pkg-config.in +1 -1
index f411eb0926..e5a23a10f7 100644
@@ -9,4 +9,4 @@ PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR:-${DEFAULT_PKG_CONFIG_LIBDIR}} \
 	PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR:-${DEFAULT_PKG_CONFIG_SYSROOT_DIR}} \
 	PKG_CONFIG_SYSTEM_INCLUDE_PATH=${PKG_CONFIG_SYSTEM_INCLUDE_PATH:-${DEFAULT_PKG_CONFIG_SYSTEM_INCLUDE_PATH}} \
 	PKG_CONFIG_SYSTEM_LIBRARY_PATH=${PKG_CONFIG_SYSTEM_LIBRARY_PATH:-${DEFAULT_PKG_CONFIG_SYSTEM_LIBRARY_PATH}} \
-	exec ${PKGCONFDIR}/pkgconf @STATIC@ "$@"
+	exec ${PKGCONFDIR}/pkgconf --keep-system-libs @STATIC@ "$@"
#2 lore raw

PATCH 1/1 pkgconf: Always keep system libs

Hey,

Quoted 19 lines · Peter Seiderer

Hello Thomas,

Quoted 15 lines · Thomas Preston

Normally pkgconf ignores the system include and system lib directories, which is useful because it allows the correct ordering of -I, -isystem and compiler default search paths. However, many packages use libtool, which relies on pkgconf to print the system libs dirs in order to locate the Libtool Archive (.la) files.

Instead of adding PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 to each of these packages, just allow system libs globally in the pkg-config wrapper. This allows libtool to find the .la files, and retains the correct include ordering.

Fixes (at least):
- http://autobuild.buildroot.org/results/a79e0487135ad90530595d5c6ecc32f9c8cea7c4/
- http://autobuild.buildroot.net/results/089/08952dbf89bf3c49da7697943441cee411940420/

Quoted 9 lines
Quoted 1 line

In favour of a general pgkconf solution (instead fixing individual packages) and tested for the libv4l and gmpc cases, you can add my

Only nitpick for the subject line s/Always/always/...

Thanks for testing and reviewing Peter, I've sent a v2.