Errors ( like qmake: Syntax error: word unexpected (expecting ")") ) occur when configuring Qt environment.



  • Hello.

    I am trying to cross-compile Qt4.8.6 for embedded linux system on Zynq (Coretex-A9) of ZedBoard.
    My development environment is :
    PC : Ubuntu 12.4
    Toolchain : Xilinx SDK (2014.3.1)
    Qt version : qt-everywhere-opensource-src-4.8.6

    When configuring (as the first step for Qt build) with qmake, the following errors are occurred.
    It looks it occurs on configuration test phase.
    Of course I have already set arm-toolchain PATH and qmake.conf and the environment variables.
    At the first time, I could configure, make and make install, then library was built correctly (it worked). However after that, I might changed setting or something, the following errors became to occur.
    How should I eliminate the errors?


    ida@dd102726-02:~/Qt/build/qt-everywhere-opensource-src-4.8.6$ ./configure -embedded arm -xplatform qws/linux-arm-gnueabi-g++ -little-endian -opensource -host-little-endian -confirm-license -nomake demos -nomake examples -prefix $ZYNQ_QT_INSTALL

    This is the Qt for Embedded Linux Open Source Edition.

    You are licensed to use this software under the terms of
    the Lesser GNU General Public License (LGPL) versions 2.1.
    You are also licensed to use this software under the terms of
    the GNU General Public License (GPL) versions 3.

    You have already accepted the terms of the license.

    Creating qmake. Please wait...
    make: `first' に対して行うべき事はありません.

    You have not explicitly asked to use pkg-config and are cross-compiling.
    pkg-config will not be used to automatically query cflag/lib parameters for
    dependencies

    /home/ida/Qt/build/qt-everywhere-opensource-src-4.8.6/bin/qmake: 1: /home/ida/Qt/build/qt-everywhere-opensource-src-4.8.6/bin/qmake: Syntax error: word unexpected (expecting ")")
    /home/ida/Qt/build/qt-everywhere-opensource-src-4.8.6/bin/qmake: 1: /home/ida/Qt/build/qt-everywhere-opensource-src-4.8.6/bin/qmake: Syntax error: word unexpected (expecting ")")
    /home/ida/Qt/build/qt-everywhere-opensource-src-4.8.6/bin/qmake: 1: /home/ida/Qt/build/qt-everywhere-opensource-src-4.8.6/bin/qmake: Syntax error: word unexpected (expecting ")")
    /home/ida/Qt/build/qt-everywhere-opensource-src-4.8.6/bin/qmake: 1: /home/ida/Qt/build/qt-everywhere-opensource-src-4.8.6/bin/qmake: Syntax error: word unexpected (expecting ")")
    /home/ida/Qt/build/qt-everywhere-opensource-src-4.8.6/bin/qmake: 1: /home/ida/Qt/build/qt-everywhere-opensource-src-4.8.6/bin/qmake: Syntax error: word unexpected (expecting ")")
    /home/ida/Qt/build/qt-everywhere-opensource-src-4.8.6/bin/qmake: 1: /home/ida/Qt/build/qt-everywhere-opensource-src-4.8.6/bin/qmake: Syntax error: word unexpected (expecting ")")
    /home/ida/Qt/build/qt-everywhere-opensource-src-4.8.6/bin/qmake: 1: /home/ida/Qt/build/qt-everywhere-opensource-src-4.8.6/bin/qmake: Syntax error: word unexpected (expecting ")")
    :
    :

    < same messages hereafter>

    Regards.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    While this error doesn't ring a bell, I just wanted to check if I understood you correctly: are you calling configure again in an already built Qt source tree ? If so, that's wrong. You have to first call make confclean.
    In any case I'd recommend doing an out of source build, so if something goes wrong or you want to test several configuration you can simply nuke the current build and start from a clean state.

    Hope it helps



  • This could be because of extracting of source code. You might have extracted <source>.zip just by right click and extract. Instead of try extracting using unzip -a <source>.zip. This should fix the issue.



  • SGaist
    Thanks for your reply.
    That is 50% correct, the build was the second try and Qt source tree exists.
    However I tried again, as another user to build from a scratch, downloading Qt source code and unzip to other directory, (I think this is clean environment) and then configuring. The result was the same.
    Besides, though I'd like to try make confclean just in case, there's no Makefile any longer. Thus I couldn't make confclean...



  • Dheerendra
    Thanks for your reply.
    I just want make sure, my source codes is qt-everywhtere-opensource-src-4.8.6.tar.gz
    I extracted it by
    tar -xcvf qt-everywhtere-opensource-src-4.8.6.tar.gz
    on command line.

    How to do "<source>.zip just by right click and extract." ?
    Please let me know the detail of that.
    I'm now being confused...

    Thanks.



  • I am checking error log now...

    /home/ida/Qt/build/qt-everywhere-opensource-src-4.8.6/bin/qmake

    This qmake is ELF 32-bit LSB executable, for ARM CPU.
    Is this ok?
    I think that /usr/bin/qmake (for x86-64 CPU) should be used for checking...
    If so, how can I do to configure?


  • Lifetime Qt Champion

    Since your source code is already the tar.gz you should be safe.
    The qmake built with your cross-compiled Qt should be for the same architecture as your host since it's a host tool. So there's something fishy going on.

    Can you try with:
    @/configure -embedded arm -opensource -confirm-license -nomake demos -nomake examples -prefix $ZYNQ_QT_INSTALL@

    ?



  • I also installed Qt desktop version and had been changed the environment variables and PATH for the desktop setting. Thus these kind of errors are due to this.
    Now I changed variables and PATH. It works!


  • Lifetime Qt Champion

    Watch out, fiddling with PATH can be hazardous especially when you are using several version of Qt while developing



  • Thanks for your support anywayz!


  • Lifetime Qt Champion

    You're welcome !

    Since you have it up and running now, please update the thread title prepending [solved] so other forum users may know a solution has been found :)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.