Bug 5102 - qt package moc, uic, rcc read from wrong place
Summary: qt package moc, uic, rcc read from wrong place
Status: RESOLVED WORKSFORME
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: 2012.02
Hardware: Other Linux
: P5 minor
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-14 11:54 UTC by mehdi
Modified: 2012-04-28 20:24 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
qt cross compile log (8.54 KB, application/x-gzip)
2012-04-15 05:32 UTC, mehdi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mehdi 2012-04-14 11:54:23 UTC
when cross compiling qt, building application with cross compiled qmake creates a wrong location for moc, uic, and rcc in Makefile.
qmake expect finding moc in host/usr/arm-unknown-linux-uclibcgnueabi/usr/bin/ while the actual files are located in the host/usr/bin/

I compiled this with 2011.11 and it was ok. I guess this is something that is introduced in 2012.02.

Thank you
sorry for bad english. :-)
Comment 1 Thomas Petazzoni 2012-04-14 16:47:09 UTC
That seems strange, because there were only two commits relative to the Qt package between 2011.11 and 2012.12 and none of them could have affected the location of moc, uic, rcc, etc. Can you please post the Buildroot configuration you're using, and the build errors you have (full build log would be nice) ?

The following two commits that took place are:

commit 1e39b8a6ff5ba330688bc1a60d1e509d716b6900
Author: Frederik Pasch <fpasch@googlemail.com>
Date:   Thu Feb 9 21:20:12 2012 +0100

    qt: needs host-pkg-config
    
    Closes #4760
    
    Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>

diff --git a/package/qt/qt.mk b/package/qt/qt.mk
index 28a477a..34f05f9 100644
--- a/package/qt/qt.mk
+++ b/package/qt/qt.mk
@@ -15,7 +15,7 @@
 QT_VERSION = 4.7.4
 QT_SOURCE  = qt-everywhere-opensource-src-$(QT_VERSION).tar.gz
 QT_SITE    = http://get.qt.nokia.com/qt/source
-
+QT_DEPENDENCIES = host-pkg-config
 QT_INSTALL_STAGING = YES
 
 ifeq ($(BR2_PACKAGE_QT_LICENSE_APPROVED),y)

commit d018125508c1d13f69b71702384c00c7095986a1
Author: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Date:   Fri Jan 27 00:41:30 2012 +0100

    qt: qt-dbus: replace dependency on dbus by select
    
    Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
    Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>

diff --git a/package/qt/Config.in b/package/qt/Config.in
index ab231d9..3a552d0 100644
--- a/package/qt/Config.in
+++ b/package/qt/Config.in
@@ -280,12 +280,9 @@ config BR2_PACKAGE_QT_PHONON_BACKEND
          If unsure, say n.
 endif
 
-comment "Qt Dbus module not available (needs dbus)"
-       depends on !BR2_PACKAGE_DBUS
-
 config BR2_PACKAGE_QT_DBUS
        bool "DBus Module"
-       depends on BR2_PACKAGE_DBUS
+       select BR2_PACKAGE_DBUS
        help
          Build the Qt DBus module.
Comment 2 mehdi 2012-04-15 05:32:58 UTC
Created attachment 4274 [details]
qt cross compile log

Buildroot compilation have no error but when I try to cross compile a qt application it gives me an error. I tried to cross compile spreadsheet example of qt. I set QMAKESPEC=/arm-linux-qt/mkspecs/qws/linux-arm-g++. Here is the Makefile that qmake created( qmake.Makefile ).
I followed it to qt compilation and the config.status( buildroot.qt.config.status) of qt source has this : 
-hostprefix /home/emb/projects/logger/build-tools/buildroot-2012.02/output/host/usr/arm-unknown-linux-uclibcgnueabi/sysroot
that could be the cause.

here is the cross compilation commands and the error:

qt-book/chap03/spreadsheet> /arm-linux-qt/bin/qmake -project
qt-book/chap03/spreadsheet> /arm-linux-qt/bin/qmake spreadsheet.pro 
qt-book/chap03/spreadsheet> make
buildroot-2012.02/output/host/usr/arm-unknown-linux-uclibcgnueabi/sysroot/usr/bin/uic gotocelldialog.ui -o ui_gotocelldialog.h
make: buildroot-2012.02/output/host/usr/arm-unknown-linux-uclibcgnueabi/sysroot/usr/bin/uic: Command not found
make: *** [ui_gotocelldialog.h] Error 127

if I copy uic and moc and rcc to buildroot-2012.02/output/host/usr/arm-unknown-linux-uclibcgnueabi/sysroot/usr/bin/ from buildroot-2012.02/output/host/usr/bin
it compiles fine. But with same configuration by suing 2011.11 version It tries to run uic and all from correct place.

Thanx for your time and great job with buildroot :-).
Comment 3 Thomas Petazzoni 2012-04-25 15:40:54 UTC
I think you're using the wrong qmake. You should be executing the qmake from output/host/usr/bin/qmake.

I'll try to find the source code of your example and build it.
Comment 4 mehdi 2012-04-28 19:49:30 UTC
thanx that solved the problem. :-)
Comment 5 Thomas Petazzoni 2012-04-28 20:24:42 UTC
Thanks for reporting. Marking the bugs as fixed, worksforme.