Xcode 11 GM - error: accessing build database - disk I/O error

泪湿孤枕 提交于 2020-01-02 08:56:16

问题


Encountering following error when only building a "Universal Binary Framework" for release distribution. Same project and settings works when building "Non-Universal" scheme in debug or release mode.

Project uses Objective-C & Xcode 11 GM (11A419c). Now, updating to Xcode 11 GM Seed 2 (11A420a).

error: accessing build database "/Users/john.doe/Library/Developer/Xcode/DerivedData/FrameworkSDK-esxhqchxkdevuiapyebthsdscpje/Build/Intermediates.noindex/XCBuildData/build.db": disk I/O error

Using following build command from a script:

xcodebuild -workspace ${PROJECT_NAME}.xcworkspace -scheme ${PROJECT_NAME} -sdk iphonesimulator -configuration ${CONFIGURATION} only_active_arch=no defines_module=yes clean build CONFIGURATION_BUILD_DIR=${BUILD_DIR}/${CONFIGURATION}-iphonesimulator 2>&1

Tried a few steps: Complete clean, pod update and steps mentioned on Related error for Xcode 10 & linked post - Doesn't solve this issue

No Answer on this question:
why error "accessing build database disk I/O error"?


回答1:


Use Command Line Tools for Xcode 11

Ensuring that correct version of Command Line Tools (xcodebuild) is used works with complete clean & building universal framework fresh. And the project is using New Build System (Default). It also worked with Xcode 11 GM - Build 11A419c (seed 1).

Use following command to ensure proper link:

xcodebuild -version
Xcode 11.0
Build version 11A419c

Earlier it was using the old Xcode10.2 xcodebuild.

Alternative workaround(s)

Not a good fix as it usages Legacy Build System instead of modern system with Xcode 11.

  1. One option is to use Legacy Build System with Shared Project Settings when for universal framework projects.

  2. Tried using undocumented xcodebuild parameter -UseModernBuildSystem=NO, it didn't work. [working on command line fix, will update]

Relevant release note: for GM-2 seed: Released September 16, 2019 Build 11A420a

An XCFramework makes it possible to bundle a binary framework or library for multiple platforms —including iOS devices, iOS simulators, and Mac Catalyst — into a single distributable .xcframework bundle that your developers can use within their own applications. An .xcframework bundle can be added to an Xcode target’s Link Libraries phase and Xcode uses the right platform’s version of the included framework or library at build time. Creation of frameworks is supported from the command line using xcodebuild -create-xcframework. Frameworks or libraries bundled in an XCFramework should be built with the Build Libraries for Distribution build setting set to YES. (49948269)



来源:https://stackoverflow.com/questions/57964543/xcode-11-gm-error-accessing-build-database-disk-i-o-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!