Build-wrapper is failing for swift package manager

sonarcfamily
build-wrapper
obj-c
sonarqube

(Muddsar) #1

Hi,
i am trying to setup sonarqube for my objective-c project. when i run the build-wrapper-macosx-x86 with xcodebuild command it fails. the reason is i have a build script which runs as part of xcodebuild command. Here is the line which is failing in script and error generated

swift build //fails here

ERROR
build-wrapper: connect to /tmp/build-wrapper-socket.Cm9387: Operation not permitted


(Loïc Joly) #3

Hello Muddsar,

Sorry for the long delay since you asked this question. Do you still have an issue with the build wrapper? If so, could you please provide us with the build-wrapper.log file in your build wrapper folder?

Thank you,


(Muddsar) #4

Hi,
We are not using build wrapper anymore as it was taking too long in the pipeline, It was adding 40 minutes into our pipeline so we stopped using it.

Thanks
Muddsar


(Loïc Joly) #5

I’m sorry to learn that…

I assume that it is not the build wrapper in itself that was adding to build time, but the sonar-scanner that was launched using the result of the build-wrapper. Am I right?

To help us understand the issue, can you tell us what is your total build time?

We are having good results in running CFamily plugin on multiple threads (as long as the hardware is powerful enough, of course… for instance we divided the time by about 16 on a 16 core machine), have you tried that?


(Muddsar) #6

Yes you are right, it was sonar-scanner who was taking that much time as it was consuming the dump file generated by build wrapper.

originally the whole build time was around 80mins, i used the multiple threads feature with 4 core machine and it was reduced to 40mins which was still high for us.


(Loïc Joly) #7

Maybe you could try again with a more recent version, since we are using a new frontend, that is faster on some projects (and slower on some others, but more accurate in all cases). If available to you, you could also try a more powerful machine, with 16 cores for instance.


(Muddsar) #8

sure i will give it a try and update you. Thanks for your support