Created attachment 214257 [details] asterisk16-unsafe.diff IMHO: because bundled pjproject requires MAKE_JOBS_UNSAFE=yes
Created attachment 214258 [details] build_ok.log no full, size too much
Created attachment 214259 [details] build_failed.log
Created attachment 214260 [details] asterisk16.diff added net/uriparser
(In reply to Dmitry Wagin from comment #3) > added net/uriparser Exactly why this addition? can you elaborate? Regarding the JOBS_UNSAFE, I'm going to investigate a little. Stand alone pjsip port did not show such behaviour and no failure was ever reported, so maybe it can be fixed with a patch that removes the race condition. Adding MAKE_JOBS_UNSAFE=yes would make the build definitely slow, which I'd like to avoid.
(In reply to Guido Falsi from comment #4) > Exactly why this addition? can you elaborate? To make my question clearer, why that option is attached to the CURL one, why not add a specific option.
(In reply to Guido Falsi from comment #4) Sorry, I forgot, pjsip port already had MAKE_JOBS_UNSAFE. I'm anyway looking for a solution, maybe make only the pjproject part avoid parallelization.
(In reply to Guido Falsi from comment #5) IMHO this dependency does make sense only when using curl for bucket scheme http and https
Regarding the race condition in the build requiring MAKE_JOBS_UNSAFE, I think I have identified all the problems in the upstream Makefile and created a patch, which I filed upstream. I'm planning to send a patch to the asterisk repository too. I'm going to attach a patch for the affected ports (asterisk ports and teh pjsip port) shortly. I'd ask you to test the patch I'm going to attach to make sure the instability in the build is really solved. Upstream pull request: https://github.com/pjsip/pjproject/pull/2426 Regarding the uriparser addition I think I'll add it as a separate option. Will followup with a patch for this too.
Created attachment 214272 [details] asterisk16 patch Adding a patch resolving the race conditions causing random build failure inn pjproject. Please test this to confirm the build is now stable. I have been running it multiple times (also on the asterisk13 port, which requires a slightly different patch though), and seen no failure after a dozen builds each.
Created attachment 214274 [details] asterisk16-full.diff separate uriparser option, some style changes
compiled several times, everything is normal
A commit references this bug: Author: madpilot Date: Fri May 8 15:09:27 UTC 2020 New revision: 534404 URL: https://svnweb.freebsd.org/changeset/ports/534404 Log: Add patches fixing race condition in build system. This allows removing MAKE_JOBS_UNSAFE. PR: 246300 Submitted by: Dmitry Wagin <dmitry.wagin@ya.ru> Changes: head/net/pjsip/Makefile head/net/pjsip/files/patch-build_rules.mak head/net/pjsip/files/patch-pjsip_build_Makefile
A commit references this bug: Author: madpilot Date: Fri May 8 15:10:37 UTC 2020 New revision: 534405 URL: https://svnweb.freebsd.org/changeset/ports/534405 Log: Add patch for bundled pjproject to avoid failed builds due to race conditions. PR: 246300 Submitted by: Dmitry Wagin <dmitry.wagin@ya.ru> Changes: head/net/asterisk13/Makefile head/net/asterisk13/files/0050-fix-race-parallel-build.patch
A commit references this bug: Author: madpilot Date: Fri May 8 15:11:03 UTC 2020 New revision: 534406 URL: https://svnweb.freebsd.org/changeset/ports/534406 Log: Add patch for bundled pjproject to avoid failed build due to race conditions. PR: 246300 Submitted by: Dmitry Wagin <dmitry.wagin@ya.ru> Changes: head/net/asterisk16/Makefile head/net/asterisk16/files/0050-fix-race-parallel-build.patch
A commit references this bug: Author: madpilot Date: Sat May 9 15:45:42 UTC 2020 New revision: 534784 URL: https://svnweb.freebsd.org/changeset/ports/534784 Log: - Add new URIPARSER option, enabled by default - Change to CONFIGURE_WITH options helper where applicable PR: 246300 Submitted by: Dmitry Wagin <dmitry.wagin@ya.ru> Changes: head/net/asterisk13/Makefile
A commit references this bug: Author: madpilot Date: Sat May 9 15:46:06 UTC 2020 New revision: 534785 URL: https://svnweb.freebsd.org/changeset/ports/534785 Log: - Add new URIPARSER option, enabled by default - Change to CONFIGURE_WITH options helper where applicable PR: 246300 Submitted by: Dmitry Wagin <dmitry.wagin@ya.ru> Changes: head/net/asterisk16/Makefile
All patches committed. Thanks!