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. [Solved] cc1plus: error: unrecognized command line option “-m64″ in Qt4.6.3
QtWS25 Last Chance

[Solved] cc1plus: error: unrecognized command line option “-m64″ in Qt4.6.3

Scheduled Pinned Locked Moved Mobile and Embedded
15 Posts 3 Posters 37.8k Views
  • 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.
  • M Offline
    M Offline
    mostafanfs
    wrote on 29 Aug 2014, 08:57 last edited by
    #1

    Hi
    I tried to compile qt-everywhere-opensource-src-4.6.3 for Embedded Linux and after modifying proper qmake.conf and running below command:
    @
    $./configure -embedded arm -xplatform qws/linux-arm-g++ -prefix /usr/local/Qt -qt-mouse-tslib -little-endian -no-webkit -no-qt3support -no-cups -no-largefile -optimized-qmake -no-openssl -nomake tools -qt-sql-sqlite -no-3dnow -system-zlib -qt-gif -qt-libtiff -qt-libpng -qt-libmng -qt-libjpeg -no-opengl -gtkstyle -no-openvg -no-xshape -no-xsync -no-xrandr -qt-freetype -qt-gfx-linuxfb -qt-kbd-tty -qt-kbd-linuxinput -qt-mouse-tslib -qt-mouse-linuxinput
    @

    I got this error:
    @
    .
    .
    .
    Do you accept the terms of either license? y

    Creating qmake. Please wait…
    arm-none-linux-gnueabi-g++ -c -o project.o -m64 -pipe -DQMAKE_OPENSOURCE_EDITION -O0 -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -I/usr/local/qt-everywhere-opensource-src-4.6.3/include -I/usr/local/qt-everywhere-opensource-src-4.6.3/include/QtCore -I/usr/local/qt-everywhere-opensource-src-4.6.3/src/corelib/global -I/usr/local/qt-everywhere-opensource-src-4.6.3/src/corelib/xml -I/usr/local/qt-everywhere-opensource-src-4.6.3/tools/shared -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/usr/local/qt-everywhere-opensource-src-4.6.3/mkspecs/linux-g++-64 -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT project.cpp
    cc1plus: error: unrecognized command line option “-m64″
    make: *** [project.o] Error 1
    @
    I have Ubuntu 14.04 64bit operating system. Does that have anything to do with this error?
    Because there are other people who have done this without getting any errors (especially with older versions of Ubuntu I think)

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 29 Aug 2014, 21:53 last edited by
      #2

      Hi,

      It looks like you are using the cross-compiler to build qmake which is wrong.

      Can you show what you modified ?

      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
      • M Offline
        M Offline
        mostafanfs
        wrote on 30 Aug 2014, 04:02 last edited by
        #3

        Thank you for your answer
        I went exactly through the following link :
        http://importgeek.wordpress.com/2012/04/09/compiling-qt-and-tslib-for-mini2440-and-run-a-demo-app/

        That is why I believe that it has worked for other people!

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 30 Aug 2014, 11:51 last edited by
          #4

          It looks correct but still, there's something that makes the build of qmake use your cross-compiler rather than your system's compiler.

          Did you play with any environment variable ? Modified other files in Qt's tree ?

          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
          • M Offline
            M Offline
            mostafanfs
            wrote on 30 Aug 2014, 15:09 last edited by
            #5

            I don't get it. I thought qmake considering the changes that we made in qmake.conf should use cross-compiler instead of system's compiler. By the way what do you mean by system's compiler? DO you mean included gcc in Ubuntu?

            I didn't play with Qt's tree or any other things related to Qt cause I always delete the old files and extract a new Qt4.6.3 when I want to config and make it. But I cant say the same thing about environment variable. Although I don't remember playing with them.
            Where should I look for those changes that you believed I've made in environment variable

            You know what? I will try to install a new Ubuntu in VirtualBox in another computer and do all things again and I will get back to you here.
            Although I should tell you that my current Ubuntu is in VirtualBox too but I don't think that makes a difference.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 30 Aug 2014, 21:25 last edited by
              #6

              Yes you need to have at least the build-essentials (or something like that) package installed in Ubuntu.

              At this stage, qmake doesn't exist yet since it's currently building.

              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
              • G Offline
                G Offline
                Gianluca
                wrote on 31 Aug 2014, 14:49 last edited by
                #7

                I think there is a bit of confusion in your intention.
                Please, explain better what you want to achieve.
                Because the link you are posted regards how to compile Qt for this board:

                http://www.friendlyarm.net/products/mini2440

                That board mount a 32bit ARM cpu, and this means that it simply does not support any 64bit operation. That's why you get error for "-m64", because that flags simply should not be there.
                And for compiling Qt for an ARM cpu you MUST use a cross-compiler has you did.
                So, if your intention is to build Qt for an ARM board, then SGaist is wrong !
                And it's correct that you are using cross-compiler ... and the fact that are you using Ubuntu or other linux system does not count.

                In this case, the problem come out because some configuration file or environment variable insert the '-m64' flag that should not be used for cross-compiling on ARM devices that does not support 64bit mode.

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  mostafanfs
                  wrote on 31 Aug 2014, 17:40 last edited by
                  #8

                  Thank you
                  Yeah I know that it doesn't support 64bit architecture and I'm not gonna do so.
                  I simply did what other people have done for their board according to that link and its descriptions and it's pretty simple and a routine job but I don't know why I keep hitting the wall.
                  Again I want to compile Qt for this board.
                  I don't know where does this ‘-m64’ flag come from.

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    Gianluca
                    wrote on 31 Aug 2014, 19:24 last edited by
                    #9

                    Probably the "-m64" it's added by some default configuration of the Ubuntu.
                    You can try to search on the file if it has been setter somewhere.
                    If you look at qmake.conf it includes:
                    @
                    include(../../common/g++.conf)
                    include(../../common/linux.conf)
                    include(../../common/qws.conf)
                    @

                    Maybe one of them add "-m64" flags.

                    Otherwise, if you don't bother to re-install Ubuntu, you can try to install a 32bit linux and repeat the process.
                    Maybe, if the host is 64bit the system for some reason add "-m64" flag.

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      mostafanfs
                      wrote on 31 Aug 2014, 19:52 last edited by
                      #10

                      Thank you
                      Yeah I kind of figured that out that it's Ubuntu's fault since it seems I'm the only one who has this problem. It's just I'm waiting for a good time to re-install Ubuntu but now that you said 32bit so I'm gonna go with 32bit!
                      I'll get back to you
                      Thanks again

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on 31 Aug 2014, 20:52 last edited by
                        #11

                        @Gianluca where am I wrong ? You still need a host compiler to build tools like qmake.

                        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
                        • M Offline
                          M Offline
                          mostafanfs
                          wrote on 1 Sept 2014, 17:39 last edited by
                          #12

                          Hi guys
                          I finally managed to compile Qt4.6.3 . It was all Ubuntu 64 bit fault. I installed a 32 bit version of Ubuntu and it worked pretty much fine. I cant believe this. I spent couple of weeks dealing with this problem :-(
                          Anyway thank you guys

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on 1 Sept 2014, 20:20 last edited by
                            #13

                            Glad you found out, but still it's pretty strange that you couldn't build it properly on a 64 bit. At the same time 4.6.3 is pretty old… If possible, you should consider at least using 4.8.6.

                            In the mean time, since you successfully built Qt, 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
                            • M Offline
                              M Offline
                              mostafanfs
                              wrote on 1 Sept 2014, 20:52 last edited by
                              #14

                              Actually this board only supports Qt up to 4.6.3 and it does not work with newer version of Qt4
                              I was aware of the Solved thing. It's just Is there a button or something to mark as Solved
                              By the way now I'm having another problem that QtCreator does not recognize qmake completely and I will discuss it in another topic. Thank you

                              1 Reply Last reply
                              0
                              • S Offline
                                S Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on 1 Sept 2014, 22:28 last edited by
                                #15

                                There's no button, you have to edit your original post and modify the title by hand

                                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

                                7/15

                                31 Aug 2014, 14:49

                                • Login

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