iOS Archive fails with "Export failed, error: signal: segmentation fault"

I am using the Xcode 9.0.x stack to build my project and it builds fine but fails when exporting the IPA:

 [04:03:04] set -o pipefail && xcodebuild "-exportArchive" "-archivePath" "/var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/__archive__667198746/Example.xcarchive" "-exportPath" "/var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/__export__804318044" "-exportOptionsPlist" "/Users/vagrant/deploy/export_options.plist" | xcpretty
If you can't find the reason of the error in the log, please check the raw-xcodebuild-output.log
The log file is stored in $BITRISE_DEPLOY_DIR, and its full path
is available in the $BITRISE_XCODE_RAW_RESULT_TEXT_PATH environment variable
Also please check the xcdistributionlogs
The logs directory is stored in $BITRISE_DEPLOY_DIR, and its full path
is available in the $BITRISE_IDEDISTRIBUTION_LOGS_PATH environment variable
Export failed, error: signal: segmentation fault

The logs don’t really help and show no error. Locally everything works fine.

1 Like

Ok, locally I use Xcode 9 GM, whereas the Xcode 9 stack uses a beta.

Hi @mbuchetics,

Xcode 9 GM just went out into production (Xcode 9.0 GM is now available!) - can you please try it with that and let us know how it goes?

Also, for accessing the full/raw xcodebuild log referenced in the log section you shared here, you can find the related guide at: Xcode exit code 65 / exit code 66 / raw-xcodebuild-output.log

1 Like

Hi, @viktorbenei the issue still persists in Xcode 9 GM and can also be reproduced locally. The problem is “compile bitcode = YES”, which causes Xcode 9 to crash when exporting an adhoc or enterprise build even when using the GUI. The issue is described in more detail here:
Disabling compile bitcode in the export archive step fixed the problem for me.

Good catch, thanks @mbuchetics! I also shared a related issue with the same fix (compile bitcode = NO):

What about compiling with Xcode 9 for the Appstore ? What’s the solution here?

@SkyFred27 this Xcode issue does not affect App Store exports, see:

AppStore exports are not affected :slight_smile:

Oh yes sorry :flushed:

No problem at all :wink: