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. Qt source build on mac
Forum Updated to NodeBB v4.3 + New Features

Qt source build on mac

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
11 Posts 5 Posters 2.4k 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 Shidharth

    Hi Every one,

    I'm new to Mac and Qt. can you please help me to build the qt source in mac. I have go through the forums but i could not get correct instructions.

    I have fresh Macbook pro with qt5.5 source. Please advise me..

    Thanks in advance.

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

    @Shidharth Is there a reason why you want to build Qt by yourself instead of using the installer?
    If you really want to build Qt then please take a look at http://doc.qt.io/qt-5/osx-building.html

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

    S 1 Reply Last reply
    2
    • jsulmJ jsulm

      @Shidharth Is there a reason why you want to build Qt by yourself instead of using the installer?
      If you really want to build Qt then please take a look at http://doc.qt.io/qt-5/osx-building.html

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

      @jsulm Thanks for your reply.

      I have followed the intructions, it configures successfully without -icu, but if i enable -icu it throws error as follows.

      icu library support cannot be enabled

      then configure failed.

      I have downloaded ICU and set include and lib path.

      I have set macx-g++ in QMAKESPEC

      I need to build qt source for x64 in mac. Is it correct QMAKESPEC?

      jsulmJ 1 Reply Last reply
      0
      • S Shidharth

        @jsulm Thanks for your reply.

        I have followed the intructions, it configures successfully without -icu, but if i enable -icu it throws error as follows.

        icu library support cannot be enabled

        then configure failed.

        I have downloaded ICU and set include and lib path.

        I have set macx-g++ in QMAKESPEC

        I need to build qt source for x64 in mac. Is it correct QMAKESPEC?

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

        @Shidharth I'm not mac expert, but as far as I know GCC (g++) is not the official compiler anymore. CLang is the correct compiler (delivered with XCode).

        You can try to pass -v parameter to configure and check what exactly is wrong with icu.

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

        S 1 Reply Last reply
        2
        • jsulmJ jsulm

          @Shidharth I'm not mac expert, but as far as I know GCC (g++) is not the official compiler anymore. CLang is the correct compiler (delivered with XCode).

          You can try to pass -v parameter to configure and check what exactly is wrong with icu.

          S Offline
          S Offline
          Shidharth
          wrote on last edited by
          #5

          @jsulm Thank you, I have checked with -v parameter, it shows the below error msg.

          Undefined symbols for architecture x86_64:
          "_ucol_close_49", referenced from:
          _main in icu.o
          "_ucol_open_49", referenced from:
          _main in icu.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: *** [icu] Error 1
          ICU disabled.
          The ICU library support cannot be enabled.

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

            Hi,

            Are you locked to using Qt 5.5 ?

            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

              Hi,

              Are you locked to using Qt 5.5 ?

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

              @SGaist yes, we already built qt5.5 on windows. So, we are using the same version in mac x64 too..

              But the above linker error blocked us to proceed. Can you help me to resolve this?

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

                How did you install ICU ? And by the way, do you really need it ?

                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
                • P Offline
                  P Offline
                  patrik08
                  wrote on last edited by patrik08
                  #9

                  Hi.. i work 10 years on mac .. my best method to install qt is follow.
                  1- Xcode https://developer.apple.com/xcode/
                  2- mac port https://www.macports.org/install.php
                  3- port install a+ qt4-mac b+ qt5-qtbase
                  4- to have dependencies on board ... rename qt4 qmake to qmake4 && qt5 to qmake5 & remove all from PATH -> .bash_profile
                  inside .bash_profile you make a alias
                  alias makeq='/dir/path/qmake5'
                  qmake only write a Makefile like cmake..

                  now you can get all patch to mac inside file
                  https://github.com/macports/macports-ports/blob/master/aqua/qt5/Portfile

                  at end build the real source...
                  on wiki mac is not the best doc
                  http://wiki.qt.io/Building_Qt_5_from_Git#OS_X
                  in this way you have 3 version from qt sure one that works....

                  without patch I have never been able to build qt5
                  & on qtcreator setting all version you have in box...

                  A 1 Reply Last reply
                  0
                  • P patrik08

                    Hi.. i work 10 years on mac .. my best method to install qt is follow.
                    1- Xcode https://developer.apple.com/xcode/
                    2- mac port https://www.macports.org/install.php
                    3- port install a+ qt4-mac b+ qt5-qtbase
                    4- to have dependencies on board ... rename qt4 qmake to qmake4 && qt5 to qmake5 & remove all from PATH -> .bash_profile
                    inside .bash_profile you make a alias
                    alias makeq='/dir/path/qmake5'
                    qmake only write a Makefile like cmake..

                    now you can get all patch to mac inside file
                    https://github.com/macports/macports-ports/blob/master/aqua/qt5/Portfile

                    at end build the real source...
                    on wiki mac is not the best doc
                    http://wiki.qt.io/Building_Qt_5_from_Git#OS_X
                    in this way you have 3 version from qt sure one that works....

                    without patch I have never been able to build qt5
                    & on qtcreator setting all version you have in box...

                    A Offline
                    A Offline
                    ambershark
                    wrote on last edited by
                    #10

                    @patrik08 Here's the configure line I use on my mac for 5.5:

                    ./configure -opensource -qt-sql-sqlite -release -platform macx-g++ -confirm-license -nomake examples -nomake tests -icu -L/usr/local/lib -I/usr/local/include -licuuc -licui18n

                    My icu is built and installed in /usr/local.

                    My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

                    1 Reply Last reply
                    0
                    • P Offline
                      P Offline
                      patrik08
                      wrote on last edited by
                      #11

                      Fine i have only Xcode 7.3.1 not 8...
                      Xcode 8 is not support on ElCapitan... 10.11
                      macOS Sierra 10.12 update is to slow i have look in other mac box..

                      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