Reg: QT application error

cancel
Showing results for 
Search instead for 
Did you mean: 

Reg: QT application error

Jump to solution
2,849 Views
vishvapathi
Contributor V

Hi Guys,

I followed the below link for installing of QT

How to run QT embeded with touch support on iMX platform (Based on qt 4.7.3)

while running the application i am getting the following error...

./mainwindow: line 1: syntax error: unexpected word (expecting ")")

DaianeAngolini

Labels (2)
1 Solution
63 Views
Raybiztech
Contributor V

Hi Vishvapathi,

                  Please make sure that, the " Name " and " Version " fields in the spec file matches exactly with the package copied into your /opt/freescale/pkgs/ and try building the package again using " ./ltib ". If still its looking for setup in web. you can build the package by following the below steps :

-> ./ltib -m prep -p qt-everywhere-opensource.spec (mention the same name as in the spec file)

-> ./ltib -m scbuild -p <packagename>

-> ./ltib -m scinstall -p <packagename>

-> ./ltib -m scdeploy -p <packagename>

Thanks & Regards,

Raybiztech.

View solution in original post

0 Kudos
16 Replies
63 Views
olias
Contributor II

hello,

I have followed this post and was successful building qt-everywhere-opensource-src-4.6.0 with ltib and L3.0.35_4.1.0_130816 after some attempts.  However it appears I only have the examples and demos built.

For example:

root@gumby /usr/local/Trolltech/demos/embedded/fluidlauncher$ ./fluidlauncher

QWSSocket::connectToLocalFile could not connect:: Connection refused

QWSSocket::connectToLocalFile could not connect:: Connection refused

QWSSocket::connectToLocalFile could not connect:: Connection refused

QWSSocket::connectToLocalFile could not connect:: Connection refused

QWSSocket::connectToLocalFile could not connect:: Connection refused

QWSSocket::connectToLocalFile could not connect:: Connection refused

No Qt for Embedded Linux server appears to be running.

If you want to run this program as a server,

add the "-qws" command-line option.

root@gumby /usr/local/Trolltech/demos/embedded/fluidlauncher$

<tech/demos/embedded/fluidlauncher$ ./fluidlauncher -qws                    

QFontDatabase: Cannot find font directory /home/~/imx6_project3/ltib/rpm/BUILD/../../rootfs/usr/local?

Aborted

root@gumby /usr/local/Trolltech$ ls -l

drwxr-xr-x   27 root     root          4096 Feb 24  2014 demos

drwxr-xr-x   44 root     root          4096 Feb 24  2014 examples

I am building a minimum profile.

What pkgs are need to get a full qt implementation?

thanks

0 Kudos
63 Views
Raybiztech
Contributor V

Hi,

          May be this is the problem with font directory ,have you tried,

                    export QT_QWS_FONTDIR=/usr/local/Trolltech/lib/fonts

          Please make sure that fonts directory is available in /usr/local/Trolltech/lib/, otherwise copy it from /ltib/ltib/rpm/BUILD/qt-everywhere-opensource-src-4.6.0  /lib/fonts to /usr/local/Trolltech/lib/.

          Then run your application as ./fluidlauncher -qws

Thanks,

Raybiztech.

0 Kudos
63 Views
tangyuan
Contributor III

HI:

     Raybiztech:

     i found the same problem with Roger.I can't find font directory /home/~/imx6_project3/ltib/rpm/BUILD/../../rootfs/usr/local..

     Above,you said:copy it from ltib/rpm/BUILD/qt-everywhere-opensource-src-4.6.0  /lib/fonts to /usr/local/Trolltech/lib/.

     I also cann't find it.

     Raybiztech,Please give me some advice

0 Kudos
63 Views
Raybiztech
Contributor V

Hi Vishvapathi,

                          we had successfully builded QT on IMX6 board using LTIB. And we are able to run QT applications. You can look into the following steps to build QT using LTIB.

Porting of Qt on i.MX6 board

Step1:

  • For porting qt on i.MX6 board you need ltib setup in your linux machine.
  • Download qt-open source 4.6.0.tar.gz from the below link.

http://pkgs.fedoraproject.org/repo/pkgs/qt/qt-everywhere-opensource-src-4.6.0.tar.gz/2a7b5126f2450d8...

  • and put the tar file in /opt/freescale/pkgs location.
  • Edit the spec file located in /ltib/dist/lfs-5.1/qt/qt-embedded.spec, according to the package version downloaded.

