pkgconf: consider pkgconf as a replacement for pkg-config
cover pkgconf: consider pkgconf as a replacement for pkg-config
pkgconf is a better replacement for pkg-config. Fedora 26 replaces the system pkg-config implementation with pkgconf because it "provides better support for handling .pc files and a stable library ABI/API for integrating into applications." and is actively maintained, unlike pkg-config.
pkgconf aims to offer many improvements over pkg-config such as faster/more efficient dependency resolver which "allows for the user to more conservatively link their binaries -- which may be helpful in some environments, such as when prelink(1) is being used.
pkgconf also aims to provide a more complete implementation of pkg-config. The features most likely to benefit the Yocto Project build system are the faster/more efficient dependency resolution and linker flag optimisation.
To test this, after applying these patches, update "local.conf" as below:
PREFERRED_PROVIDER_pkgconfig = "pkgconf" PREFERRED_PROVIDER_pkgconfig-native = "pkgconf-native" PREFERRED_PROVIDER_nativesdk-pkgconfig = "nativesdk-pkgconf"
Links:
1. http://pkgconf.org
2. https://fedoraproject.org/wiki/Changes/pkgconf_as_system_pkg-config_implementation
3. https://bugzilla.yoctoproject.org/show_bug.cgi?id=11308
Maxin B. John (3):
pkgconf: add recipe
libx11: fix build error
libxt: fix build failure
meta/files/common-licenses/pkgconf | 10 ++++ .../pkgconf/pkgconf/pkg-config-native.in | 6 +++ .../pkgconf/pkgconf/pkg-config-wrapper | 16 +++++++ meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb | 55 ++++++++++++++++++++++ meta/recipes-graphics/xorg-lib/libx11_1.6.5.bb | 3 ++ ...il-don-t-link-makestrs-with-target-cflags.patch | 33 +++++++++++++ meta/recipes-graphics/xorg-lib/libxt_1.1.5.bb | 4 +- 7 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 meta/files/common-licenses/pkgconf create mode 100644 meta/recipes-devtools/pkgconf/pkgconf/pkg-config-native.in create mode 100755 meta/recipes-devtools/pkgconf/pkgconf/pkg-config-wrapper create mode 100644 meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb create mode 100644 meta/recipes-graphics/xorg-lib/libxt/0001-libXt-util-don-t-link-makestrs-with-target-cflags.patch
Signature · 1 line
2.4.0
PATCH 1/3 pkgconf: add recipe
Move pkgconf recipe to oe-core from meta-pkgconf:
https://github.com/kergoth/meta-kergoth-wip/tree/master/meta-pkgconf
--- meta/files/common-licenses/pkgconf | 10 ++++ .../pkgconf/pkgconf/pkg-config-native.in | 6 +++ .../pkgconf/pkgconf/pkg-config-wrapper | 16 +++++++ meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb | 55 ++++++++++++++++++++++ 4 files changed, 87 insertions(+) create mode 100644 meta/files/common-licenses/pkgconf create mode 100644 meta/recipes-devtools/pkgconf/pkgconf/pkg-config-native.in create mode 100755 meta/recipes-devtools/pkgconf/pkgconf/pkg-config-wrapper create mode 100644 meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb
meta/files/common-licenses/pkgconf new file +10 -0
@@ -0,0 +1,10 @@ +Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017 + pkgconf authors (see AUTHORS file in source directory). + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +This software is provided 'as is' and without any warranty, express or +implied. In no event shall the authors be liable for any damages arising +from the use of this software.
meta/recipes-devtools/pkgconf/pkgconf/pkg-config-native.in new file +6 -0
@@ -0,0 +1,6 @@ +#! /bin/sh + +PKG_CONFIG_PATH="@PATH_NATIVE@" +unset PKG_CONFIG_SYSROOT_DIR + +pkg-config "$@"
meta/recipes-devtools/pkgconf/pkgconf/pkg-config-wrapper new file +16 -0
@@ -0,0 +1,16 @@ +#!/bin/sh +# pkgconf wrapper to deal with pkg-config/pkgconf compatibility issues +# +# Copyright (C) 2015 Christopher Larson <[email protected]> +# License: MIT (see COPYING.MIT at the root of the repository for terms) + +for arg; do + case "$arg" in + --variable|--variable=*) + # pkg-config doesn't sysroot-prefix user variables + unset PKG_CONFIG_SYSROOT_DIR + ;; + esac +done + +exec pkgconf "$@"
meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb new file +55 -0
55 lines not on this page · raw message
Signature · 1 line
2.4.0
PATCH 2/3 libx11: fix build error
In reply to Maxin B. Johnlibx11 build fails with this error:
fatal error: bits/long-double-64.h: No such file or directory | compilation terminated.
This is due to the fact that "makekeys" should be compiled for the host since it is executed at build time to generate ks_tables.h. Since we have the X11 include files in the standard path of oe-core, we can remove the X11_CFLAGS from Makefile.
--- meta/recipes-graphics/xorg-lib/libx11_1.6.5.bb | 3 +++ 1 file changed, 3 insertions(+)
meta/recipes-graphics/xorg-lib/libx11_1.6.5.bb +3 -0
@@ -5,6 +5,9 @@ BBCLASSEXTEND = "native nativesdk" SRC_URI += "file://disable_tests.patch \ " +do_configure_append () { + sed -i -e "/X11_CFLAGS/d" ${B}/src/util/Makefile +} SRC_URI[md5sum] = "0f618db70c4054ca67cee0cc156a4255" SRC_URI[sha256sum] = "4d3890db2ba225ba8c55ca63c6409c1ebb078a2806de59fb16342768ae63435d"
Signature · 1 line
2.4.0
PATCH 3/3 libxt: fix build failure
In reply to Maxin B. Johnlibxt build fails with this error:
/home/maxin/poky/build/tmp/work/i586-poky-linux/libxt/1_1.1.5-r0/recipe-sysroot/usr/include/bits/long-double.h:57:33:
fatal error: bits/long-double-64.h: No such file or directory
| compilation terminated.
| Makefile:408: recipe for target 'makestrs.o' failed
Fix the makestrs build.
--- ...il-don-t-link-makestrs-with-target-cflags.patch | 33 ++++++++++++++++++++++ meta/recipes-graphics/xorg-lib/libxt_1.1.5.bb | 4 ++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-graphics/xorg-lib/libxt/0001-libXt-util-don-t-link-makestrs-with-target-cflags.patch
meta/recipes-graphics/xorg-lib/libxt/0001-libXt-util-don-t-link-makestrs-with-target-cflags.patch new file +33 -0
@@ -0,0 +1,33 @@ +From b0c0e6d90bd99a699701c9542640adb218f5d536 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni <[email protected]> +Date: Mon, 10 Jul 2017 16:51:13 +0300 +Subject: [PATCH] libXt: util: don't link makestrs with target cflags + +The line: AM_CFLAGS = $(XT_CFLAGS) +in util/Makefile.am is wrong because it adds target cflags to the +compilation of makestrs, which is built for the build machine, which +leads to build failures when cross-compiling. + +Upstream-Status: Pending + +Signed-off-by: Thomas Petazzoni <[email protected]> +Signed-off-by: Maxin B. John <[email protected]> +--- + util/Makefile.am | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/util/Makefile.am b/util/Makefile.am +index 800b35b..f2dd1f9 100644 +--- a/util/Makefile.am ++++ b/util/Makefile.am +@@ -11,7 +11,6 @@ EXTRA_DIST = \ + StrDefs.ht \ + string.list + +-AM_CFLAGS = $(XT_CFLAGS) + makestrs_SOURCES = makestrs.c + + +-- +2.4.0 +
meta/recipes-graphics/xorg-lib/libxt_1.1.5.bb +3 -1
@@ -23,7 +23,9 @@ PE = "1" XORG_PN = "libXt" -SRC_URI += "file://libxt_fix_for_x32.patch" +SRC_URI += "file://libxt_fix_for_x32.patch \ + file://0001-libXt-util-don-t-link-makestrs-with-target-cflags.patch \ + " BBCLASSEXTEND = "native"
Signature · 1 line
2.4.0
Quoted 16 lines · Maxin B. John
pkgconf is a better replacement for pkg-config. Fedora 26 replaces the system pkg-config implementation with pkgconf because it "provides better support for handling .pc files and a stable library ABI/API for integrating into applications." and is actively maintained, unlike pkg-config.
pkgconf aims to offer many improvements over pkg-config such as faster/more efficient dependency resolver which "allows for the user to more conservatively
link their binaries -- which may be helpful in some environments, such as when
prelink(1) is being used.pkgconf also aims to provide a more complete implementation of pkg-config. The features most likely to benefit the Yocto Project build system are the faster/more efficient dependency resolution and linker flag optimisation.
Quoted 5 lines
To test this, after applying these patches, update "local.conf" as below:
PREFERRED_PROVIDER_pkgconfig= "pkgconf" PREFERRED_PROVIDER_pkgconfig-native = "pkgconf-native" PREFERRED_PROVIDER_nativesdk-pkgconfig = "nativesdk-pkgconf"
Is this going to be the case permanently?
I would suggest to make pkgconf default and dump pkgconfig recipes at same time
Or do we plan to wait for one release
Quoted 40 lines
Links:
1. http://pkgconf.org
2.
https://fedoraproject.org/wiki/Changes/pkgconf_as_system_pkg-config_implementation
3. https://bugzilla.yoctoproject.org/show_bug.cgi?id=11308Maxin B. John (3):
pkgconf: add recipe
libx11: fix build error
libxt: fix build failuremeta/files/common-licenses/pkgconf | 10 ++++ .../pkgconf/pkgconf/pkg-config-native.in | 6 +++ .../pkgconf/pkgconf/pkg-config-wrapper | 16 +++++++ meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb | 55 ++++++++++++++++++++++ meta/recipes-graphics/xorg-lib/libx11_1.6.5.bb | 3 ++ ...il-don-t-link-makestrs-with-target-cflags.patch | 33 +++++++++++++ meta/recipes-graphics/xorg-lib/libxt_1.1.5.bb | 4 +- 7 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 meta/files/common-licenses/pkgconf create mode 100644 meta/recipes-devtools/pkgconf/pkgconf/ pkg-config-native.in create mode 100755 meta/recipes-devtools/pkgconf/pkgconf/pkg-config-wrapper create mode 100644 meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb create mode 100644
meta/recipes-graphics/xorg-lib/libxt/0001-libXt-util-don-t-link-makestrs-with-target-cflags.patch--
2.4.0--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Quoted 5 lines · Khem Raj
Is this going to be the case permanently?
I would suggest to make pkgconf default and dump pkgconfig recipes at same time
Or do we plan to wait for one release
For testing this is good, if it merges I think we should dump pkgconfig and have appropriate provides.
Ross
Re: [PATCH 1/3] pkgconf: add recipe
In reply to Maxin B. JohnQuoted 2 lines · Maxin B. John
Move pkgconf recipe to oe-core from meta-pkgconf:
https://github.com/kergoth/meta-kergoth-wip/tree/master/meta-pkgconf
Fails under mingw, which is a regression compared to pkg-config.
libpkgconf/.libs/path.o:path.c:(.text+0x164): undefined reference to lstat' libpkgconf/.libs/path.o:path.c:(.text+0x1f9): undefined reference to S_ISLNK'
libpkgconf/.libs/path.o:path.c:(.text+0x2e5): undefined reference to `readlink'
(http://errors.yoctoproject.org/Errors/Details/147303/)
Ross
Re: [PATCH 1/3] pkgconf: add recipe
Hi Ross,
Quoted 11 lines · Ross
Quoted 3 lines · Maxin B. John
Move pkgconf recipe to oe-core from meta-pkgconf:
https://github.com/kergoth/meta-kergoth-wip/tree/master/meta-pkgconfFails under mingw, which is a regression compared to pkg-config.
libpkgconf/.libs/path.o:path.c:(.text+0x164): undefined reference to
lstat' libpkgconf/.libs/path.o:path.c:(.text+0x1f9): undefined reference toS_ISLNK' libpkgconf/.libs/path.o:path.c:(.text+0x2e5): undefined reference to `readlink'
Thanks, will look into it (this patch wasn't tested with mingw before).
Quoted 1 line
Ross
Best Regards,
Maxin