Bug 263067 - net/unison: Build fails sometimes due to race condition
Summary: net/unison: Build fails sometimes due to race condition
Status: Closed Overcome By Events
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:
: 263393 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-04-05 16:52 UTC by Guido Falsi
Modified: 2023-08-10 15:06 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guido Falsi freebsd_committer freebsd_triage 2022-04-05 16:52:58 UTC
I'm filing this bug report against myself so it is properly tracked and to make it known I'm aware of the issue, but unable to fix it right away.

When building in parallel sometime unison (and unison251) fail with the error at the end of this message.

I've tried some simple changes to the Makefile but they did not fix it, in fact caused other errors.

I'm still looking for a solution, which requires time because I know very little about ocaml.

If anyone more fluent in ocaml than me could take a look and maybe easily spot the problem and give a pointer to me it would be greatly appreciated.

=======================<phase: build          >============================
===== env: NO_DEPENDS=yes USER=root UID=0 GID=0
===>  Building for unison-2.52.0
gmake[1]: Entering directory '/wrkdirs/usr/ports/net/unison/work-x11/unison-2.52.0/src'
/bin/sh: bash: not found
ocamlopt: compat408.mli ---> compat408.cmi
ocamlopt -g -I lwt -I ubase -I system -I fsmonitor -I fsmonitor/linux -I system/generic -I lwt/generic -I /usr/local/lib/ocaml/site-lib/lablgtk2  -pp "ocaml /wrkdirs/usr/ports/net/unison/work-x11/unison-2.52.0/src/configure.ml pp" -c /wrkdirs/usr/ports/net/unison/work-x11/unison-2.52.0/src/compat408.mli
ocamlopt: ubase/umarshal.mli ---> ubase/umarshal.cmi
ocamlopt -g -I lwt -I ubase -I system -I fsmonitor -I fsmonitor/linux -I system/generic -I lwt/generic -I /usr/local/lib/ocaml/site-lib/lablgtk2  -pp "ocaml /wrkdirs/usr/ports/net/unison/work-x11/unison-2.52.0/src/configure.ml pp" -c /wrkdirs/usr/ports/net/unison/work-x11/unison-2.52.0/src/ubase/umarshal.mli
ocamlopt: ubase/rx.mli ---> ubase/rx.cmi
ocamlopt -g -I lwt -I ubase -I system -I fsmonitor -I fsmonitor/linux -I system/generic -I lwt/generic -I /usr/local/lib/ocaml/site-lib/lablgtk2  -pp "ocaml /wrkdirs/usr/ports/net/unison/work-x11/unison-2.52.0/src/configure.ml pp" -c /wrkdirs/usr/ports/net/unison/work-x11/unison-2.52.0/src/ubase/rx.mli
File "/tmp/ocamlpp964623", line 1, characters 5-14:
Error: Unbound module Compat408
gmake[1]: *** [Makefile.OCaml:456: ubase/umarshal.cmi] Error 2
gmake[1]: *** Waiting for unfinished jobs....
gmake[1]: Leaving directory '/wrkdirs/usr/ports/net/unison/work-x11/unison-2.52.0/src'
===> Compilation failed unexpectedly.
Comment 1 Guido Falsi freebsd_committer freebsd_triage 2022-04-05 17:53:44 UTC
https://github.com/ocaml/ocaml/issues/9140

This ocaml bug looks somewhat related.
Comment 2 Guido Falsi freebsd_committer freebsd_triage 2022-04-18 19:59:54 UTC
*** Bug 263393 has been marked as a duplicate of this bug. ***
Comment 3 commit-hook freebsd_committer freebsd_triage 2022-04-19 08:07:31 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c46c155b02df4d51fc6e5868fb151918b0a07cc5