Step2:

  • cd to your ltib path
  • Type the following command to open ltib config

      $ ./ltib –m config

  • We get the following screen. Select the Packages option

file1.jpg

  •   Then select the qt-embedded option 

file2.jpg

  • Save the changes. Run the ltib by using the following command.

        $ ./ltib

  • This starts building qt-everywhere-opensource package.

Step3:

  • Flash the root file system which build with qt embedded on to the sdcard

ON THE IMX6 BOARD

-> Export the  fonts folder on i.MX6 board


Ex: export QT_QWS_FONTDIR=/usr/local/Trolltech/lib/fonts

Step4:

  • Run <your-qt-executable> with –qws option (qt windowing system).
      Ex: 
    ./<your-qt-executable> -qws

Thanks & Regards,

Raybiztech.

0 Kudos
63 Views
vishvapathi
Contributor V

Hi,

I downloaded 4.7.3 version and it started building... until i got the below error...

make[1]: *** Waiting for unfinished jobs....

In file included from ../../../../include/QtCore/qstring.h:1:0,

                 from ../../../../include/QtCore/../../src/corelib/kernel/qobject.h:48,

                 from ../../../../include/QtCore/qobject.h:1,

                 from ../../../../include/QtCore/../../src/corelib/io/qiodevice.h:46,

                 from ../../../../include/QtCore/qiodevice.h:1,

                 from ../../../../include/QtCore/../../src/corelib/io/qdatastream.h:46,

                 from ../../../../include/QtCore/qdatastream.h:1,

                 from ../../../../include/QtCore/QDataStream:1,

                 from ../JavaScriptCore/wtf/Vector.h:33,

                 from ../WebKit/qt/WebKit_pch.h:54:

../../../../include/QtCore/../../src/corelib/tools/qstring.h:187:17: note: the mangling of 'va_list' has changed in GCC 4.4

make[1]: Leaving directory `/home/vishva/Desktop/L3.0.35_4.0.0_130424_source/yes/ltib/rpm/BUILD/qt-everywhere-opensource-src-4.7.3/src/3rdparty/webkit/WebCore'

make: *** [sub-webkit-make_default-ordered] Error 2

error: Bad exit status from /home/vishva/Desktop/L3.0.35_4.0.0_130424_source/yes/ltib/tmp/rpm-tmp.69721 (%build)

RPM build errors:

    Bad exit status from /home/vishva/Desktop/L3.0.35_4.0.0_130424_source/yes/ltib/tmp/rpm-tmp.69721 (%build)

Build time for qt-embedded: 1668 seconds

Failed building qt-embedded

f_buildrpms() returned an error, exiting

traceback:

main:572

Started: Mon Oct 14 15:20:25 2013

Ended:   Mon Oct 14 15:49:13 2013

Elapsed: 1728 seconds

These packages failed to build:

qt-embedded

Build Failed

Exiting on error or interrupt

0 Kudos
63 Views
Raybiztech
Contributor V

Hi,

      

              I haven't tried with this 4.7.3 version because it may lead to more errors. Because what ever dependency packages builded before, used by QT must be updated for this 4.7.3 version. Better try with 4.6.0 if you are using LTIB. or else build 4.7.3 explicitly.

Thanks & regards,

Raybiztech.

0 Kudos
63 Views
vishvapathi
Contributor V

Hi,

I tried 4.6.0... but getting error in tht also...

collect2: ld returned 1 exit status

make[3]: *** [standarddialogs] Error 1

make[3]: Leaving directory `/home/vishva/Desktop/L3.0.35_4.0.0_130424_source/yes/ltib/rpm/BUILD/qt-everywhere-opensource-src-4.6.0/examples/dialogs/standarddialogs'

make[2]: *** [sub-standarddialogs-make_default] Error 2

make[2]: Leaving directory `/home/vishva/Desktop/L3.0.35_4.0.0_130424_source/yes/ltib/rpm/BUILD/qt-everywhere-opensource-src-4.6.0/examples/dialogs'

make[1]: *** [sub-dialogs-make_default] Error 2

make[1]: Leaving directory `/home/vishva/Desktop/L3.0.35_4.0.0_130424_source/yes/ltib/rpm/BUILD/qt-everywhere-opensource-src-4.6.0/examples'

make: *** [sub-examples-make_default-ordered] Error 2

error: Bad exit status from /home/vishva/Desktop/L3.0.35_4.0.0_130424_source/yes/ltib/tmp/rpm-tmp.23495 (%build)

RPM build errors:

    Bad exit status from /home/vishva/Desktop/L3.0.35_4.0.0_130424_source/yes/ltib/tmp/rpm-tmp.23495 (%build)

Build time for qt-embedded: 1253 seconds

Failed building qt-embedded

f_buildrpms() returned an error, exiting

traceback:

main:572

Started: Mon Oct 14 16:39:10 2013

Ended:   Mon Oct 14 17:01:21 2013

Elapsed: 1331 seconds

These packages failed to build:

qt-embedded

Build Failed

Exiting on error or interrupt

0 Kudos
63 Views
Raybiztech
Contributor V

Hi,

           

                can you please attach your entire log of QT building so that i can guide you to fix the errors.

Thanks & Regards,

Raybiztech.

0 Kudos
63 Views
fuyiwang
Contributor I

HI,

Thanks so much for the solution, I followed it:

./ltib -m prep -p qt-embedded.spec

./ltib -m scbuild -p qt-embedded.spec

./ltib -m scinstall -p qt-embedded.spec

./ltib -m scdeploy -p qt-embedded.spec

But when I run the second command: ./ltib -m scbuild -p qt-embedded.spec

Errors pop out:

make[3]: *** [broadcastsender] Error 1
make[3]: Leaving directory `/home/lab/imx28/ltib/rpm/BUILD/qt-everywhere-opensource-src-4.7.2/examples/network/broadcastsender'
make[2]: *** [sub-broadcastsender-make_default] Error 2
arm-none-linux-gnueabi-g++ -c -pipe -O2 -Wall -W -D_REENTRANT -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../../../mkspecs/qws/linux-g++-mx -I. -I../../../include/QtCore -I../../../include/QtNetwork -I../../../include/QtGui -I../../../include -I.moc/release-shared-emb-arm -I/home/lab/imx28/ltib/rootfs/usr/include -I/home/lab/imx28/ltib/rootfs/usr/include/glib-2.0 -I/home/lab/imx28/ltib/rootfs/usr/lib/glib-2.0/include -I/home/lab/imx28/ltib/rootfs/usr/include/gstreamer-0.10 -I/home/lab/imx28/ltib/rootfs/usr/include/libxml2 -I/home/lab/imx28/ltib/rootfs/usr/include/freetype2 -o .obj/release-shared-emb-arm/moc_window.o .moc/release-shared-emb-arm/moc_window.cpp
arm-none-linux-gnueabi-g++ -c -pipe -O2 -Wall -W -D_REENTRANT -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../../../mkspecs/qws/linux-g++-mx -I. -I../../../include/QtCore -I../../../include/QtNetwork -I../../../include/QtGui -I../../../include -I.moc/release-shared-emb-arm -I/home/lab/imx28/ltib/rootfs/usr/include -I/home/lab/imx28/ltib/rootfs/usr/include/glib-2.0 -I/home/lab/imx28/ltib/rootfs/usr/lib/glib-2.0/include -I/home/lab/imx28/ltib/rootfs/usr/include/gstreamer-0.10 -I/home/lab/imx28/ltib/rootfs/usr/include/libxml2 -I/home/lab/imx28/ltib/rootfs/usr/include/freetype2 -o .obj/release-shared-emb-arm/moc_movementtransition.o .moc/release-shared-emb-arm/moc_movementtransition.cpp
/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.6.2/../../../../arm-fsl-linux-gnueabi/bin/ld: warning: libpng.so.3, needed by /home/lab/imx28/ltib/rpm/BUILD/qt-everywhere-opensource-src-4.7.2/lib/libQtGui.so, not found (try using -rpath or -rpath-link)

collect2: ld returned 1 exit status
make[3]: *** [rogue] Error 1
make[3]: Leaving directory `/home/lab/imx28/ltib/rpm/BUILD/qt-everywhere-opensource-src-4.7.2/examples/statemachine/rogue'
make[2]: *** [sub-rogue-make_default] Error 2
make[2]: Leaving directory `/home/lab/imx28/ltib/rpm/BUILD/qt-everywhere-opensource-src-4.7.2/examples/statemachine'
make[1]: *** [sub-statemachine-make_default] Error 2
make[1]: Leaving directory `/home/lab/imx28/ltib/rpm/BUILD/qt-everywhere-opensource-src-4.7.2/examples'
make: *** [sub-examples-make_default-ordered] Error 2
error: Bad exit status from /home/lab/imx28/ltib/tmp/rpm-tmp.57756 (%build)


RPM build errors:
    Bad exit status from /home/lab/imx28/ltib/tmp/rpm-tmp.57756 (%build)
