Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Install Qt 4.8.7 on a Mac running OS X 10.11 (El Capitan)
Forum Updated to NodeBB v4.3 + New Features

Install Qt 4.8.7 on a Mac running OS X 10.11 (El Capitan)

Scheduled Pinned Locked Moved Solved General and Desktop
26 Posts 10 Posters 30.4k Views 3 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.
  • R Offline
    R Offline
    Rondog
    wrote on last edited by
    #6

    Compiling Qt is the only way I know of to get a working version of 4.X.X running on this OS.

    You need to install the command line tools. You can access this from XCode or you can do a separate download.

    When running 'configure' you can pass quite a number of parameters to define what you want. I suspect you don't want the examples compiled since you have been using this for a while. Run './configure -help' first to see your options. Option '-prefix' is one I always supply for example (sets the installation location).

    1 Reply Last reply
    0
    • L laseranichris

      @SGaist

      Thanks, this really sounds easy.

      But even for this my knowledge of OS X seems not to be sufficient....

      I extracted "qt-everywhere-opensource-src-4.8.7" into /tmp.
      Then I started the terminal (bash) and changed into this directory.

      When I enter "./configure" I get the message:

      -bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory

      Are there other requirements besides the installation of Xcode?

      S Offline
      S Offline
      sandy.martel23
      wrote on last edited by
      #7

      @laseranichris said:

      ....
      When I enter "./configure" I get the message:

      -bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory

      Are there other requirements besides the installation of Xcode?

      Downloading and using the unix .tar.gz instead of the windows .zip archive would fix that problem.

      Also, if you are compiling with the latest Xcode and you need Qt's openssl support, you will need to setup your own openssl since the openssl headers are not part of the SDK anymore..

      1 Reply Last reply
      1
      • L Offline
        L Offline
        laseranichris
        wrote on last edited by
        #8

        Hi!

        This was my mistake: I really took the Windows sources....
        Sorry about this!

        Using the right sources I can build Qt 4.8.7 on a Mac with OS X 10.10.5 and Xcode 7.1.

        But the build still fails on OS X 10.11.1 and Xcode 7.1.
        Even when I specify a different directory using "-prefix".

        I decided for me that it is the best soultion to have a second installation running OS X 10.10 and use the Qt installer.

        Thank you for you comments.

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

          What errors do you get ?

          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

            What errors do you get ?

            L Offline
            L Offline
            laseranichris
            wrote on last edited by
            #10

            @SGaist

            These are the errors I get:

            painting/qpaintengine_mac.cpp:345:19: error: use of undeclared identifier 'CMGetProfileByAVID'
            CMError err = CMGetProfileByAVID((CMDisplayIDType)displayID, &displayProfile);
            ^
            painting/qpaintengine_mac.cpp:348:9: error: use of undeclared identifier 'CMCloseProfile'
            CMCloseProfile(displayProfile);
            ^

            1 Reply Last reply
            1
            • SGaistS SGaist

              It really boils down to:

              ./configure
              make -jX where X is twice the number of core you have available
              sudo make install
              
              V Offline
              V Offline
              Violet Giraffe
              wrote on last edited by
              #11

              @SGaist said:

              make -jX where X is twice the number of core you have available

              Why twice?

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

                Ok, so it's an API that's not available anymore on El Capitan. You can use the patch homebrew is using to compile Qt.

                So keeps all cores busy, if you need them for something else, just use less cores than what you have available.

                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
                1
                • D Offline
                  D Offline
                  DoHuuVi
                  wrote on last edited by
                  #13

                  I'm encountering the same problem as laseranichris, then I tried the patch. But then I got another error:
                  ...
                  Undefined symbols for architecture x86_64:
                  "Phonon::ObjectDescriptionModel<(Phonon::ObjectDescriptionType)0>::qt_metacast(char const*)", referenced from:
                  vtable for Phonon::ObjectDescriptionModel<(Phonon::ObjectDescriptionType)0> in window.o
                  "Phonon::ObjectDescriptionModel<(Phonon::ObjectDescriptionType)0>::metaObject() const", referenced from:
                  vtable for Phonon::ObjectDescriptionModel<(Phonon::ObjectDescriptionType)0> in window.o
                  ld: symbol(s) not found for architecture x86_64
                  clang: error: linker command failed with exit code 1 (use -v to see invocation)
                  ...

                  How can I fix this? Thank you very much!

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

                    Did you restart your build from scratch ?

                    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
                    • D DoHuuVi

                      I'm encountering the same problem as laseranichris, then I tried the patch. But then I got another error:
                      ...
                      Undefined symbols for architecture x86_64:
                      "Phonon::ObjectDescriptionModel<(Phonon::ObjectDescriptionType)0>::qt_metacast(char const*)", referenced from:
                      vtable for Phonon::ObjectDescriptionModel<(Phonon::ObjectDescriptionType)0> in window.o
                      "Phonon::ObjectDescriptionModel<(Phonon::ObjectDescriptionType)0>::metaObject() const", referenced from:
                      vtable for Phonon::ObjectDescriptionModel<(Phonon::ObjectDescriptionType)0> in window.o
                      ld: symbol(s) not found for architecture x86_64
                      clang: error: linker command failed with exit code 1 (use -v to see invocation)
                      ...

                      How can I fix this? Thank you very much!

                      S Offline
                      S Offline
                      sandy.martel23
                      wrote on last edited by
                      #15

                      @DoHuuVi

                      just configure with "-nomake examples"

                      1 Reply Last reply
                      0
                      • D Offline
                        D Offline
                        DoHuuVi
                        wrote on last edited by
                        #16

                        @SGaist : yes, I retried from scratch but still encountered the error.

                        I'm trying with nomake example.

                        1 Reply Last reply
                        0
                        • SGaistS SGaist

                          It really boils down to:

                          ./configure
                          make -jX where X is twice the number of core you have available
                          sudo make install
                          
                          FresaYuanF Offline
                          FresaYuanF Offline
                          FresaYuan
                          wrote on last edited by
                          #17

                          @SGaist
                          Hi,
                          I have tried to compile Qt 4.8.7 on Mac OS X 10.11(El Capitan)
                          After make -j1
                          I got
                          3 warnings and 2 errors generated.
                          make[2]: *** [.obj/debug-shared/qpaintengine_mac.o] Error 1
                          make[1]: *** [debug-all] Error 2
                          make: *** [sub-gui-make_default-ordered] Error 2

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

                            Did you apply the patch I linked to ?

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

                            FresaYuanF 1 Reply Last reply
                            0
                            • SGaistS SGaist

                              Did you apply the patch I linked to ?

                              FresaYuanF Offline
                              FresaYuanF Offline
                              FresaYuan
                              wrote on last edited by
                              #19

                              @SGaist
                              Thanks so much for your reply.
                              I didn't try the patch. I am new to this, and could you please tell me more detail about how to apply it?

                              mrjjM 1 Reply Last reply
                              0
                              • FresaYuanF FresaYuan

                                @SGaist
                                Thanks so much for your reply.
                                I didn't try the patch. I am new to this, and could you please tell me more detail about how to apply it?

                                mrjjM Offline
                                mrjjM Offline
                                mrjj
                                Lifetime Qt Champion
                                wrote on last edited by mrjj
                                #20

                                @FresaYuan
                                Hi
                                I think you just need to change the
                                src/gui/painting/qpaintengine_mac.cpp
                                file
                                All in red are deleted and this line is inserted:
                                CGColorSpaceRef colorSpace = CGDisplayCopyColorSpace(displayID);

                                in the function
                                QCoreGraphicsPaintEngine::macDisplayColorSpace

                                There is a tool to apply patches but in this case
                                "1 file changed, 1 insertion(+), 7 deletions(-)"
                                Seems ok to apply by hand.

                                FresaYuanF 2 Replies Last reply
                                1
                                • mrjjM mrjj

                                  @FresaYuan
                                  Hi
                                  I think you just need to change the
                                  src/gui/painting/qpaintengine_mac.cpp
                                  file
                                  All in red are deleted and this line is inserted:
                                  CGColorSpaceRef colorSpace = CGDisplayCopyColorSpace(displayID);

                                  in the function
                                  QCoreGraphicsPaintEngine::macDisplayColorSpace

                                  There is a tool to apply patches but in this case
                                  "1 file changed, 1 insertion(+), 7 deletions(-)"
                                  Seems ok to apply by hand.

                                  FresaYuanF Offline
                                  FresaYuanF Offline
                                  FresaYuan
                                  wrote on last edited by
                                  #21
                                  This post is deleted!
                                  1 Reply Last reply
                                  0
                                  • mrjjM mrjj

                                    @FresaYuan
                                    Hi
                                    I think you just need to change the
                                    src/gui/painting/qpaintengine_mac.cpp
                                    file
                                    All in red are deleted and this line is inserted:
                                    CGColorSpaceRef colorSpace = CGDisplayCopyColorSpace(displayID);

                                    in the function
                                    QCoreGraphicsPaintEngine::macDisplayColorSpace

                                    There is a tool to apply patches but in this case
                                    "1 file changed, 1 insertion(+), 7 deletions(-)"
                                    Seems ok to apply by hand.

                                    FresaYuanF Offline
                                    FresaYuanF Offline
                                    FresaYuan
                                    wrote on last edited by
                                    #22

                                    @mrjj
                                    Thanks a lot. After change the file, when input "sudo make -j1 install"
                                    It runs almost half an hour. And end up with errors like this
                                    make[3]: *** No rule to make target ../../WebCore/debug/libwebcored.a', needed by ../../../../../../lib/QtWebKit.framework/QtWebKit_debug'. Stop.
                                    make[2]: *** [debug-install] Error 2
                                    make[1]: *** [sub-WebKit-qt-QtWebKit-pro-install_subtargets-ordered] Error 2
                                    make: *** [sub-webkit-install_subtargets-ordered] Error 2

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

                                      If you don't need webkit then disable its build. Also don't build as root.

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

                                      FresaYuanF 1 Reply Last reply
                                      0
                                      • SGaistS SGaist

                                        If you don't need webkit then disable its build. Also don't build as root.

                                        FresaYuanF Offline
                                        FresaYuanF Offline
                                        FresaYuan
                                        wrote on last edited by
                                        #24

                                        @SGaist brew install qt4 works
                                        Thanks a lot for your reply

                                        1 Reply Last reply
                                        0
                                        • ICE7I Offline
                                          ICE7I Offline
                                          ICE7
                                          wrote on last edited by
                                          #25

                                          Hello,
                                          Would it be possible to share the build of qt.4.8.7 for El Capitan?

                                          thanks.

                                          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