Re: BUG #15525: Build failures when compiling Postgres with Make parallelization
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: hi@alyssa.is
Cc: pgsql-bugs@lists.postgresql.org
Date: 2018-11-28T00:11:36Z
Lists: pgsql-bugs
=?utf-8?q?PG_Bug_reporting_form?= <noreply@postgresql.org> writes: > There have been multiple reports to the Nix package manager that compiling > PostgreSQL on macOS with Make's -j option have resulted in build failures. > As far as we know, this has only happened on macOS. This isn't too helpful if you don't mention which macOS version nor what sort of hardware exactly. Most PG developers use parallel builds routinely, so we know that it's not broken in general. For me, trying 9.6 branch on macOS Mojave (10.14.1) on a 2018 6-core MBP, "make -j" is unusable because the OS fails to support an indefinite number of processes: lots of commands fall over with messages like clang: error: unable to execute command: posix_spawn failed: Resource temporarily unavailable This is not a Postgres bug; maybe you could make a case that it's make's fault, but I'm not sure. It looks like a lot of the fork failures happen outside of make's view. However, if I use a more reasonable parallelism level like -j8, or even as high as -j25, it goes through fine. It doesn't look like there's any net reduction in build time above around -j10, so I'm not very excited about seeing whether it would fall over at some level short of what breaks the OS. Having said that, we did do a round of patches in the v11 development cycle that addressed some parallel-make hazards. A lot of said hazards were new in v11 :-(, but I think that some of them were pre-existing problems. So you might find that PG 11 is more resistant to whatever is going on here. BTW, are you using the Apple-supplied make, or some other version? In the past we've had to fight with parallelism bugs in old gmake versions ... regards, tom lane
Commits
-
Ensure static libraries have correct mod time even if ranlib messes it up.
- fe6ad3bd2c5c 9.5.16 landed
- bac66c6e7cf3 10.7 landed
- 8993d3a10d13 9.6.12 landed
- 826eff57c4c2 12.0 landed
- 0ff56de46eb0 11.2 landed
- 02d310471365 9.4.21 landed