qtopia4: fix use of pkg-config
PATCH 1/1 qtopia4: fix use of pkg-config
When cross compiling, Qt sets PKG_CONFIG in its own configure script to an empty string. That leads to not using pkg-config. To avoid that, use the configure option -force-pkg-config. Also set environment variables for pkg-config defined in TARGET_CONFIGURE_OPTS.
--- package/qtopia4/qtopia4.mk | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
package/qtopia4/qtopia4.mk +6 -1
@@ -253,10 +253,15 @@ endif -[ -f $(QTOPIA4_QCONFIG_FILE) ] && cp $(QTOPIA4_QCONFIG_FILE) \ $(QTOPIA4_TARGET_DIR)/$(QTOPIA4_QCONFIG_FILE_LOCATION) +# Qt doesn't use PKG_CONFIG, it searches for pkg-config with 'which'. +# PKG_CONFIG_SYSROOT is only used to avoid a warning from Qt's configure system +# when cross compiling, Qt 4.4.3 is wrong here. (cd $(QTOPIA4_TARGET_DIR); rm -rf config.cache; \ - PATH=$(TARGET_PATH) \ + $(TARGET_CONFIGURE_OPTS) \ + PKG_CONFIG_SYSROOT="$(STAGING_DIR)" \ ./configure \ -verbose \ + -force-pkg-config \ -embedded $(BR2_PACKAGE_QTOPIA4_EMB_PLATFORM) \ $(QTOPIA4_QCONFIG_COMMAND) \ $(QTOPIA4_CONFIGURE) \
Signature · 1 line
1.5.6.4
PATCH 1/1 qtopia4: fix use of pkg-config
Le Tue, 28 Oct 2008 02:51:36 +0100,
Markus Heidelberg <[email protected]> a ?crit :
package/qtopia4/qtopia4.mk endif · line 261
Quoted 2 lines
package/qtopia4/qtopia4.mk +2
-0+ $(TARGET_CONFIGURE_OPTS) \ + PKG_CONFIG_SYSROOT="$(STAGING_DIR)" \
I don't get why PKG_CONFIG_SYSROOT should be set here. The correct variable is PKG_CONFIG_SYSROOT_DIR and it is already set in TARGET_CONFIGURE_OPTS. I probably missed something specific to Qt, but I didn't understand the sentence: ?PKG_CONFIG_SYSROOT is only used to avoid a warning from Qt's configure system?.
Thanks,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/1 qtopia4: fix use of pkg-config
Thomas Petazzoni, 28.10.2008:
Quoted 11 lines
Le Tue, 28 Oct 2008 02:51:36 +0100,
Markus Heidelberg <[email protected]> a ?crit :package/qtopia4/qtopia4.mk endif · line 261
Quoted 2 lines
package/qtopia4/qtopia4.mk +2
-0+ $(TARGET_CONFIGURE_OPTS) \ + PKG_CONFIG_SYSROOT="$(STAGING_DIR)" \I don't get why
PKG_CONFIG_SYSROOTshould be set here. The correct variable isPKG_CONFIG_SYSROOT_DIRand it is already set inTARGET_CONFIGURE_OPTS. I probably missed something specific to Qt, but I didn't understand the sentence: ?PKG_CONFIG_SYSROOT is only used to avoid a warning from Qt's configure system?.
Damn, I wanted to keep the comment short without being unclear, which apparently failed. This extract from the file Qt/configure should make the use of -force-pkg-config and PKG_CONFIG_SYSROOT clear. Qt should query PKG_CONFIG_SYSROOT_DIR instead of PKG_CONFIG_SYSROOT. I've already sent a bug report.
if [ "$QT_CROSS_COMPILE" = "yes" ]; then
if [ -n "$QT_FORCE_PKGCONFIG" ]; then
echo >&2 ""
echo >&2 "You have asked to use pkg-config and are cross-compiling." echo >&2 "Please make sure you have a correctly set-up pkg-config" echo >&2 "environment!"
echo >&2 ""
if [ -z "$PKG_CONFIG_PATH" ]; then
echo >&2 ""
echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean" echo >&2 "the host compiler's .pc files will be used. This is probably" echo >&2 "not what you want."
echo >&2 ""
elif [ -z "$PKG_CONFIG_SYSROOT" ]; then
echo >&2 ""
echo >&2 "Warning: PKG_CONFIG_SYSROOT has not been set. This means" echo >&2 "your toolchain's .pc files must contain the paths to the" echo >&2 "toolchain's libraries & headers. If configure tests are" echo >&2 "failing, please check these files."
echo >&2 ""
fi
else
PKG_CONFIG=""
fi
fi
PATCH 1/1 qtopia4: fix use of pkg-config
Le Tue, 28 Oct 2008 09:22:53 +0100,
Markus Heidelberg <[email protected]> a ?crit :
Quoted 5 lines
Damn, I wanted to keep the comment short without being unclear, which apparently failed. This extract from the file Qt/configure should make the use of -force-pkg-config and
PKG_CONFIG_SYSROOTclear. Qt should queryPKG_CONFIG_SYSROOT_DIRinstead ofPKG_CONFIG_SYSROOT. I've already sent a bug report.
Ok, now perfectly clear with the code :-) Maybe you can add the reference of your e-mail in the archives in the comment ? It would keep the comment short, but still allow one to understand what's going on exactly.
Thanks a lot for the clarification !
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/1 qtopia4: fix use of pkg-config
In reply to Markus HeidelbergQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Markus" == Markus Heidelberg <[email protected]> writes:
Markus> When cross compiling, Qt sets PKG_CONFIG in its own configure script to Markus> an empty string. That leads to not using pkg-config. To avoid that, use Markus> the configure option -force-pkg-config. Also set environment variables Markus> for pkg-config defined in TARGET_CONFIGURE_OPTS.
Thanks, committed.
Signature · 1 line
Bye, Peter Korsgaard