Build time for qt-embedded: 154 seconds

Failed building qt-embedded


f_scbuild() returned an error, exiting
traceback:
main:572

Exiting on error or interrupt

Could you please help me out? Thanks!

Best regards

0 Kudos
63 Views
vishvapathi
Contributor V

Hi,

I tried

./ltib -m prep -p qt-embedded.spec

./ltib -m scbuild -p <package name>

-> ./ltib -m scinstall -p <packagename>

-> ./ltib -m scdeploy -p <packagename>

Processing: qt-embedded

=========================

Build path taken because: directory build, build key set, no prebuilt rpm,

rpmbuild --dbpath /home/vishva/Desktop/L3.0.35_4.0.0_130424_source/yes/ltib/rootfs//var/lib/rpm --target arm --define '_unpackaged_files_terminate_build 0' --define '_target_cpu arm' --define '__strip strip' --define '_topdir /home/vishva/Desktop/L3.0.35_4.0.0_130424_source/yes/ltib/rpm' --define '_prefix /usr' --define '_tmppath /home/vishva/Desktop/L3.0.35_4.0.0_130424_source/yes/ltib/tmp' --define '_rpmdir /home/vishva/Desktop/L3.0.35_4.0.0_130424_source/yes/ltib/rpm/RPMS'  --define '_mandir /usr/share/man' --define '_sysconfdir /etc' --define '_localstatedir /var' -bb --clean --rmsource  /home/vishva/Desktop/L3.0.35_4.0.0_130424_source/yes/ltib/rpm/SPECS/qt-embedded.spec

Building target platforms: arm

Building for target arm

Executing(%prep): /bin/sh -e /home/vishva/Desktop/L3.0.35_4.0.0_130424_source/yes/ltib/tmp/rpm-tmp.88932

+ umask 022

+ cd /home/vishva/Desktop/L3.0.35_4.0.0_130424_source/yes/ltib/rpm/BUILD

+ exit 0

Executing(%build): /bin/sh -e /home/vishva/Desktop/L3.0.35_4.0.0_130424_source/yes/ltib/tmp/rpm-tmp.88932

+ umask 022

+ cd /home/vishva/Desktop/L3.0.35_4.0.0_130424_source/yes/ltib/rpm/BUILD

+ exit 0

Executing(%install): /bin/sh -e /home/vishva/Desktop/L3.0.35_4.0.0_130424_source/yes/ltib/tmp/rpm-tmp.88932

+ umask 022

+ cd /home/vishva/Desktop/L3.0.35_4.0.0_130424_source/yes/ltib/rpm/BUILD

Processing files: qt-everywhere-opensource-src-4.6.0-1

PreReq: rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1

Requires(rpmlib): rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1

Wrote: /home/vishva/Desktop/L3.0.35_4.0.0_130424_source/yes/ltib/rpm/RPMS/arm/qt-everywhere-opensource-src-4.6.0-1.arm.rpm

Executing(%clean): /bin/sh -e /home/vishva/Desktop/L3.0.35_4.0.0_130424_source/yes/ltib/tmp/rpm-tmp.34508

+ umask 022

+ cd /home/vishva/Desktop/L3.0.35_4.0.0_130424_source/yes/ltib/rpm/BUILD

+ rm -rf /home/vishva/Desktop/L3.0.35_4.0.0_130424_source/yes/ltib/tmp/qt-everywhere-opensource-src

+ exit 0

Executing(--clean): /bin/sh -e /home/vishva/Desktop/L3.0.35_4.0.0_130424_source/yes/ltib/tmp/rpm-tmp.34508

+ umask 022

+ cd /home/vishva/Desktop/L3.0.35_4.0.0_130424_source/yes/ltib/rpm/BUILD

+ exit 0

Build time for qt-embedded: 33 seconds

sudo /opt/freescale/ltib/usr/bin/rpm --root /home/vishva/Desktop/L3.0.35_4.0.0_130424_source/yes/ltib/rootfs --dbpath /var/lib/rpm -e --allmatches --nodeps --define '_tmppath /tmp/ltib' qt-everywhere-opensource-src 2>/dev/null

[sudo] password for vishva:

sudo /opt/freescale/ltib/usr/bin/rpm --root /home/vishva/Desktop/L3.0.35_4.0.0_130424_source/yes/ltib/rootfs --dbpath /var/lib/rpm --prefix / --ignorearch -ivh --force --excludedocs --define '_tmppath /tmp/ltib' /home/vishva/Desktop/L3.0.35_4.0.0_130424_source/yes/ltib/rpm/RPMS/arm/qt-everywhere-opensource-src-4.6.0-1.arm.rpm

