Building Qt 5.8 on macOS 10.12 with Xcode 8.3. (clang 8.1)



  • I was on OSX 10.11 using clang 8.0 for a while and I was able to build Qt 5.8 without a problem. However I recently upgraded macOS and XCode and now I'm not able to build QtWebEngine. I see:

    Using extra options found in /Users/<USER>/Downloads/qt-5.8.0-src/src/core/qmake_extras.gypi
    Updating projects from gyp files...
    Exception: unexpected indent (qmake_extras.gypi, line 21)
    Traceback (most recent call last):
      File "/Users/<USER>/Downloads/qt-5.8.0-src/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 496, in CallLoadTargetBuildFile
        includes, depth, check, False)
      File "/Users/<USER>/Downloads/qt-5.8.0-src/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 391, in LoadTargetBuildFile
        includes, True, check)
      File "/Users/<USER>/Downloads/qt-5.8.0-src/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 263, in LoadOneBuildFile
        aux_data, includes, check)
      File "/Users/<USER>/Downloads/qt-5.8.0-src/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 300, in LoadBuildFileIncludesIntoDict
        LoadOneBuildFile(include, data, aux_data, None, False, check),
      File "/Users/<USER>/Downloads/qt-5.8.0-src/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 243, in LoadOneBuildFile
        None)
      File "<string>", line 21
        ['CC', '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang'],
        ^
    IndentationError: unexpected indent while reading includes of /Users/<USER>/Downloads/qt-5.8.0-src/qtwebengine/src/core/resources/resources.gyp
    
    Exception: unexpected indent (qmake_extras.gypi, line 21)
    Traceback (most recent call last):
      File "/Users/<USER>/Downloads/qt-5.8.0-src/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 496, in CallLoadTargetBuildFile
        includes, depth, check, False)
      File "/Users/<USER>/Downloads/qt-5.8.0-src/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 391, in LoadTargetBuildFile
        includes, True, check)
      File "/Users/<USER>/Downloads/qt-5.8.0-src/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 263, in LoadOneBuildFile
        aux_data, includes, check)
      File "/Users/<USER>/Downloads/qt-5.8.0-src/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 300, in LoadBuildFileIncludesIntoDict
        LoadOneBuildFile(include, data, aux_data, None, False, check),
      File "/Users/<USER>/Downloads/qt-5.8.0-src/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 243, in LoadOneBuildFile
    

    I've reconfigured, tried to clean, but I can't get it to build. Suggestions?


  • Lifetime Qt Champion

    Hi,

    What version of python are you running ?



  • I want to say 2.7 or 2.8 (I'm not on that machine right now). What version is required?



  • The output says:

    using python: /usr/bin/python version: 2.7.10
    xcode version: Xcode 8.3.2 Build version 8E2002 
    Using extra options found in /Users/myusername/Downloads/qt-5.8.0-src/qtwebengine/src/core/qmake_extras.gypi
    Using extra options found in /Users/myusername/Downloads/qt-5.8.0-src/qtwebengine/src/core/qtwebengine_extras.gypi
    Using extra options found in /Users/myusername/Downloads/qt-5.8.0-src/qtwebengine/src/core/qmake_extras.gypi
    Using extra options found in /Users/myusername/Downloads/qt-5.8.0-src/qtwebengine/src/core/qtwebengine_extras.gypi
    Updating projects from gyp files...
    Exception: unexpected indent (qmake_extras.gypi, line 21)
    Exception: unexpected indent (qmake_extras.gypi, line 21)
    Traceback (most recent call last):
      File "/Users/myusername/Downloads/qt-5.8.0-src/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 496, in CallLoadTargetBuildFile
        includes, depth, check, False)
      File "/Users/myusername/Downloads/qt-5.8.0-src/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 391, in LoadTargetBuildFile
        includes, True, check)
      File "/Users/myusername/Downloads/qt-5.8.0-src/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 263, in LoadOneBuildFile
        aux_data, includes, check)
      File "/Users/myusername/Downloads/qt-5.8.0-src/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 300, in LoadBuildFileIncludesIntoDict
        LoadOneBuildFile(include, data, aux_data, None, False, check),
      File "/Users/myusername/Downloads/qt-5.8.0-src/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 243, in LoadOneBuildFile
        None)
      File "<string>", line 21
        ['CC', '/Applications/Xcode.app/ConTraceback (most recent call last):
      File "/Users/myusername/Downloads/qt-5.8.0-src/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 496, in CallLoadTargetBuildFile
        includes, depth, check, False)
      File "/Users/myusername/Downloads/qt-5.8.0-src/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 391, in LoadTargetBuildFile
        includes, True, check)
      File "/Users/myusername/Downloads/qt-5.8.0-src/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 263, in LoadOneBuildFile
        aux_data, includes, check)
      File "/Users/myusername/Downloads/qt-5.8.0-src/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 300, in LoadBuildFileIncludesIntoDict
        LoadOneBuildFile(include, data, aux_data, None, False, check),
      File "/Users/myusername/Downloads/qt-5.8.0-src/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 243, in LoadOneBuildFile
        None)
      File "<string>", line 21
        ['CC', '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang'],
        ^
    IndentationError: unexpected indent while reading includes of /Users/myusername/Downloads/qt-5.8.0-src/qtwebengine/src/core/resources/resources.gyp
    tents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang'],
        ^
    IndentationError: unexpected indent while reading includes of /Users/myusername/Downloads/qt-5.8.0-src/qtwebengine/src/core/core_generated.gyp
    
    
    Project ERROR: -- running gyp_qtwebengine failed --
    

  • Lifetime Qt Champion

    What parameter(s) did you pass to configure ?


Log in to reply