Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Cannot run make
Forum Updated to NodeBB v4.3 + New Features

Cannot run make

Scheduled Pinned Locked Moved Solved Installation and Deployment
12 Posts 4 Posters 4.4k 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.
  • L Offline
    L Offline
    laetis
    wrote on last edited by
    #1

    Hello,

    I have been using Qtcreator for a while without problem. However I haven't create new project since a while. Today I wanted to create a c++ library. So I created the project and tried to compile it (just like it's created without wriote anything yet), I got the error:
    /usr/bin/ld: cannot find -lQt5Sql
    /usr/bin/ld: cannot find -lQt5Core
    collect2: error: ld returned 1 exit status
    I went to the directory where the make file is created and ran make. Same error.
    make
    rm -f libproperties.so.1.0.0 libproperties.so libproperties.so.1 libproperties.so.1.0
    g++ -m32 -shared -Wl,-soname,libproperties.so.1 -o libproperties.so.1.0.0 properties.o -lQt5Sql -lQt5Core -lpthread
    /usr/bin/ld: cannot find -lQt5Sql
    /usr/bin/ld: cannot find -lQt5Core
    collect2: error: ld returned 1 exit status
    Makefile:142: recipe for target 'libproperties.so.1.0.0' failed
    make: *** [libproperties.so.1.0.0] Error 1

    I went to the building dir of a previous project and ran make there to see if there is any differences and noticed the call to Qt libraries is different:
    g++ -m32 -o get_properties main.o set_properties.o -isystem /usr/include/x86_64-linux-gnu/qt5/Qt5Sql -isystem /usr/include/x86_64-linux-gnu/qt5/Qt5Core -lpthread

    If instead of run make I ran directly the h++ line with the "previous" path it works.
    g++ -m32 -shared -Wl,-soname,libproperties.so.1 -o libproperties.so.1.0.0 properties.o -isystem /usr/include/x86_64-linux-gnu/qt5/Qt5Sql -isystem /usr/include/x86_64-linux-gnu/qt5/Qt5Core -lpthread

    so I understand something is wrong in the "new" makefile. But I don't now how qtcreator manage it.

    Any help?

    Thanks

    aha_1980A 1 Reply Last reply
    0
    • L laetis

      Hello,

      I have been using Qtcreator for a while without problem. However I haven't create new project since a while. Today I wanted to create a c++ library. So I created the project and tried to compile it (just like it's created without wriote anything yet), I got the error:
      /usr/bin/ld: cannot find -lQt5Sql
      /usr/bin/ld: cannot find -lQt5Core
      collect2: error: ld returned 1 exit status
      I went to the directory where the make file is created and ran make. Same error.
      make
      rm -f libproperties.so.1.0.0 libproperties.so libproperties.so.1 libproperties.so.1.0
      g++ -m32 -shared -Wl,-soname,libproperties.so.1 -o libproperties.so.1.0.0 properties.o -lQt5Sql -lQt5Core -lpthread
      /usr/bin/ld: cannot find -lQt5Sql
      /usr/bin/ld: cannot find -lQt5Core
      collect2: error: ld returned 1 exit status
      Makefile:142: recipe for target 'libproperties.so.1.0.0' failed
      make: *** [libproperties.so.1.0.0] Error 1

      I went to the building dir of a previous project and ran make there to see if there is any differences and noticed the call to Qt libraries is different:
      g++ -m32 -o get_properties main.o set_properties.o -isystem /usr/include/x86_64-linux-gnu/qt5/Qt5Sql -isystem /usr/include/x86_64-linux-gnu/qt5/Qt5Core -lpthread

      If instead of run make I ran directly the h++ line with the "previous" path it works.
      g++ -m32 -shared -Wl,-soname,libproperties.so.1 -o libproperties.so.1.0.0 properties.o -isystem /usr/include/x86_64-linux-gnu/qt5/Qt5Sql -isystem /usr/include/x86_64-linux-gnu/qt5/Qt5Core -lpthread

      so I understand something is wrong in the "new" makefile. But I don't now how qtcreator manage it.

      Any help?

      Thanks

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi @laetis,

      I guess you use QMake to build your projects? So qmake creates the Makefile and then make builds your program.

      You have already investigated a lot, and from your information I'd say the Kit (combination of Compiler, Qt version and Debugger) you use to build your library is corrupted.

      When you first create a project, a projects settings screen should appear. You can get it later by clicking the Projects icon at the left bar or pressing Ctrl+5.

      Maybe you can post a picture what you see there? This should give a hint what's going on.

      Qt has to stay free or it will die.

      L 1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        Might be a silly question but did you install the Qt dev packages from your distribution ?

        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
        • aha_1980A aha_1980

          Hi @laetis,

          I guess you use QMake to build your projects? So qmake creates the Makefile and then make builds your program.

          You have already investigated a lot, and from your information I'd say the Kit (combination of Compiler, Qt version and Debugger) you use to build your library is corrupted.

          When you first create a project, a projects settings screen should appear. You can get it later by clicking the Projects icon at the left bar or pressing Ctrl+5.

          Maybe you can post a picture what you see there? This should give a hint what's going on.

          L Offline
          L Offline
          laetis
          wrote on last edited by
          #4

          @aha_1980
          Hi,
          I looked in projects part and indeed the qmake path is different:
          qmake: qmake test.pro -r -spec linux-g++-32 CONFIG+=debug for the not working
          qmake: qmake ChemAliveMolOpt2_0.pro -r -spec linux-g++-64 CONFIG+=debug for the working.
          How can I change that?

          aha_1980A 1 Reply Last reply
          0
          • L laetis

            @aha_1980
            Hi,
            I looked in projects part and indeed the qmake path is different:
            qmake: qmake test.pro -r -spec linux-g++-32 CONFIG+=debug for the not working
            qmake: qmake ChemAliveMolOpt2_0.pro -r -spec linux-g++-64 CONFIG+=debug for the working.
            How can I change that?

            aha_1980A Offline
            aha_1980A Offline
            aha_1980
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi @laetis,

            Repeating myself:

            When you first create a project, a projects settings screen should appear. You can get it later by clicking the Projects icon at the left bar or pressing Ctrl+5.

            Maybe you can post a picture what you see there? This should give a hint what's going on.

            Qt has to stay free or it will die.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Do you have a 32bit version of Qt installed ?

              From the looks of it, you are trying to build a 32bit application on a 64bit Linux installation.

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

              L 1 Reply Last reply
              0
              • SGaistS SGaist

                Do you have a 32bit version of Qt installed ?

                From the looks of it, you are trying to build a 32bit application on a 64bit Linux installation.

                L Offline
                L Offline
                laetis
                wrote on last edited by
                #7

                @SGaist
                Indeed I have a 64bit installation not a 32. What I don't know is how to tell Qtcreator to not try do a 32bit app...

                jsulmJ 1 Reply Last reply
                0
                • L laetis

                  @SGaist
                  Indeed I have a 64bit installation not a 32. What I don't know is how to tell Qtcreator to not try do a 32bit app...

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @laetis said in Cannot run make:

                  What I don't know is how to tell Qtcreator to not try do a 32bit app

                  Select your 64bit Kit

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  L 1 Reply Last reply
                  2
                  • jsulmJ jsulm

                    @laetis said in Cannot run make:

                    What I don't know is how to tell Qtcreator to not try do a 32bit app

                    Select your 64bit Kit

                    L Offline
                    L Offline
                    laetis
                    wrote on last edited by
                    #9

                    @jsulm Found it. thanks! Works fine now.

                    aha_1980A 1 Reply Last reply
                    1
                    • L laetis

                      @jsulm Found it. thanks! Works fine now.

                      aha_1980A Offline
                      aha_1980A Offline
                      aha_1980
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      @laetis Ok, then please mark this thread as solved.

                      Thanks.

                      Qt has to stay free or it will die.

                      L 1 Reply Last reply
                      0
                      • aha_1980A aha_1980

                        @laetis Ok, then please mark this thread as solved.

                        Thanks.

                        L Offline
                        L Offline
                        laetis
                        wrote on last edited by
                        #11

                        @aha_1980 how?

                        1 Reply Last reply
                        0
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          The "Topic Tools" button.

                          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