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. Humor me? Trying to make a build of Qt 4.8.0 on MacOS 11.6.1
QtWS25 Last Chance

Humor me? Trying to make a build of Qt 4.8.0 on MacOS 11.6.1

Scheduled Pinned Locked Moved Unsolved General and Desktop
13 Posts 4 Posters 581 Views
  • 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.
  • D Offline
    D Offline
    Douglas_A_Scott
    wrote on last edited by Douglas_A_Scott
    #1

    I am attempting to resurrect a Qt3 application I wrote many years ago. Rather than try converting it to Qt4 (yet), I am trying to hack a working build-and-install of Qt-4.8.0 on my Mac running 11.6.1 (Xcode 13) with Qt3 support turned on.

    At this point, I have:

    1. Configured without -developer-build (so I could avoid the -Wall errors and install externally). Also am configured to build -static because this is a one-time project to get an old Qt3 app working again.
    2. Found all the patches needed to fix changes in C++ and changes in the Apple APIs
    3. Finally got all source files compiling in both the Debug and Release versions, and have all libraries linked and built.

    The problem: All the executables within the Qt build system (uic3, etc) fail to link with a long set of errors of this form:

    [Mac-Pro:src/tools/uic3] dscott% g++ -Xlinker -v -headerpad_max_install_names -arch x86_64 -all_load -Xarch_x86_64 -mmacosx-version-min=11.6 -o ../../../bin/uic3 .obj/release-static/customwidgetsinfo.o .obj/release-static/databaseinfo.o .obj/release-static/driver.o .obj/release-static/treewalker.o .obj/release-static/ui4.o .obj/release-static/validator.o .obj/release-static/cppextractimages.o .obj/release-static/cppwritedeclaration.o .obj/release-static/cppwriteicondata.o .obj/release-static/cppwriteicondeclaration.o .obj/release-static/cppwriteiconinitialization.o .obj/release-static/cppwriteincludes.o .obj/release-static/cppwriteinitialization.o .obj/release-static/main.o .obj/release-static/ui3reader.o .obj/release-static/parser.o .obj/release-static/domtool.o .obj/release-static/object.o .obj/release-static/subclassing.o .obj/release-static/form.o .obj/release-static/converter.o .obj/release-static/widgetinfo.o .obj/release-static/embed.o .obj/release-static/qt3to4.o .obj/release-static/deps.o .obj/release-static/uic.o -L/opt/local/src/qt-everywhere-opensource-src-4.8.0/lib -lQt3Support -L/opt/local/src/qt-everywhere-opensource-src-4.8.0/lib -lQtSql -framework ApplicationServices -framework CoreFoundation -framework Carbon -framework AppKit -lQtNetwork -framework SystemConfiguration -lresolv -lQtXml -lQtGui -lQtCore -lz -lm
    @(#)PROGRAM:ld PROJECT:ld64-711
    BUILD 18:11:15 Aug 3 2021
    configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em
    Library search paths:
    /opt/local/src/qt-everywhere-opensource-src-4.8.0/lib
    /opt/local/src/qt-everywhere-opensource-src-4.8.0/lib
    /usr/local/lib
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib
    Framework search paths:
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/
    Undefined symbols for architecture x86_64:
    "QHistoryState::staticMetaObject", referenced from:
    QStateMachinePrivate::clearHistory() in libQtCore.a(qstatemachine.o)
    QStatePrivate::childStates() const in libQtCore.a(qstate.o)
    QStatePrivate::historyStates() const in libQtCore.a(qstate.o)
    "QPluginLoader::staticMetaObject", referenced from:
    QPluginLoader::unload() in libQtCore.a(qpluginloader.o)
    QPluginLoader::errorString() const in libQtCore.a(qpluginloader.o)

    All the online posts about this issue talk about config and coding errors, or not running moc, etc. -- but this is all internal code. Could this be related to the -static?

    1 Reply Last reply
    0
    • JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on last edited by
      #2

      You may try to sell your app as antique to Qt. I would think very few people even finish reading your post. I did not. If you still remember your layout, simply make a new one from scratch with Qt6.

      D 1 Reply Last reply
      0
      • JoeCFDJ JoeCFD

        You may try to sell your app as antique to Qt. I would think very few people even finish reading your post. I did not. If you still remember your layout, simply make a new one from scratch with Qt6.

        D Offline
        D Offline
        Douglas_A_Scott
        wrote on last edited by
        #3

        @JoeCFD I only need one helpful person with an answer to respond in order to make my post worthwhile.

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

          Hi,

          Which options did you pass to configure ?
          Did you setup a repository with the patches ?
          Did you consider using homebrew to install Qt4 ?

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

          D 1 Reply Last reply
          0
          • SGaistS SGaist

            Hi,

            Which options did you pass to configure ?
            Did you setup a repository with the patches ?
            Did you consider using homebrew to install Qt4 ?

            D Offline
            D Offline
            Douglas_A_Scott
            wrote on last edited by
            #5

            @SGaist Thanks for replying! Initial answers:

            1. Command-line history for that is long-gone - is there a way to get configure to print its current settings?
            2. I don't really understand the question - I had to hand-patch via text editor into an old non-Git version of the 4.8.0 code
            3. I don't currently use brew for any software installations, but it may come to that. It would have to be a Qt4 build with Qt3 support enabled. Would that be obvious?
            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Yes, there is a file a the top of your build folder that contains them.

              You wrote that you found patches so you could have put them all together for easier reuse.
              By the way, why 4.8.0 ? There's 4.8.7 that is the latest and greatest of that series and it is available through git.

              I don't know if they built it with Qt 3 compatibility library enabled.

              On a side note, you might want to consider using a Linux virtual machine or Docker to do the porting to Qt 4. It would likely be easier to setup.

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

              D 2 Replies Last reply
              1
              • SGaistS SGaist

                Yes, there is a file a the top of your build folder that contains them.

                You wrote that you found patches so you could have put them all together for easier reuse.
                By the way, why 4.8.0 ? There's 4.8.7 that is the latest and greatest of that series and it is available through git.

                I don't know if they built it with Qt 3 compatibility library enabled.

                On a side note, you might want to consider using a Linux virtual machine or Docker to do the porting to Qt 4. It would likely be easier to setup.

                D Offline
                D Offline
                Douglas_A_Scott
                wrote on last edited by
                #7

                @SGaist said in Humor me? Trying to make a build of Qt 4.8.0 on MacOS 11.6.1:

                Yes, there is a file a the top of your build folder that contains them.

                Thanks!! "-static -no-accessibility -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend -no-webkit -no-javascript-jit -no-declarative-debug -platform macx-g++ -no-openssl -no-framework -arch x86_64 -prefix /opt/local/Qt-4.8.0 -confirm-license"

                By the way, why 4.8.0 ? There's 4.8.7 that is the latest and greatest of that series and it is available through git.

                This is what I had on my machine from back in the day. I had no clear indication that 4.8.7 would solve any of my issues.

                On a side note, you might want to consider using a Linux virtual machine or Docker to do the porting to Qt 4. It would likely be easier to setup.

                Hmm. I have a Linux VM. Let me look into that, thanks!

                1 Reply Last reply
                0
                • SGaistS SGaist

                  Yes, there is a file a the top of your build folder that contains them.

                  You wrote that you found patches so you could have put them all together for easier reuse.
                  By the way, why 4.8.0 ? There's 4.8.7 that is the latest and greatest of that series and it is available through git.

                  I don't know if they built it with Qt 3 compatibility library enabled.

                  On a side note, you might want to consider using a Linux virtual machine or Docker to do the porting to Qt 4. It would likely be easier to setup.

                  D Offline
                  D Offline
                  Douglas_A_Scott
                  wrote on last edited by
                  #8

                  @SGaist You said "On a side note, you might want to consider using a Linux virtual machine or Docker to do the porting to Qt 4. It would likely be easier to setup."

                  I cannot find any installable or compilable version of Qt 4 anywhere! The main Qt site does not have it. Am I missing something?

                  JKSHJ 1 Reply Last reply
                  0
                  • D Douglas_A_Scott

                    @SGaist You said "On a side note, you might want to consider using a Linux virtual machine or Docker to do the porting to Qt 4. It would likely be easier to setup."

                    I cannot find any installable or compilable version of Qt 4 anywhere! The main Qt site does not have it. Am I missing something?

                    JKSHJ Offline
                    JKSHJ Offline
                    JKSH
                    Moderators
                    wrote on last edited by
                    #9

                    @Douglas_A_Scott said in Humor me? Trying to make a build of Qt 4.8.0 on MacOS 11.6.1:

                    I cannot find any installable or compilable version of Qt 4 anywhere! The main Qt site does not have it. Am I missing something?

                    https://download.qt.io/archive/qt/4.8/

                    Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                    D 2 Replies Last reply
                    0
                    • JKSHJ JKSH

                      @Douglas_A_Scott said in Humor me? Trying to make a build of Qt 4.8.0 on MacOS 11.6.1:

                      I cannot find any installable or compilable version of Qt 4 anywhere! The main Qt site does not have it. Am I missing something?

                      https://download.qt.io/archive/qt/4.8/

                      D Offline
                      D Offline
                      Douglas_A_Scott
                      wrote on last edited by
                      #10

                      @JKSH Thank you!

                      1 Reply Last reply
                      0
                      • JKSHJ JKSH

                        @Douglas_A_Scott said in Humor me? Trying to make a build of Qt 4.8.0 on MacOS 11.6.1:

                        I cannot find any installable or compilable version of Qt 4 anywhere! The main Qt site does not have it. Am I missing something?

                        https://download.qt.io/archive/qt/4.8/

                        D Offline
                        D Offline
                        Douglas_A_Scott
                        wrote on last edited by
                        #11

                        @JKSH Urk! Spoke too soon! The installable Mac image, qt-opensource-mac-4.8.7.dmg, will not install on a machine with the OS version I have. The installer package is not allowed to install where it wants to, and there is no way to reset where it plans to install. Hmmm.

                        JKSHJ 1 Reply Last reply
                        0
                        • D Douglas_A_Scott

                          @JKSH Urk! Spoke too soon! The installable Mac image, qt-opensource-mac-4.8.7.dmg, will not install on a machine with the OS version I have. The installer package is not allowed to install where it wants to, and there is no way to reset where it plans to install. Hmmm.

                          JKSHJ Offline
                          JKSHJ Offline
                          JKSH
                          Moderators
                          wrote on last edited by
                          #12

                          @Douglas_A_Scott said in Humor me? Trying to make a build of Qt 4.8.0 on MacOS 11.6.1:

                          Urk! Spoke too soon! The installable Mac image, qt-opensource-mac-4.8.7.dmg, will not install on a machine with the OS version I have. The installer package is not allowed to install where it wants to, and there is no way to reset where it plans to install. Hmmm.

                          macOS has changed way too much in the last decade, so I'm not surprised that the installer doesn't work.

                          You can try to compile it from source, but I have a feeling you'll be fighting an uphill battle. A VM with an old OS would likely be easier.

                          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

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

                            I think you are over-complicating things here.

                            If memory serves well, Qt 4 was removed from repositories with Debian 11 so anything before that has Qt 4 and all the required development packages that you can install and use for porting your application. I would recommend a basic Debian 10 to get started and you will be able to port your application with the added benefit that this version will be the latest of the series so even easier to move to Qt 5 / 6 afterwards.

                            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