Carthage: Xcode 10.2 + HockeySDK — post-successful-xcodebuild `dsymutil` failure · possibly related to overridden `ARCHS`

Created on 21 Mar 2019  Â·  14Comments  Â·  Source: Carthage/Carthage

  • carthage install method: .pkg
  • which carthage:
    /usr/local/bin/carthage
  • carthage version:
    0.32.0
  • xcodebuild -version:
    Xcode 10.2
    Build version 10P99q
  • Are you using --no-build?
    no
  • Are you using --no-use-binaries?
    yes
  • Are you using --use-submodules?
    no
  • Are you using --cache-builds?
    no
  • Are you using --new-resolver?
    no

Cartfile

github "bitstadium/HockeySDK-iOS" ~> 5.1

Carthage Output

Build Failed
    Task failed with exit code 1:
    /usr/bin/xcrun dsymutil /Some/Path/HockeySDK -o /Some/Path/HockeySDK.framework.dSYM

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/4k/dzpnw8352jn_fl5hcc76pjs8k9qytq/T/carthage-xcodebuild.5w3BiI.log

Actual outcome
No details for this issue in logs just * BUILD SUCCEEDED *

Not sure if it is Carthage issue, but probably somebody faced with similar dsymutil.

Running dsymutil manually throws LLVM ERROR: IO failure on output stream: Bad file descriptor

Related issue for HockeySDK https://github.com/bitstadium/HockeySDK-iOS/issues/548

Expected outcome
Can see more logs why about dsymutil issue

bug possible-workaround

Most helpful comment

Hi there, I'm contacting from the product team building HockeyApp iOS SDK.

Our team investigated this issue on the HockeySDK and found the issue to be located in the dsymutil tool used by Carthage. There are 5 architectures in the HockeySDK executable - armv7, armv7s, arm64, x86_64, i386. Removing any one of these architectures solves the dsymutil issue. But removing an architecture in HockeySDK would only workaround the issue for the HockeySDK framework though by reading the issue linked by @nteissler, it's not the only framework facing the issue. Plus, some integrations might still explicitly support the missing architecture and it would be a breaking change for them.

A solution to solve the issue on Carthage directly would benefit any framework in the same situation. By digging a bit deeper, we found that adding some options to the dsymutil command (i.e. -verbose or -num-threads) also solves the issue while preserving all 5 architectures. A solution crafted around dsymutil options could be possible in Carthage around this line.

We would like this issue to be resolved to provide a seamless Carthage integration for HockeyApp customers. Please let us know the next steps on this issue as we are currently blocking our customers using Xcode 10.2+ and Carthage.

All 14 comments

Replied on the framework vendor’s issue thread with a note about removing overridden ARCHS and VALID_ARCHS build settings…

Not much is known about the root cause of this — but, that's the path to start down when looking for workarounds.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Hi there, I'm contacting from the product team building HockeyApp iOS SDK.

Our team investigated this issue on the HockeySDK and found the issue to be located in the dsymutil tool used by Carthage. There are 5 architectures in the HockeySDK executable - armv7, armv7s, arm64, x86_64, i386. Removing any one of these architectures solves the dsymutil issue. But removing an architecture in HockeySDK would only workaround the issue for the HockeySDK framework though by reading the issue linked by @nteissler, it's not the only framework facing the issue. Plus, some integrations might still explicitly support the missing architecture and it would be a breaking change for them.

A solution to solve the issue on Carthage directly would benefit any framework in the same situation. By digging a bit deeper, we found that adding some options to the dsymutil command (i.e. -verbose or -num-threads) also solves the issue while preserving all 5 architectures. A solution crafted around dsymutil options could be possible in Carthage around this line.

We would like this issue to be resolved to provide a seamless Carthage integration for HockeyApp customers. Please let us know the next steps on this issue as we are currently blocking our customers using Xcode 10.2+ and Carthage.

@clpolet can you please link issue by @nteissler, I can't seem to find it. I would like to understand what other frameworks are affected. https://github.com/Affirm/card.io-iOS-source/pull/1

I have reproduced the issue on CI and can confirm that adding -verbose or -numThreads=1 solves the issue. -verbose works because it also sets -numThreads=1.

Carthage doesn't ship with any custom version of dsymutil, it's just using the one packed with Xcode. So if the concurrent execution is not working this might a bug in llvm-dsymutil, however I don't see anything on their bugtracker

Possibly related to: https://bugs.llvm.org/show_bug.cgi?id=33520

I have opened a ticket on llvm's bugzilla, you can follow here: https://bugs.llvm.org/show_bug.cgi?id=41984

Following up here, though removing the armv7 arch from the build setting value in the .xcconfig file did allow our project to build, the architecture removal caused a cascade of architecture issues.

Instead, just removing the ARCHS value entirely from the .xcconfig and keeping the default value from the .xcodeproj file solved all the problems. This is assuming you don't need specific architectures, but even if you do, leaving it out of .xcconfig files might do the trick. This is a regrettable solution, as I find xcconfig files very useful

I just talked to @JDevlieghere in a lab at WWDC and this issue is fixed upstream, see https://llvm.org/viewvc/llvm-project?view=revision&revision=362621

Unfortunately, this will likely take a bit to make it into a stable version of Xcode.

What is the temporary resolution here. We are not able to build our project at the moment because of HockeySDK. I understand that HockeyApp doesn't want to change.
Can we hack/patch Carthage for now until llvm fix is released?

@c0diq you can either patch dsymutil as I explain in the bug report or you can patch cartage to run dsymutil with -numThreads=1 or -verbose

dsymutil is invoked by Carthage. What do you mean by patching dsymutil? Can this be done without modifying Carthage? It's not something we want to do on all our CI machines.
As far as patching Carthage, it doesn't seem that there's much traction here and I am not interested in maintaining my own fork.

@c0diq dsymutils is part of llvm, so you can clone the llvm repo and just build dsymutils then deploy it on your CI.

As far as forking Carthage, I would encourage that. There is nothing to maintain as things are already fixed in the new Xcode.

@blender @c0diq For unblocking HockeySDK usage, we are currently re-evaluating (at least temporarily) merging https://github.com/bitstadium/HockeySDK-iOS/pull/550

Alternatively, I think it should also be pretty safe to remove i386 from the simulator archs, probably not too many 32-bit Macs still around 🙂

Xcode 11 (beta 4) should include my fix for this issue.

Awesome, thanks @JDevlieghere !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

abbeyjackson picture abbeyjackson  Â·  3Comments

yonaskolb picture yonaskolb  Â·  3Comments

itinance picture itinance  Â·  3Comments

justinmakaila picture justinmakaila  Â·  4Comments

hamchapman picture hamchapman  Â·  3Comments