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. Mac: Moved from Qt5 back to Qt4: Makefile picking up wrong lib dir; but kit & including seems ok [SOLVED]
Qt 6.11 is out! See what's new in the release blog

Mac: Moved from Qt5 back to Qt4: Makefile picking up wrong lib dir; but kit & including seems ok [SOLVED]

Scheduled Pinned Locked Moved Installation and Deployment
27 Posts 3 Posters 21.0k 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.
  • J Offline
    J Offline
    janfaroe
    wrote on last edited by
    #8

    /Developer/Tools/Qt/qmake, which is indeed the qt4.x location

    From the "Details" pane in Preferences->Build & Run ->Qt Versions:

    Name:
    Qt 4.8.5 (Tools)
    ABI:
    x86-macos-generic-mach_o-64bit
    Source:
    /
    mkspec:
    macx-g++
    qmake:
    /Developer/Tools/Qt/qmake
    Default:
    debug
    Version:
    4.8.5
    QMAKE_VERSION
    2.01a
    QT_HOST_BINS
    /Developer/Tools/Qt
    QT_HOST_DATA
    /usr/local/Qt4.8
    QT_HOST_PREFIX
    /
    QT_INSTALL_BINS
    /Developer/Tools/Qt
    QT_INSTALL_CONFIGURATION
    /Library/Preferences/Qt
    QT_INSTALL_DATA
    /usr/local/Qt4.8
    QT_INSTALL_DEMOS
    /Developer/Examples/Qt/Demos
    QT_INSTALL_DOCS
    /Developer/Documentation/Qt
    QT_INSTALL_EXAMPLES
    /Developer/Examples/Qt/
    QT_INSTALL_HEADERS
    /usr/include
    QT_INSTALL_IMPORTS
    /Developer/Applications/Qt/imports
    QT_INSTALL_LIBS
    /Library/Frameworks
    QT_INSTALL_PLUGINS
    /Developer/Applications/Qt/plugins
    QT_INSTALL_PREFIX
    /
    QT_INSTALL_TRANSLATIONS
    /Developer/Applications/Qt/translations
    QT_VERSION
    4.8.5

    1 Reply Last reply
    0
    • J Offline
      J Offline
      janfaroe
      wrote on last edited by
      #9

      I've run a find . -type f -exec grep -l "5.0.2" {} + in my project directory; I find no instances. I did the same in /usr/local/Qt4.8, where the makespecs are located. Same.

      1 Reply Last reply
      0
      • sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #10

        What is the output of:
        @
        qmake -v
        @

        (Z(:^

        1 Reply Last reply
        0
        • J Offline
          J Offline
          janfaroe
          wrote on last edited by
          #11

          @~/Library/Preferences > /Developer/Tools/Qt/qmake -v
          QMake version 2.01a
          Using Qt version 4.8.5 in /Library/Frameworks@

          (That's the qmake I'm pointing to in my Creator settings as well)

          1 Reply Last reply
          0
          • sierdzioS Offline
            sierdzioS Offline
            sierdzio
            Moderators
            wrote on last edited by
            #12

            This is all very weird. Every part of configuration you mention looks correct.

            (Z(:^

            1 Reply Last reply
            0
            • J Offline
              J Offline
              janfaroe
              wrote on last edited by
              #13

              To say the least. And very frustrating at my end.

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

                Can you do a build from the command line ?

                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
                • J Offline
                  J Offline
                  janfaroe
                  wrote on last edited by
                  #15

                  Never done that before. Copied the stuff from build settings in Creator, ran

                  @/Developer/Tools/Qt/qmake /Users/jan/Dev/TubulatorQt_4.8/src/TubulatorQt.pro -r -spec macx-g++ CONFIG+=x86_64@

                  which still generates the same #### line in the makefile:
                  @LIBS = $(SUBLIBS) -F/Library/Frameworks -L/Library/Frameworks -lssl -lcrypto -framework Foundation -framework Appkit -framework QtMacExtras -F/Users/jan/Qt5.0.2/5.0.2/clang_64/lib -framework AppKit -framework QtWidgets -F/Users/jan/Qt5.0.2/5.0.2/clang_64/qtbase/lib -framework QtGui -framework QtCore -framework QtScript -framework QtSql -framework QtNetwork @

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

                    looks like your are running qmake from 5.0.2 Oo

                    Do you have any Q environment variable set in your console ?

                    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
                    • J Offline
                      J Offline
                      janfaroe
                      wrote on last edited by
                      #17

                      But two posts above, qmake -v tells me it's 4.8.5. Same binary location.

                      Environment variables: Not that I know of. What would I check for?

                      1 Reply Last reply
                      0
                      • sierdzioS Offline
                        sierdzioS Offline
                        sierdzio
                        Moderators
                        wrote on last edited by
                        #18

                        This could give you some nice results:
                        @
                        env | grep Q
                        @

                        (Z(:^

                        1 Reply Last reply
                        0
                        • J Offline
                          J Offline
                          janfaroe
                          wrote on last edited by
                          #19

                          @> env | grep Q
                          OLDPWD=/Users/jan/Dev/TubulatorQt_4.8
                          PWD=/Users/jan/Dev/TubulatorQt_4.8/build-TubulatorQt-Qt_4_8_Desktop-Debug@

                          1 Reply Last reply
                          0
                          • sierdzioS Offline
                            sierdzioS Offline
                            sierdzio
                            Moderators
                            wrote on last edited by
                            #20

                            I'm out of ideas ;)

                            Oh wait, just one more thing: see if you have a file named qt.conf anywhere on your OS. You can also take a look at Qt makespecs, maybe there are some problems there, but that would be insane.

                            (Z(:^

                            1 Reply Last reply
                            0
                            • J Offline
                              J Offline
                              janfaroe
                              wrote on last edited by
                              #21

                              Thanks anyway ;-)

                              Lots of qt.conf files, but none global (belongs to projects), and all only specifiy the plugins path.

                              I deleted the make specs before installing anew yesterday, so I doub't there'll be any references to an old Qt install location there.

                              1 Reply Last reply
                              0
                              • J Offline
                                J Offline
                                janfaroe
                                wrote on last edited by
                                #22

                                Tried installing and uninstalling 5.0.2. As I suspected - no luck after that either.

                                Am I really forced to move to another computer?

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

                                  What does a

                                  @find / -name qmake@

                                  return ?

                                  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
                                  • J Offline
                                    J Offline
                                    janfaroe
                                    wrote on last edited by
                                    #24

                                    Fixed it! I took a long, hard look at my .pro file, starting commenting things out and running quake to how it affected the Makefile.

                                    The culprit was this line:

                                    @LIBS += -framework Foundation -framework Appkit -framework QtMacExtras@

                                    First off, QtMacExtras does not exist as a separate module in Qt 4 (AFAIK), so away it went. That wixed the complaint about missing QtWidgets module and include of 5.0.2 stuff.

                                    What I still don't understand is

                                    1. Why I wasn't getting a complaint about an unknown module instead of a reference to Qt5.0.2 stuff.

                                    2. How the system would pick Qt5.0.2 as a candidate of where the module would be located. I have searched my system intensively, and I find NO references to 5.0.2. I would understand refs to 5.2.0, because that's installed and being used - but not 5.0.2.

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

                                      You're correct, QtMacExtras is new for Qt 5.

                                      1. you set the framework in LIBS, not the module QT, so it links directly

                                      2. Did you build QtMacExtras with Qt 5.0.2 ?

                                      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
                                      • J Offline
                                        J Offline
                                        janfaroe
                                        wrote on last edited by
                                        #26
                                        1. Got it, thanks!

                                        2. I do recall building Extras. There's a QtMacExtras.framework in my /Library/Frameworks folder, but it says 5.1 in the Info.plist file. Not sure if that can be trusted though. Is the Qt framework location baked into the .framework bundle? That has to be the only place the Qt install location can be picked up, right?

                                        1 Reply Last reply
                                        0
                                        • SGaistS Offline
                                          SGaistS Offline
                                          SGaist
                                          Lifetime Qt Champion
                                          wrote on last edited by
                                          #27
                                          1. You're welcome !

                                          2. You could have a look at the library in the framework with otool -L to see with what it's linked

                                          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