Build fails using build-wrapper-macosx-x86 v6.3

Hi.
We have so problems to build our code with build-wrapper-macosx-x86.

When we use build wrapper we get the following error:

dyld: warning: could not load inserted library ‘/Users/bambooagent/Documents/build-wrapper-macosx-x86/libinterceptor.dylib’ into hardened process because no suitable image found. Did find:

  •    /Users/bambooagent/Documents/build-wrapper-macosx-x86/libinterceptor.dylib: code signature in (/Users/bambooagent/Documents/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.*
    
  •    /Users/bambooagent/Documents/build-wrapper-macosx-x86/libinterceptor.dylib: stat() failed with errno=1*
    

build-wrapper: read signature: Operation timed out
*** BUILD FAILED ***

Without the wrapper we don’t have any issues.

Environment:
build-wrapper, version 6.3 (macosx-x86)
macOS Mojave Version 10.14.5
Xcode Version 11.1

Hi @fabioferreira,

could you please update SonarCFamily analyzer and build-wrapper to their latest version 6.6 and retry?

Hi Massimo.
With build wrapper servion 6.5 we get this results:

dyld: warning: could not load inserted library ‘/Users/bambooagent/Downloads/build-wrapper-macosx-x86-2/libinterceptor.dylib’ into hardened process because no suitable image found. Did find:
/Users/bambooagent/Downloads/build-wrapper-macosx-x86-2/libinterceptor.dylib: code signature in (/Users/bambooagent/Downloads/build-wrapper-macosx-x86-2/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.
/Users/bambooagent/Downloads/build-wrapper-macosx-x86-2/libinterceptor.dylib: stat() failed with errno=1
build-wrapper: read signature: Operation timed out
** BUILD FAILED **

The following build commands failed:
ProcessPCH DerivedData/Build/Intermediates.noindex/PrecompiledHeaders/PrefixHeader-gzkhsihprcbyslaebxccfayvpmot/PrefixHeader.pch.pch app4entry/Application/PrefixHeader.pch normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

Aditionaly we have this:

build-wrapper: connect to /tmp/build-wrapper-socket.yOGxNp: Connection refused
build-wrapper: connect to /tmp/build-wrapper-socket.yOGxNp: Connection refused
build-wrapper: connect to /tmp/build-wrapper-socket.yOGxNp: Connection refused
build-wrapper: connect to /tmp/build-wrapper-socket.yOGxNp: Operation timed out
build-wrapper: connect to /tmp/build-wrapper-socket.yOGxNp: Connection refused
build-wrapper: read signature: Operation timed out
build-wrapper: read signature: Operation timed out
|build-wrapper: read signature: Operation timed out

Hi @fabioferreira,

could you try to launch a simple build-wrapper-macosx-x86 --out-dir mydir clang -c hello.c and see what happens? Does it work properly?

We never faced such issue, difficult to imagine what could be wrong.

Hi @mpaladin.
I got this:

MacRemoteAgent3:build-wrapper-macosx-x86-2 bambooagent$ vim hello.c
MacRemoteAgent3:build-wrapper-macosx-x86-2 bambooagent$ ./build-wrapper-macosx-x86 --out-dir mydir clang -c hello.c
MacRemoteAgent3:build-wrapper-macosx-x86-2 bambooagent$ ls
build-wrapper-macosx-x86 hello.c hello.o libinterceptor.dylib mydir
MacRemoteAgent3:build-wrapper-macosx-x86-2 bambooagent$ clang hello.o
MacRemoteAgent3:build-wrapper-macosx-x86-2 bambooagent$ ls
a.out build-wrapper-macosx-x86 hello.c hello.o libinterceptor.dylib mydir
MacRemoteAgent3:build-wrapper-macosx-x86-2 bambooagent$ ./a.out
Hello, World!
MacRemoteAgent3:build-wrapper-macosx-x86-2 bambooagent$ cd mydir/
MacRemoteAgent3:mydir bambooagent$ ls
build-wrapper-dump.json build-wrapper.log

logs

Hi @fabioferreira,

this works properly and as expected.

I am not sure to know what could be wrong when you run xcodebuild, are you able to reproduce it locally or do you get such problem only on bamboo?

Hi @mpaladin.

Running from the developer mac the problem is the same.

Hi @fabioferreira,

do you have any other software installed which may interfere?

With this configuration build-wrapper works properly, tested on Azure devops.

A post was split to a new topic: Build-wrapper on macOS: libinterceptor.dylib: stat() failed with errno=1