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. Building Qt 5.9 for iOS with shared libraries fails
Qt 6.11 is out! See what's new in the release blog

Building Qt 5.9 for iOS with shared libraries fails

Scheduled Pinned Locked Moved Solved Installation and Deployment
11 Posts 3 Posters 4.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 Offline
    S Offline
    Stefankm
    wrote on last edited by Stefankm
    #1

    Hi,
    as the topic says, I am trying to build Qt 5.9 for iOS from sources, but I am always ending up with error messages about missing symbols.

    This is my configure command:
    sudo ./configure -prefix /Developer/qt/5.9s -xplatform macx-ios-clang -release -shared -nomake examples -nomake tests -opensource

    the first error I get when running make is:
    Undefined symbols for architecture armv7:
    "_CFArrayAppendValue", referenced from:
    QCoreTextFontDatabase::populateFontDatabase() in libQt5FontDatabaseSupport.a(qcoretextfontdatabase.o)
    QCoreTextFontDatabase::addApplicationFont(QByteArray const&, QString const&) in libQt5FontDatabaseSupport.a(qcoretextfontdatabase.o)
    "_CFArrayContainsValue", referenced from:
    getFontDescription(__CTFontDescriptor const*, FontDescription*) in libQt5FontDatabaseSupport.a(qcoretextfontdatabase.o)
    "_CFArrayCreateMutable", referenced from:
    QCoreTextFontDatabase::addApplicationFont(QByteArray const&, QString const&) in libQt5FontDatabaseSupport.a(qcoretextfontdatabase.o)
    (continued)
    ld: symbol(s) not found for architecture armv7
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[5]: *** [../../../../plugins/platforms/libqminimal.dylib] Error 1

    Does anyone have a hint for me how to fix this? As a workaround, I tried to exclude armv7 from the arch list, but somehow I didn't find the right location to turn it off.

    I am working with Xcode 7.2.1 Build version 7C1002, installed SDKS are
    OS X SDKs:
    OS X 10.11 -sdk macosx10.11
    iOS SDKs:
    iOS 9.2 -sdk iphoneos9.2
    iOS Simulator SDKs:
    Simulator - iOS 9.2 -sdk iphonesimulator9.2
    tvOS SDKs:
    tvOS 9.1 -sdk appletvos9.1
    tvOS Simulator SDKs:
    Simulator - tvOS 9.1 -sdk appletvsimulator9.1
    watchOS SDKs:
    watchOS 2.1 -sdk watchos2.1
    watchOS Simulator SDKs:
    Simulator - watchOS 2.1 -sdk watchsimulator2.1

    Thanks a lot for your help!

    UPDATE: Also tried this build on a fresh Sierra install with latest XCode (Xcode 8.3.3 Build version 8E3004b) and it fails with the exact same error

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

      Hi,

      Where did you get the source from ?

      And why are you using sudo ?

      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
      • S Offline
        S Offline
        Stefankm
        wrote on last edited by Stefankm
        #3

        Hi,

        I downloaded/installed the source via the MaintenanceTool. Without sudo I get permission denied messages during "make" (happens on both machines)

        I openend a bug report about this issue: https://bugreports.qt.io/browse/QTBUG-61489
        There I atteched a complete build log, perhaps it helps in tracking down the problem.

        Thanks for helping!

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

          Where did you install Qt exactly ?

          In any case, you should rather use an out of source build.

          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
          • S Stefankm

            Hi,

            I downloaded/installed the source via the MaintenanceTool. Without sudo I get permission denied messages during "make" (happens on both machines)

            I openend a bug report about this issue: https://bugreports.qt.io/browse/QTBUG-61489
            There I atteched a complete build log, perhaps it helps in tracking down the problem.

            Thanks for helping!

            P Offline
            P Offline
            Phataas
            wrote on last edited by Phataas
            #5

            @Stefankm I get the exact same error as you. I have tried with XCode 7.3.1, 8.2.1 and 8.3.3. Checked out tag v5.9.0.

            My configure is:

            ./configure -prefix /home/mymac/Qt5.9.0 -opensource -confirm-license -release -shared -xplatform macx-ios-clang -appstore-compliant -c++std c++14 -sdk iphoneos10.2 -skip qtwebkit -skip qtwebkit-examples -nomake examples -nomake tests
            

            If you find a solution, please let me know here on this post. I will post if I find the answer as well.

            These are my detailed steps:

            • MacOS 10.12.5
            • perl-5.18.2, Python 2.7.12
            • Xcode version 8.2.1. Same as Qt use according to: Qt Tools and Versions
            • Clone Qt5 git repository: git clone https://github.com/qt/qt5.git
            • Checkout Qt version: git checkout v5.9.0
            • Run perl script to checkout submodules etc.: perl init-repository
            • Configure: ./configure -prefix /home/mymac/Qt5.9.0 -opensource -confirm-license -release -shared -xplatform macx-ios-clang -appstore-compliant -c++std c++14 -sdk iphoneos10.2 -skip qtwebkit -skip qtwebkit-examples -nomake examples -nomake tests
            • Run make: make -j2
            1 Reply Last reply
            0
            • SGaistS SGaist

              Where did you install Qt exactly ?

              In any case, you should rather use an out of source build.

              S Offline
              S Offline
              Stefankm
              wrote on last edited by
              #6

              @SGaist
              I installed Qt in /Developer/qt
              I need a source build, because the precompiled version has static libs only.
              Thanks for helping!

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

                Please use https://code.qt.io to clone Qt, GitHub is merely a mirror.

                And you should really do an out of source build, that will make things easier to handle.

                You should rather use the 5.9.1 branch or the 5.9 branch, they will contain the latest fixes.

                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
                1
                • SGaistS SGaist

                  Please use https://code.qt.io to clone Qt, GitHub is merely a mirror.

                  And you should really do an out of source build, that will make things easier to handle.

                  You should rather use the 5.9.1 branch or the 5.9 branch, they will contain the latest fixes.

                  S Offline
                  S Offline
                  Stefankm
                  wrote on last edited by
                  #8

                  @SGaist
                  Thanks for your hints. There was indeed a build problem in Qt that was fixed (refer to bug reference above - although I am hitting a new, similiar problem now). What I did for the new build was

                  git clone --branch 5.9.1 git://code.qt.io/qt/qt5.git
                  cd qt5
                  git checkout 5.9.1
                  perl init-repository --module-subset=default,-qtwebkit,-qtwebkit-examples,-qtwebengine
                  cd qtmacextras/
                  git cherry-pick 13ac2688a4c692bb430d43c87c440f34d2775307
                  ./configure -prefix /Developer/qt/5.9.1/iosd -xplatform macx-ios-clang -release -shared -nomake examples -nomake tests -opensource -confirm-license
                  make -j 4

                  Would you suggest a diffrent way of building?
                  Thanks for your help!

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

                    Why did you need that cherry-pick ?

                    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

                      Why did you need that cherry-pick ?

                      S Offline
                      S Offline
                      Stefankm
                      wrote on last edited by Stefankm
                      #10

                      @SGaist the cherry pickfixes the above problem. Indeed the build was broken. There is also a second bug, which was fixed today.

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

                        Thanks for the feedback and happy coding ! :)

                        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