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. Not all lib files got statically built
Forum Updated to NodeBB v4.3 + New Features

Not all lib files got statically built

Scheduled Pinned Locked Moved Solved Installation and Deployment
7 Posts 2 Posters 1.7k Views 2 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.
  • S Offline
    S Offline
    Shpacuh
    wrote on last edited by
    #1

    I have a fresh download of Qt 5.9.1, and I downloaded the sources too. I haven't done anything to Qt before I followed the steps from the help pages that simply say:
    -go to the source folder
    -run /configure -static -prefix /path/to/Qt
    -then make
    and that should give me statically built libraries. After doing all that I started up my project in qtCreator, added CONFIG += static and QMAKE_LFLAGS += -static -Wl,-verbose to get a static build of my program.

    The linker couldn't find stuff like libQt5Designer.a, libQt5Gui.a and so on. I went back to my Qt installation folder and saw that only some of the libraries have had their static counterparts built. After that I saw somewhere that running
    ./configure -developer-build -opensource -nomake examples -nomake tests -static -prefix /path/to/Qt and making them might help, but static libraries are still missing.

    How do I build them?

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

      Hi,

      Don't use the -developer-build option unless you are hacking on Qt itself.

      Maybe a silly question but did you add your custom Qt build to the Build and Run panel in Qt Creator's option ? Did you create a kit for it ? Are you using that kit ?

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

      S 2 Replies Last reply
      0
      • SGaistS SGaist

        Hi,

        Don't use the -developer-build option unless you are hacking on Qt itself.

        Maybe a silly question but did you add your custom Qt build to the Build and Run panel in Qt Creator's option ? Did you create a kit for it ? Are you using that kit ?

        S Offline
        S Offline
        Shpacuh
        wrote on last edited by
        #3

        @SGaist
        So should I build Qt statically again, only this time with these configure options:
        ./configure -static -prefix /path/to/Qt

        Also, I haven't fiddled with kits or anything. I had Qt 5.7 on my system, so I decided to freshly download 5.9 and build it from source. QtCreator itself detected and switched to 5.9 for building. I'm no Qt expert, but I think that the kit might not be the problem since I'm missing actual static libraries.

        Could have this something to do with the fact that I set up the -prefix /path/to/Qt, the same path 5.9 was downloaded?

        1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          Don't use the -developer-build option unless you are hacking on Qt itself.

          Maybe a silly question but did you add your custom Qt build to the Build and Run panel in Qt Creator's option ? Did you create a kit for it ? Are you using that kit ?

          S Offline
          S Offline
          Shpacuh
          wrote on last edited by
          #4

          @SGaist

          Also I need to add, once I noticed that some static libraries are missing, and before changing anything to the configuration I ran make again just in case and it reported that all targets have been made and that there is no work to be done. Could it be that not all libraries were in the list of targets in the make file? Is there some configuration option just to generate the libraries?

          1 Reply Last reply
          0
          • S Offline
            S Offline
            Shpacuh
            wrote on last edited by
            #5

            I did a make clean, configured it like this
            ./configure -nomake examples -nomake tests -make libs -static -prefix /mnt/data/Qt5.9.1-static

            and this time I did a make install, and well enough all the libraries are in /mnt/data/Qt5.9.1-static/lib. Also, this time I manually chose the kit at the prefix location to be my qt builder.

            But now I have another problem. The Designer plugin isn't among the statically built plugins. Last time I solved the problem of missing libs by installing Qt since it appears they were scattered through the directories, but I don't know what to do about this problem.

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

              Are you using Qt Creator to write your application ?

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

              S 1 Reply Last reply
              0
              • SGaistS SGaist

                Are you using Qt Creator to write your application ?

                S Offline
                S Offline
                Shpacuh
                wrote on last edited by
                #7

                @SGaist Yes I am.

                I'm considering to mark the topic as solved because I figured out why it only SEEMED that not all libraries are being statically compiled, it's because :

                1. The first time I built them I set the prefix to the same folder an already installed Qt was, making them scattered across the various subdirectories
                2. When I set the -prefix flag the next time to another location I forgot to run the make install step

                So after fixing those two mistakes I had my statically built Qt up and running. As for the Designer plugin not being statically built that's not a problem anymore because I actually didn't need it. My current problems are far out of the reach the original topic, so if need be Ill open another thread at a later time.

                Thanks for the help anyways.

                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