Bug 246300 - net/asterisk16: Unstable build and add net/uriparser support
Summary: net/asterisk16: Unstable build and add net/uriparser support
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Guido Falsi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-08 06:13 UTC by Dmitry Wagin
Modified: 2020-05-09 15:48 UTC (History)
0 users

See Also:
madpilot: maintainer-feedback+


Attachments
asterisk16-unsafe.diff (625 bytes, patch)
2020-05-08 06:13 UTC, Dmitry Wagin
no flags Details | Diff
build_ok.log (556.64 KB, text/plain)
2020-05-08 06:16 UTC, Dmitry Wagin
no flags Details
build_failed.log (536.42 KB, text/plain)
2020-05-08 06:17 UTC, Dmitry Wagin
no flags Details
asterisk16.diff (1.06 KB, patch)
2020-05-08 06:18 UTC, Dmitry Wagin
no flags Details | Diff
asterisk16 patch (3.38 KB, patch)
2020-05-08 10:45 UTC, Guido Falsi
no flags Details | Diff
asterisk16-full.diff (5.22 KB, patch)
2020-05-08 12:49 UTC, Dmitry Wagin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Wagin 2020-05-08 06:13:38 UTC
Created attachment 214257 [details]
asterisk16-unsafe.diff

IMHO: because bundled pjproject requires MAKE_JOBS_UNSAFE=yes
Comment 1 Dmitry Wagin 2020-05-08 06:16:58 UTC
Created attachment 214258 [details]
build_ok.log

no full, size too much
Comment 2 Dmitry Wagin 2020-05-08 06:17:36 UTC
Created attachment 214259 [details]
build_failed.log
Comment 3 Dmitry Wagin 2020-05-08 06:18:32 UTC
Created attachment 214260 [details]
asterisk16.diff

added net/uriparser
Comment 4 Guido Falsi freebsd_committer 2020-05-08 08:19:01 UTC
(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.
Comment 5 Guido Falsi freebsd_committer 2020-05-08 08:19:58 UTC
(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.
Comment 6 Guido Falsi freebsd_committer 2020-05-08 08:39:11 UTC
(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.
Comment 7 Dmitry Wagin 2020-05-08 10:08:33 UTC
(In reply to Guido Falsi from comment #5)

IMHO this dependency does make sense only when using curl
for bucket scheme http and https
Comment 8 Guido Falsi freebsd_committer 2020-05-08 10:42:44 UTC
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.
Comment 9 Guido Falsi freebsd_committer 2020-05-08 10:45:12 UTC
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.
Comment 10 Dmitry Wagin 2020-05-08 12:49:06 UTC
Created attachment 214274 [details]
asterisk16-full.diff

separate uriparser option, some style changes
Comment 11 Dmitry Wagin 2020-05-08 12:51:04 UTC
compiled several times, everything is normal
Comment 12 commit-hook freebsd_committer 2020-05-08 15:10:10 UTC
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
Comment 13 commit-hook freebsd_committer 2020-05-08 15:11:12 UTC
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
Comment 14 commit-hook freebsd_committer 2020-05-08 15:11:13 UTC
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
Comment 15 commit-hook freebsd_committer 2020-05-09 15:45:48 UTC
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
Comment 16 commit-hook freebsd_committer 2020-05-09 15:46:50 UTC
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
Comment 17 Guido Falsi freebsd_committer 2020-05-09 15:48:38 UTC
All patches committed.

Thanks!