Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Errors ( like qmake: Syntax error: word unexpected (expecting ")") ) occur when configuring Qt environment.
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Mobile and Embedded
11 Posts 3 Posters 7.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    netadi
    wrote on 6 Jan 2015, 07:23 last edited by
    #1

    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.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 6 Jan 2015, 08:04 last edited by
      #2

      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

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dheerendra
        Qt Champions 2022
        wrote on 6 Jan 2015, 17:05 last edited by
        #3

        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.

        Dheerendra
        @Community Service
        Certified Qt Specialist
        http://www.pthinks.com

        1 Reply Last reply
        0
        • N Offline
          N Offline
          netadi
          wrote on 7 Jan 2015, 08:01 last edited by
          #4

          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...

          1 Reply Last reply
          0
          • N Offline
            N Offline
            netadi
            wrote on 7 Jan 2015, 08:43 last edited by
            #5

            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.

            1 Reply Last reply
            0
            • N Offline
              N Offline
              netadi
              wrote on 7 Jan 2015, 11:46 last edited by
              #6

              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?

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 7 Jan 2015, 23:26 last edited by
                #7

                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@

                ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • N Offline
                  N Offline
                  netadi
                  wrote on 22 Jan 2015, 02:47 last edited by
                  #8

                  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!

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on 23 Jan 2015, 00:01 last edited by
                    #9

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

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0
                    • N Offline
                      N Offline
                      netadi
                      wrote on 23 Jan 2015, 03:37 last edited by
                      #10

                      Thanks for your support anywayz!

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on 23 Jan 2015, 23:04 last edited by
                        #11

                        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 :)

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved