OS X Building "dependencies" will fail if make runs jobs parallel
#1
On Mac OS 10.12.3 using Xcode 8.2.1 (7.3.2 too) compiling the build dependencies fails if "make -j[N]" is used.
Using "make" only has no problems.
Seems some dependencies not set well on those targets in ${KODI_ROOT}/tools/depends/.

I've tried this on main repository (https://github.com/xbmc/xbmc.git) using the master branch.

Could somebody verify this?

TIA!
Reply
#2
try less vague. what fails to build, caused by which dependency? if you cannot analyze post the build log. it's a race, so no guarantee others can trigger the same situation, it all depends on hardware, number of threads and all that jazz.
Reply
#3
https://github.com/HofiOne/xbmc/blob/mas...DME.osx.md

3.2 Install Kodi build depends

...

3.2.a Compiling as 64 bit libraries (recommended for most users)

...
In order to speedup compilation it is recommended to use make -j$(getconf _NPROCESSORS_ONLN) instead of make to compile on all available processor cores.
...

cd $HOME/Kodi
cd tools/depends
./bootstrap
./configure --host=x86_64-apple-darwin
make


using "make" will succeed
using "make -j[N]" where n > 1 will fail

I was trying on a MBPR with i7 and one with i5 processor
Reply
#4
heh. i heard you the first time, and i trust your word. but nobody can fix anything if we cannot see WHAT causes the failure. do
Code:
make -jN &> logfile
then pastebin the log file.
Reply
#5
I will attach a logfile tomorrow (as each build could take a very long time), but first I hoped someone will reproduce the problem (to confirm not i was doing something wrong or not my build environment is the reason)
As far as I can remember the failure could happen at different points and on different targets each time I tried to repeat the build (that is why I think it is some kind of target dependency problem, linear build is fine but depending on the available cores the parallel build could fail at different points)
Reply
#6
yeah, your analysis is spot on and i am 99% certain it is not build environment related. i wouldn't touch an apple machine unless at gun point personally, so i cannot reproduce, but i can read logs so that's how i can help.
Reply
#7
Jenkins builds -j6 each day multiple times. I build -j14 and can confirm that it fails 1 time out of 15 maybe. But i know my way around it Wink (rebuild the single lib that failed - then continue with -j14)
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#8
(2017-02-10, 08:42)Memphiz Wrote: Jenkins builds -j6 each day multiple times. I build -j14 and can confirm that it fails 1 time out of 15 maybe. But i know my way around it Wink (rebuild the single lib that failed - then continue with -j14)

I used -j4 -j6 -j8, all fail on two different machine :/
As a workaround I've also built the failing lib than retried, but sometimes i had to repeat it several time till succeeded.
What more, seems sometimes the .configuration part completely missed and first I had to run .configure than retry the make on the failing target. :S
Reply
#9
(2017-02-10, 01:40)ironic_monkey Wrote: yeah, your analysis is spot on and i am 99% certain it is not build environment related. i wouldn't touch an apple machine unless at gun point personally, so i cannot reproduce, but i can read logs so that's how i can help.

one of the failed builds log can be found here

https://drive.google.com/open?id=0ByYBPn...GMyM2JVSDQ
Reply
#10
this is funky. the m4-native and pkg-config-native targets failed instantly. this can possibly be networking issues (likely on the server) combined with the use of ; to separate commands in the makefiles (which won't halt on first error).

the more confusing one is the failure to invoke gcc in the yasm-native target, which i suspect is the same issue
as this
Code:
./configure: line 281: cannot create temp file for here document: Interrupted system call

that looks like this deep doodo in the chroot. just to rule out timing stuff; can you insert a sleep 1 prior to the make invocations in the $(NATIVE) targets in native/Makefile
Reply

Logout Mark Read Team Forum Stats Members Help
Building "dependencies" will fail if make runs jobs parallel0