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
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Mobile and Embedded
15 Posts 3 Posters 38.0k 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on 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 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
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on 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 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
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on 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
            • GianlucaG Offline
              GianlucaG Offline
              Gianluca
              wrote on 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 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
                • GianlucaG Offline
                  GianlucaG Offline
                  Gianluca
                  wrote on 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 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
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 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 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
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on 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 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
                            • SGaistS Offline
                              SGaistS Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on 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

                              • Login

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