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. Cannot build Qt5.6 from source in OSX 10.12
QtWS25 Last Chance

Cannot build Qt5.6 from source in OSX 10.12

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
7 Posts 2 Posters 1.9k 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.
  • G Offline
    G Offline
    gaspa
    wrote on last edited by
    #1

    Hi,
    i'm trying to recompile Qt from source (my main aim is to enable webengine with proprietary codecs)
    With the default sdk (xcode 8.3.2 and sdk 10.12) I encountered this bug:
    https://codereview.qt-project.org/#/c/172619/
    that should be fixed in 5.6, but it's still here for me.

    So I tried installing an older SDK (10.8), that's the output of xcodebuild:

    $ xcodebuild  -version && xcodebuild -showsdks
    Xcode 8.3.2
    Build version 8E2002
    2017-06-15 11:40:39.054 xcodebuild[41135:3065598] [MT] DVTSDK: Skipped SDK /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk; its version (10.7) is below required minimum (10.8) for the macosx platform.
    iOS SDKs:
        iOS 10.3                          -sdk iphoneos10.3
    iOS Simulator SDKs:
        Simulator - iOS 10.3              -sdk iphonesimulator10.3
    macOS SDKs:
        OS X 10.8                         -sdk macosx10.8
    tvOS SDKs:
        tvOS 10.2                         -sdk appletvos10.2
    tvOS Simulator SDKs:
        Simulator - tvOS 10.2             -sdk appletvsimulator10.2
    watchOS SDKs:
        watchOS 3.2                       -sdk watchos3.2
    watchOS Simulator SDKs:
        Simulator - watchOS 3.2           -sdk watchsimulator3.2 
    

    This is my the output of my configure:

    $ ./configure -release -opensource -confirm-license -plugin-sql-sqlite -nomake examples -nomake tests -sdk macosx10.8
    + cd qtbase
    + /Users/gaspa/Qt/5.6/Src/qtbase/configure -top-level -release -opensource -confirm-license -plugin-sql-sqlite -nomake examples -nomake tests -sdk macosx10.8
    This is the Qt Open Source Edition.
    You are licensed to use this software under the terms of
    the Lesser GNU General Public License (LGPL) versions 2.1.
    You are also licensed to use this software under the terms of
    the GNU Lesser General Public License (LGPL) versions 3.
    You have already accepted the terms of the Open Source license.
    Running configuration tests (phase 1)...
    Done running configuration tests.
    Creating qmake...
    ............................................................................................Done.
    Running configuration tests (phase 2)...
    checking for C++11...  yes.
    checking for C++14...  yes.
    checking for C++1z...  yes.
    checking for default C++ standard edition...  yes.
    checking for 64-bit std::atomic...  yes.
    checking for sse2...  yes.
    checking for sse3...  yes.
    checking for ssse3...  yes.
    checking for sse4_1...  yes.
    checking for sse4_2...  yes.
    checking for avx...  yes.
    checking for avx2...  yes.
    checking for ipc_sysv...  yes.
    checking for zlib...  yes.
    checking for mtdev...  no.
    checking for libjpeg...  no.
    checking for libpng...  no.
    checking for dlopen...  yes.
    checking for DB2...  no.
    checking for InterBase...  no.
    checking for MySQL (thread-safe)...  no.
    checking for MySQL (thread-unsafe)...  no.
    checking for OCI...  no.
    checking for iODBC...  yes.
    checking for PostgreSQL...  yes.
    checking for SQLite2...  no.
    checking for TDS...  no.
    checking for Cups...  yes.
    checking for POSIX iconv...  yes.
    checking for D-Bus...  no.
    checking for libproxy...  no.
    checking for Glib...  no.
    checking for ICU...  no.
    checking for PulseAudio...  no.
    checking for CoreWlan...  yes.
    checking for OpenGL...  yes.
    checking for FontConfig...  no.
    checking for libudev...  no.
    checking for evdev...  no.
    checking for tslib...  no.
    checking for xkbcommon...  no.
    checking for XLib...  no.
    checking for Xrender...  no.
    checking for XInput2...  no.
    checking for GBM...  no.
    checking for LinuxFB...  no.
    checking for KMS...  no.
    checking for Mir client...  no.
    checking for EGL...  no.
    checking for eglfs-brcm...  no.
    checking for eglfs-egldevice...  no.
    checking for eglfs-mali...  no.
    checking for eglfs-mali-2...  no.
    checking for eglfs-viv...  no.
    checking for FreeType...  no.
    checking for STL...  yes.
    checking for POSIX clock_gettime()...  no.
    checking for posix_fallocate...  no.
    checking for mremap...  no.
    checking for getaddrinfo...  yes.
    checking for inotify...  no.
    checking for eventfd...  no.
    checking for IPv6 interface name...  yes.
    checking for getifaddrs...  yes.
    checking for cloexec...  no.
    checking for PCRE...  no.
    checking for OpenVG...  no.
    checking for OpenVG...  no.
    checking for OpenVG (lc includes)...  no.
    checking for OpenVG (lc includes)...  no.
    checking for alsa...  no.
    checking for GStreamer 1.0...  no.
    checking for GStreamer 0.10...  no.
    Done running configuration tests.
       Configure summary
    Build type:    macx-clang (x86_64, CPU features: cx16 mmx sse sse2 sse3 ssse3)
    Build options:
      Configuration .......... accessibility audio-backend avx avx2 c++11 c++14 c++1z compile_examples concurrent corewlan cups dbus freetype full-config getaddrinfo getifaddrs harfbuzz iconv ipv6ifname large-config largefile medium-config minimal-config no-libdl no-pkg-config opengl pcre png precompile_header qpa qpa qt_framework reduce_exports release rpath securetransport shared small-config sse2 sse3 sse4_1 sse4_2 ssl ssse3 system-zlib 
      Build parts ............ libs tools
      Mode ................... release
      Using sanitizer(s)...... none
      Using C++ standard ..... c++1z
      Using gold linker....... no
      Using new DTAGS ........ no
      Using PCH .............. yes
      Using LTCG ............. no
      Target compiler supports:
        SSE2/SSE3/SSSE3 ...... yes/yes/yes
        SSE4.1/SSE4.2 ........ yes/yes
        AVX/AVX2 ............. yes/yes
    Qt modules and options:
      Qt D-Bus ............... yes (loading dbus-1 at runtime)
      Qt Concurrent .......... yes
      Qt GUI ................. yes
      Qt Widgets ............. yes
      Large File ............. yes
      QML debugging .......... yes
      Use system proxies ..... no
    Support enabled for:
      Accessibility .......... yes
      ALSA ................... no
      CUPS ................... yes
      Evdev .................. no
      FontConfig ............. no
      FreeType ............... yes (bundled copy)
      Glib ................... no
      GStreamer .............. no
      GTK theme .............. no
      HarfBuzz ............... yes (bundled copy)
      Iconv .................. yes
      ICU .................... no
      Image formats: 
        GIF .................. yes (plugin, using bundled copy)
        JPEG ................. yes (plugin, using bundled copy)
        PNG .................. yes (in QtGui, using bundled copy)
      libinput................ no
      Logging backends: 
        journald ............... no
        syslog   ............... no
      mtdev .................. no
      Networking: 
        CoreWlan ............. yes
        getaddrinfo .......... yes
        getifaddrs ........... yes
        IPv6 ifname .......... yes
        libproxy.............. no
        OpenSSL .............. no
        SecureTransport ...... yes
      OpenGL / OpenVG: 
        EGL .................. no
        OpenGL ............... desktop
        OpenVG ............... no
      PCRE ................... yes (bundled copy)
      pkg-config ............. no 
      PulseAudio ............. no
      QPA backends: 
        DirectFB ............. no
        EGLFS ................ no
          EGLFS i.MX6 ........ no
          EGLFS i.MX6 Wayland. no
          EGLFS EGLDevice .... no
          EGLFS GBM .......... no
          EGLFS Mali ......... no
          EGLFS Raspberry Pi . no
          EGLFS X11 .......... no
        LinuxFB .............. no
        Mir client............ no
        XCB .................. no
      Session management ..... yes
      SQL drivers: 
        DB2 .................. no
        InterBase ............ no
        MySQL ................ no
        OCI .................. no
        ODBC ................. yes (plugin)
        PostgreSQL ........... yes (plugin)
        SQLite 2 ............. no
        SQLite ............... yes (plugin, using bundled copy)
        TDS .................. no
      tslib .................. no
      udev ................... no
      xkbcommon-x11........... no
      xkbcommon-evdev......... no
      zlib ................... yes (system library)
    Info: creating super cache file /Users/gaspa/Qt/5.6/Src/.qmake.super
    Info: creating stash file /Users/gaspa/Qt/5.6/Src/.qmake.stash
    Qt is now configured for building. Just run 'make'.
    Once everything is built, you must run 'make install'.
    Qt will be installed into /usr/local/Qt-5.6.2
    Prior to reconfiguration, make sure you remove any leftovers from
    the previous build.
    

    And make breaks here:

    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -pipe -stdlib=libc++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.7 -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -O2 -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -fPIC -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_DATASTREAM -DHAVE_XCTEST -DQT_BUILD_TESTLIB_LIB -DQT_BUILDING_QT -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_CORE_LIB -I. -I../../include -I../../include/QtTest -I../../include/QtTest/5.6.2 -I../../include/QtTest/5.6.2/QtTest -I../../include/QtCore/5.6.2 -I../../include/QtCore/5.6.2/QtCore -I../../include/QtCore -I.moc -I../../mkspecs/macx-clang -F/Users/gaspa/Qt/5.6/Src/qtbase/lib -x objective-c++-header -c ../../include/QtTest/QtTestDepends -o .pch/QtTest/objective-c++.pch
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -Xclang -include-pch -Xclang .pch/QtTest/objective-c++.pch -pipe -stdlib=libc++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.7 -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -O2 -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -fPIC -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_DATASTREAM -DHAVE_XCTEST -DQT_BUILD_TESTLIB_LIB -DQT_BUILDING_QT -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_CORE_LIB -I. -I../../include -I../../include/QtTest -I../../include/QtTest/5.6.2 -I../../include/QtTest/5.6.2/QtTest -I../../include/QtCore/5.6.2 -I../../include/QtCore/5.6.2/QtCore -I../../include/QtCore -I.moc -I../../mkspecs/macx-clang -F/Users/gaspa/Qt/5.6/Src/qtbase/lib -o .obj/qtestutil_macos.o qtestutil_macos.mm
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -Xclang -include-pch -Xclang .pch/QtTest/objective-c++.pch -pipe -stdlib=libc++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.7 -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -O2 -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -fPIC -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_DATASTREAM -DHAVE_XCTEST -DQT_BUILD_TESTLIB_LIB -DQT_BUILDING_QT -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_CORE_LIB -I. -I../../include -I../../include/QtTest -I../../include/QtTest/5.6.2 -I../../include/QtTest/5.6.2/QtTest -I../../include/QtCore/5.6.2 -I../../include/QtCore/5.6.2/QtCore -I../../include/QtCore -I.moc -I../../mkspecs/macx-clang -F/Users/gaspa/Qt/5.6/Src/qtbase/lib -o .obj/qxctestlogger.o qxctestlogger.mm
    In file included from qxctestlogger.mm:41:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTest.h:35:
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCAbstractTest.h:34:1: error: unknown type name 'NS_ASSUME_NONNULL_BEGIN'
    NS_ASSUME_NONNULL_BEGIN
    ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCAbstractTest.h:36:2: error: prefix attribute must be followed by an interface or protocol
    @class XCTestRun;
     ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCAbstractTest.h:81:32: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
          [-Wnullability-completeness]
    - (void)performTest:(XCTestRun *)run;
                                   ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCAbstractTest.h:81:32: note: insert '_Nullable' if the pointer may be null
    - (void)performTest:(XCTestRun *)run;
                                   ^
                                    _Nullable
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCAbstractTest.h:81:32: note: insert '_Nonnull' if the pointer should never be null
    - (void)performTest:(XCTestRun *)run;
                                   ^
                                    _Nonnull
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCAbstractTest.h:103:1: error: unknown type name 'NS_ASSUME_NONNULL_END'
    NS_ASSUME_NONNULL_END
    ^
    

    Any idea?
    (and just for curiosity, I gave -nomake tests, why it's using XCTest?)

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

      Hi and welcome to devnet,

      There's no need to rebuild all of Qt for just one module.

      You can build only the QtWebengine module with the Qt version you are currently using.

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

        Hi, thanks but... how can i build only that module?
        I tried with the installed version, but:

        $ make
        cd src/ && ( test -e Makefile || /Users/gaspa/Qt/5.6/clang_64/bin/qmake /Users/gaspa/Qt/5.6/Src/qtwebengine/src/src.pro WEBENGINE_CONFIG+=use_proprietary_codecs -o Makefile ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile 
        /Users/gaspa/Qt/5.6/Src/qtbase/bin/qmake WEBENGINE_CONFIG+=use_proprietary_codecs -o Makefile src.pro
        cd core/ && ( test -e Makefile || /Users/gaspa/Qt/5.6/Src/qtbase/bin/qmake /Users/gaspa/Qt/5.6/Src/qtwebengine/src/core/core.pro WEBENGINE_CONFIG+=use_proprietary_codecs -o Makefile ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile 
        /Users/gaspa/Qt/5.6/Src/qtbase/bin/qmake WEBENGINE_CONFIG+=use_proprietary_codecs -o Makefile core.pro
        ( test -e Makefile.core_headers || /Users/gaspa/Qt/5.6/Src/qtbase/bin/qmake /Users/gaspa/Qt/5.6/Src/qtwebengine/src/core/core_headers.pro WEBENGINE_CONFIG+=use_proprietary_codecs -o Makefile.core_headers ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile.core_headers 
        Project ERROR: Unknown module(s) in QT: core gui
        make[2]: *** [sub-core_headers-pro-make_first] Error 3
        make[1]: *** [sub-core-make_first] Error 2
        make: *** [sub-src-make_first] Error 2
        

        ( from a clean versions of sources, I run configure as before, and qmake WEBENGINE_CONFIG+=use_proprietary_codecs )

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

          Usually:

          mkdir build_qtwebengine
          cd build_qtwebengine
          /path/to/your/installed_Qt/bin/qmake /path/to/your/installed_Qt/sources/qtwebengine
          make
          make install
          

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

          G 1 Reply Last reply
          0
          • SGaistS SGaist

            Usually:

            mkdir build_qtwebengine
            cd build_qtwebengine
            /path/to/your/installed_Qt/bin/qmake /path/to/your/installed_Qt/sources/qtwebengine
            make
            make install
            
            G Offline
            G Offline
            gaspa
            wrote on last edited by
            #5

            @SGaist , that's exactly what i did ;)

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

              Just to be sure: out of source build from the root of the QtWebengine module ?

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

              G 1 Reply Last reply
              0
              • SGaistS SGaist

                Just to be sure: out of source build from the root of the QtWebengine module ?

                G Offline
                G Offline
                gaspa
                wrote on last edited by
                #7

                Yep, exactly.
                In the meanwhile, we compiled everything on a 10.11

                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