commit c46c155b02df4d51fc6e5868fb151918b0a07cc5
Author:     Guido Falsi <madpilot@FreeBSD.org>
AuthorDate: 2022-04-19 08:06:18 +0000
Commit:     Guido Falsi <madpilot@FreeBSD.org>
CommitDate: 2022-04-19 08:06:18 +0000

    net/unison251: Try to fix build failure due to race condition in Makefile

    PR:             263067
    MFH:            2022Q2

 net/unison251/files/patch-Makefile.OCaml | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)
Comment 4 commit-hook freebsd_committer freebsd_triage 2022-04-19 08:07:32 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0524bb607cfcc51b670796ab3232f690fd6ae9de

commit 0524bb607cfcc51b670796ab3232f690fd6ae9de
Author:     Guido Falsi <madpilot@FreeBSD.org>
AuthorDate: 2022-04-19 08:04:45 +0000
Commit:     Guido Falsi <madpilot@FreeBSD.org>
CommitDate: 2022-04-19 08:04:45 +0000

    net/unison: Try to fix build failure due to race condition in Makefile

    PR:             263067
    MFH:            2022Q2

 net/unison/files/patch-Makefile.OCaml | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)
Comment 5 commit-hook freebsd_committer freebsd_triage 2022-04-19 08:35:42 UTC
A commit in branch 2022Q2 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c9d13b150bf209302fbc8f6308ca89411f4d3a44

commit c9d13b150bf209302fbc8f6308ca89411f4d3a44
Author:     Guido Falsi <madpilot@FreeBSD.org>
AuthorDate: 2022-04-19 08:04:45 +0000
Commit:     Guido Falsi <madpilot@FreeBSD.org>
CommitDate: 2022-04-19 08:34:25 +0000

    net/unison: Try to fix build failure due to race condition in Makefile

    PR:             263067
    MFH:            2022Q2
    (cherry picked from commit 0524bb607cfcc51b670796ab3232f690fd6ae9de)

 net/unison/files/patch-Makefile.OCaml | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)
Comment 6 commit-hook freebsd_committer freebsd_triage 2022-04-19 08:35:43 UTC
A commit in branch 2022Q2 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=47c4c901458758f40f67554212a301fdb8045ff6

commit 47c4c901458758f40f67554212a301fdb8045ff6
Author:     Guido Falsi <madpilot@FreeBSD.org>
AuthorDate: 2022-04-19 08:06:18 +0000
Commit:     Guido Falsi <madpilot@FreeBSD.org>
CommitDate: 2022-04-19 08:34:38 +0000

    net/unison251: Try to fix build failure due to race condition in Makefile

    PR:             263067
    MFH:            2022Q2
    (cherry picked from commit c46c155b02df4d51fc6e5868fb151918b0a07cc5)

 net/unison251/files/patch-Makefile.OCaml | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)
Comment 7 Guido Falsi freebsd_committer freebsd_triage 2022-05-01 09:17:40 UTC
informational update:

I got new build failures from the cluster, so the patch I provided is ineffective.

Not being an ocaaml expert I'm not sure how to fix this at this point. I'll try to find other fixes, but I'm also quite open to suggestions and ideas.
Comment 8 Guido Falsi freebsd_committer freebsd_triage 2022-12-14 13:05:43 UTC
NOTE: The latest version in net/unison (2.53.0) is not affected by this issue.
Comment 9 Dutchman01 2022-12-28 23:39:14 UTC
(In reply to Guido Falsi from comment #8)

Is it easy to upgrade or need of new patches/refresh?
Comment 10 Guido Falsi freebsd_committer freebsd_triage 2022-12-29 08:15:59 UTC
(In reply to Dutchman01 from comment #9)

Not sure what you are asking.

The situation is:

the main port (net/unison) has been upgraded to 2.53.0 which is not affected.

The main port should be backwards compatible down to 2.52.0, so there is no need to keep preserving old releases anymore.

At present net/unison251 is still affected, and I have not been able to create a patch to fix it.
Comment 11 Guido Falsi freebsd_committer freebsd_triage 2023-08-10 15:06:25 UTC
Closing this since it looks like the ocaml update "fixed" it. I noticed no unexpected failures anymore since then.