error: failed to stat /home/vishva/.gvfs: Permission denied

Preparing...                ########################################### [100%]

   1:qt-everywhere-opensourc########################################### [100%]

Processing deployment operations

==================================

making filesystem image file

staging directory is /home/vishva/Desktop/L3.0.35_4.0.0_130424_source/yes/ltib/rootfs.tmp

removing the boot directory and files

removing man files and directories

removing info files

removing /usr/share/locale directory

removing /usr/man directory

removing /usr/lib/fonts directory

removing static libraries

removing target rpm database

stripping binaries and libraries

WARN: /home/vishva/Desktop/L3.0.35_4.0.0_130424_source/yes/ltib/rootfs.tmp/usr/bin/perf statically linked

Filesystem stats, including padding:

    Total size            = 685520k

    Total number of files = 29834

0 Kudos
63 Views
vishvapathi
Contributor V

Thanks for your support

DaianeAngolini

Raybiztech

63 Views
vishvapathi
Contributor V

Hi,

  Thanks for your response. I downloaded the setup and moved it to /freescale/pkgs. But wen i compile the ltib is looking for setup in web, instead of pkgs folder.

%define pfx /opt/freescale/rootfs/%{_target_cpu}

Summary         : Qt

Name            : qt-everywhere-opensource-src

Version         : 4.6.0

Release         : 0

License         : GNU GPL

Vendor          : Freescale

Packager        : Rogerio Pimentel

Group           : System Environment/Libraries

Source          : %{name}-%{version}.tar.gz

BuildRoot       : %{_tmppath}/%{name}

Prefix          : %{pfx}

URL             : http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.6.0.tar.gz

Do i have to make any modification in qtembedded.spec file to look for source in pkgs folder????

0 Kudos
64 Views
Raybiztech
Contributor V

Hi Vishvapathi,

                  Please make sure that, the " Name " and " Version " fields in the spec file matches exactly with the package copied into your /opt/freescale/pkgs/ and try building the package again using " ./ltib ". If still its looking for setup in web. you can build the package by following the below steps :

-> ./ltib -m prep -p qt-everywhere-opensource.spec (mention the same name as in the spec file)

-> ./ltib -m scbuild -p <packagename>

-> ./ltib -m scinstall -p <packagename>

-> ./ltib -m scdeploy -p <packagename>

Thanks & Regards,

Raybiztech.

View solution in original post

0 Kudos
63 Views
vishvapathi
Contributor V

Hi,

I am getting the same issue for prep process also...

./ltib -m prep -p qt-embedded.spec

Processing: qt-embedded

=========================

Build path taken because: build key set, no prebuilt rpm,

Testing network connectivity

OK GPP:

Try qt-everywhere-opensource-src-4.6.0.tar.gz.md5 from the GPP

http://bitshrine.org/gpp/qt-everywhere-opensource-src-4.6.0.tar.gz.md5:

14:37:04 ERROR 404: Not Found.

Try qt-everywhere-opensource-src-4.6.0.tar.gz from the GPP

http://bitshrine.org/gpp/qt-everywhere-opensource-src-4.6.0.tar.gz:

14:37:09 ERROR 404: Not Found.

Can't get: qt-everywhere-opensource-src-4.6.0.tar.gz at ./ltib line 802.

f_prep() returned an error, exiting

traceback:

main:572

Exiting on error or interrupt

0 Kudos
63 Views
Raybiztech
Contributor V

Hi Vishvapathi,

     

                                LTIB will search for the package in the LPP if it is found, it will proceed with prep or else it will fetch the package from GPP. And the GPP url mentioned in the spec file is not valid. so it can't able to fetch the package. And extension of the package its searching is " .tar.gz " so make sure your package in LPP is named exactly with same extension as " qt-everywhere-opensource-src-4.6.0.tar.gz ". Download the package from the below mentioned site and copy it into /opt/freescale/pkgs.

Index of /repo/pkgs/qt/qt-everywhere-opensource-src-4.6.0.tar.gz/2a7b5126f2450d8525af355fc4c12ad6

Thanks & Regards,

Raybiztech.

0 Kudos
63 Views
daiane_angolini
NXP Employee
NXP Employee

I´m here. But I have no idea about QT stuff....

I´m sorry not being able to help you on this :smileysad:

0 Kudos