Bug 4297 - Qt's qmake uses wrong pkg-config
Summary: Qt's qmake uses wrong pkg-config
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: PC Linux
: P5 minor
Target Milestone: ---
Assignee: Thomas Petazzoni
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-12 12:51 UTC by Karl Krach
Modified: 2011-11-18 11:10 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karl Krach 2011-10-12 12:51:35 UTC
Creating a toolchain for ARM with the latest Qt library will install it's libraries and QMAKESPECs. Theses QMAKESPECs have the CXXFLAGS and the correct compiler, but don't address the pkg-config location.

If using pkg-config with qmake, it calls pkg-config from /usr/bin which causes wrong include dirs.


########## Example ##########

Write to your *.pro file:

	# see http://doc.trolltech.com/4.6/qmake-project-files.html#configuration-features
	CONFIG    += link_pkgconfig
	PKGCONFIG += fuse


If the wrong pkg-config is used, the include directory points to "-I/usr/include/fuse" - otherwise to a directory inside your toolchain.

########## Patch ############

$ diff -u qws/linux-arm-g++/qmake.conf.orig qws/linux-arm-g++/qmake.conf
--- qws/linux-arm-g++/qmake.conf.orig	2011-10-12 14:47:49.000000000 +0200
+++ qws/linux-arm-g++/qmake.conf	2011-10-12 14:41:34.000000000 +0200
@@ -17,6 +17,9 @@
 QMAKE_CXX      = /opt/damian/toolchain-arm/usr/bin/arm-none-linux-gnueabi-g++
 QMAKE_CC       = /opt/damian/toolchain-arm/usr/bin/arm-none-linux-gnueabi-gcc
 
+# Define Path to the correct pkg-config
+PKG_CONFIG = /opt/damian/toolchain-arm/usr/bin/pkg-config
+
 # modifications to g++.conf
 
 # modifications to linux.conf




I'm using buildroot 2011.08 with the CodeSoucery 2009q1 toolchain.
Comment 1 Karl Krach 2011-10-12 12:53:42 UTC
Of course the patch is not to solve the problem, but to show how the QMAKESPEC should look like.
Comment 2 Peter Korsgaard 2011-11-18 11:10:54 UTC
Fixed in git (a028c31ed07) - Thanks.