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. Howto build QT5.10.0 static on MAC
Forum Updated to NodeBB v4.3 + New Features

Howto build QT5.10.0 static on MAC

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
16 Posts 4 Posters 6.5k 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.
  • T Offline
    T Offline
    Tommy Tom
    wrote on last edited by
    #6

    @Tommy-Tom said in Howto build QT5.10.0 static on MAC:

    ./configure --recheck-all --prefix=~/QT-static -static -release -nomake examples -nomake tests

    after adding -nomake tools compiling works.
    after make install and moving it to the right position it still cannot activate this kit somehow...
    once i start the creator the following appears

    Performing API discovery ...
    C and C++ compiler paths differ. C compiler may not work.
    C and C++ compiler paths differ. C compiler may not work.
    Checking for license updates ...
    Checking for updated license succeeded (2 licenses fetched)
    Failed to set up kit for Qbs: Could not determine whether Qt is a static build.

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

      Did you do that from a clean source tree ? By the way, why --nomake tools ?

      As I already wrote many times: use out of source builds so you can nuke it if something fails and start over quickly.

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

      T 1 Reply Last reply
      0
      • SGaistS SGaist

        Did you do that from a clean source tree ? By the way, why --nomake tools ?

        As I already wrote many times: use out of source builds so you can nuke it if something fails and start over quickly.

        T Offline
        T Offline
        Tommy Tom
        wrote on last edited by
        #8

        @SGaist

        Tom:qt-build$ ~/Qt/5.10.0/Src/configure --prefix=/Users/Tom/Qt/5.10.0/clang_64-static -static -debug-and-release -nomake examples -nomake tests -commercial

        this is my configuration string. i am outside the Source tree (shadow build) and still, even with make -j 1 which takes almost 3 hours to compile (instead of 45mins -j 8) i still get the same error. i can only complete compile the KIT with --nomake tools but then i run into other problems with QTCreator because of that. The KIT is not recognized completely without tweaking. I really could need some help.

        Undefined symbols for architecture x86_64:
        "_inflateValidate", referenced from:
        _png_inflate_claim in libqtlibpng.a(pngrutil.o)
        ld: symbol(s) not found for architecture x86_64
        clang: error: linker command failed with exit code 1 (use -v to see invocation)
        make[4]: *** [../../../bin/Assistant.app/Contents/MacOS/Assistant] Error 1
        make[3]: *** [sub-assistant-make_first] Error 2
        make[2]: *** [sub-assistant-make_first] Error 2
        make[1]: *** [sub-src-make_first] Error 2
        make: *** [module-qttools-make_first] Error 2

        1 Reply Last reply
        0
        • T Offline
          T Offline
          Tommy Tom
          wrote on last edited by
          #9

          im going to try this configure string actually....

          ~/Qt/5.10.0/Src/configure --prefix=/Users/tom/Qt/5.10.0/clang_64-static -static -debug-and-release -nomake examples -nomake tests -commercial -qt-libpng -qt-zlib -qt-libjpeg -qt-xcb -qt-xkbcommon -qt-freetype -qt-pcre -qt-harfbuzz -platform macx-clang

          1 Reply Last reply
          0
          • T Offline
            T Offline
            Tommy Tom
            wrote on last edited by
            #10

            after removing all packages (brew) with only wget left and the mentioned configure string it compiled...

            somehow the kit does not get detected automatically. is this normal ?

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

              Yes, you have to add it manually.

              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
              • mzimmersM Offline
                mzimmersM Offline
                mzimmers
                wrote on last edited by
                #12

                I know this topic is old, but I just built a static library for MacOS, and now I can't find it. According to the docs:

                http://doc.qt.io/qt-5/macos-building.html
                

                It should be in /usr/local, but it's not there. Where might it be? My configure command was:

                configure -static -release -nomake examples -nomake tests -qt-libpng -qt-zlib -qt-libjpeg -qt-xkbcommon -qt-freetype -qt-pcre -qt-harfbuzz -platform macx-clang
                

                Thanks...

                jsulmJ 1 Reply Last reply
                1
                • mzimmersM mzimmers

                  I know this topic is old, but I just built a static library for MacOS, and now I can't find it. According to the docs:

                  http://doc.qt.io/qt-5/macos-building.html
                  

                  It should be in /usr/local, but it's not there. Where might it be? My configure command was:

                  configure -static -release -nomake examples -nomake tests -qt-libpng -qt-zlib -qt-libjpeg -qt-xkbcommon -qt-freetype -qt-pcre -qt-harfbuzz -platform macx-clang
                  

                  Thanks...

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

                  @mzimmers Did you try to search for it?
                  On Linux I would do

                  find / -name QT_LIB_NAME_HERE
                  

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

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

                    Might be silly question but did you call make install after building ?

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

                    mzimmersM 1 Reply Last reply
                    2
                    • SGaistS SGaist

                      Might be silly question but did you call make install after building ?

                      mzimmersM Offline
                      mzimmersM Offline
                      mzimmers
                      wrote on last edited by
                      #15

                      @SGaist indeed a silly question, but entirely appropriate for a silly programmer like me who FORGOT MAKE INSTALL. Sheesh...

                      Thanks, SGaist.

                      @jsulm thanks for that tip. Might work just looking for qmake.exe too, right?

                      jsulmJ 1 Reply Last reply
                      0
                      • mzimmersM mzimmers

                        @SGaist indeed a silly question, but entirely appropriate for a silly programmer like me who FORGOT MAKE INSTALL. Sheesh...

                        Thanks, SGaist.

                        @jsulm thanks for that tip. Might work just looking for qmake.exe too, right?

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

                        @mzimmers On Mac "qmake" without ".exe" :-)

                        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