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]

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 12.9k 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.
  • sierdzioS Offline
    sierdzioS Offline
    sierdzio
    Moderators
    wrote on last edited by
    #2

    Delete the Makefile and then build again.

    (Z(:^

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

      Been there, done that - no luck.

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

        Ok, so I

        • added symlinks from the missing dirs to /Library/Frameworks, which shut up the complaints about missing locations.

        • Edited qglobal.h in order to make it shut up about Mac OS 10.9 not being supported

        Didn't help.

        One thing I noticed, though. The linker complains about missing framework "QtWidgets". But, there's no framework called QtWidgets in Qt4. It was only introduced in Qt5 AFAIK.

        The last steps of the make process is as follows:

        @clang++ -c -pipe -O2 -arch x86_64 -Wall -W -DQT_NO_DEBUG_OUTPUT -DQT_NO_DEBUG -DQT_SCRIPT_LIB -DQT_SQL_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED
        -I/usr/local/Qt4.8/mkspecs/unsupported/macx-clang -I../src
        -I/Library/Frameworks/QtCore.framework/Versions/4/Headers
        -I/usr/include/QtCore -I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
        -I/usr/include/QtNetwork -I/Library/Frameworks/QtGui.framework/Versions/4/Headers
        -I/usr/include/QtGui -I/Library/Frameworks/QtSql.framework/Versions/4/Headers
        -I/usr/include/QtSql -I/Library/Frameworks/QtScript.framework/Versions/4/Headers
        -I/usr/include/QtScript -I/usr/include
        -I../src/lib -I../src/qtsingleapplication/src -I. -I.
        -I../src -I. -F/Library/Frameworks -o qrc_resources_mac.o qrc_resources_mac.cpp@

        No problems here. The compiler is looking at /Library/Frameworks/*/Versions/4/Headers, which is good.

        Then:

        @clang++ -headerpad_max_install_names -arch x86_64 -o (LOTS OF OBJECT FILES)
        -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@

        Here's the trouble. WHAT ARE THE LAST TWO LINES DOING HERE?
        I am not including the widgets module, yet it says "-framework QtWidgets" (apart from the wrong path to the framework, of course). Where on earth does the last two lines come from? I've run qmake a thousand times, removed the build dir, rebuilt... nothing changes.

        Does anyone see something obvious that I don't?

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

          Hi,

          Did you delete the .pro.user file from your project ? If not, close Qt Creator, remove it and open your project again. You'll have to configure it again but you won't have the old settings lurking back

          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
            #6

            I tried that as well. No luck. Just did it again, removed everything in my build did, ran qmake, and here's the result 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

            The culprits are still there. I'm looking at the right directory; I'm manually removing the files, and I see the makefile appear when I run qmake.

            Edit: All versions of the pro.user files was removed before this.

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

              What is the path of the qmake that is used with your current kit ?

              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
                #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

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved