OSX Mojave fails with build-wrapper-macosx-x86 (CompileXIB)

Versions:

  • build-wrapper, version 5.1 (macosx-x86) , and version 6.0 (macosx-x86)
  • Xcode 10.1
  • OS X Mojave 10.14.2

Error observed (In Mojave, not present in High Sierra):

[14:49:05]: [14:49:05]: ▸ ** ANALYZE FAILED **
[14:49:05]: [14:49:05]: ▸ The following commands produced analyzer issues:
[14:49:05]: [14:49:05]: ▸ Analyze /*PROJECT_2*/MConnection.m normal x86_64
[14:49:05]: [14:49:05]: ▸ Analyze /*PROJECT*/Pods/LGSideMenuController/LGSideMenuController/LGSideMenuController.m normal x86_64
[14:49:05]: [14:49:05]: ▸ Analyze /*PROJECT*/Pods/GRMustache/src/classes/Services/StandardLibrary/GRMustacheLocalizer.m normal x86_64
[14:49:05]: [14:49:05]: ▸ Analyze /*PROJECT*/Pods/GRMustache/src/classes/Parsing/GRMustacheTemplateParser.m normal x86_64
[14:49:05]: [14:49:05]: ▸ Analyze /*PROJECT*/Pods/zipzap/ZipZap/ZZInflateInputStream.m normal x86_64
[14:49:05]: [14:49:05]: ▸ Analyze /*PROJECT*/Pods/zipzap/ZipZap/ZZArchiveEntry.m normal x86_64
[14:49:05]: [14:49:05]: ▸ Analyze /*PROJECT*/Pods/zipzap/ZipZap/ZZArchive.mm normal x86_64
[14:49:05]: [14:49:05]: ▸ (7 commands with analyzer issues)
[14:49:05]: [14:49:05]: ▸ The following build commands failed:
[14:49:05]: [14:49:05]: ▸ CompileXIB /*PROJECT*/Pods/GTMOAuth2/Source/Touch/GTMOAuth2ViewTouch.xib
[14:49:05]: [14:49:05]: ▸ (1 failure)

Possibly relevant additional error:

dyld: warning: could not load inserted library '/*PATH*/build-wrapper-macosx-x86/libinterceptor.dylib' into hardened process because no suitable image found.  Did find:
[14:46:43]: ▸ /*PATH*/build-wrapper-macosx-x86/libinterceptor.dylib: code signature in (/*PATH*/build-wrapper-macosx-x86/libinterceptor.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
[14:46:43]: ▸ /*PATH*/build-wrapper-macosx-x86/libinterceptor.dylib: stat() failed with errno=1
[14:46:45]: ▸ 2019-01-03 14:46:45.548 xcodebuild[13094:99670]  DTDeviceKit: deviceType from 00008027-001D09081AE8002E was NULL

Steps to Reproduce:

  • unclear, happens 100% with this project. Project compiles fine without build-wrapper, but fails sonsistently in the same way with the build-wrapper

workaround:

  • I have yet to find any but would greatly appreciate suggestions

Is it possibly related to dynamic library blocking in Mojave?
https://lapcatsoftware.com/articles/debugging-mojave.html

Hi,

yes, you are affected by that issue, you can follow the ticket on development side waiting for a fix:
https://jira.sonarsource.com/browse/CPP-2056

To get it working in the mean time you have two options:

  • use Xcode 9 on Mojave
  • use High Sierra and Xcode 10

Looks like no votes on the ticket and no replies, any guesses as to when this will be done?

@cfaucon even though the ticket has no votes and no replies this doesn’t mean anything, it is going to be solved but at the moment we cannot make any promise. I would recommend you to watch the ticket.

@mpaladin

As far as I can see the above ticket was closed on 02/19 but I’m still getting the same error.

[16:42:55][Step 1/3] dyld: could not load inserted library ‘/build-wrapper-macosx-x86/libinterceptor.dylib’ because no suitable image found. Did find:
[16:42:55][Step 1/3] /build-wrapper-macosx-x86/libinterceptor.dylib: mach-o, but not built for iOS simulator
[16:42:55][Step 1/3]
[16:42:55][Step 1/3] cdtool exited abnormally
[16:42:55][Step 1/3] /DebugConsole/Model/StubData.xcdatamodel:: error: cdtool cannot compile [0]

macOS version: 10.14.4
xCode version: 10.2

Hi @Attila_Bujdoso,

regarding

The ticket has been resolved and released in 6.1, now 6.2 is available. Please remember to download fresh build-wrapper from you SonarQube server, it must be >= 6.1 to work with Xcode 10.
If the problem persist, please open a new topic to follow your issue.