Bug 261180 - devel/ocaml-opam: does not build on ARM
Summary: devel/ocaml-opam: does not build on ARM
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm Any
: --- Affects Some People
Assignee: Robert Clausecker
URL: https://www.freshports.org/devel/ocam...
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-13 14:32 UTC by Robert Clausecker
Modified: 2024-02-10 18:18 UTC (History)
5 users (show)

See Also:
bugzilla: maintainer-feedback? (hannes)
fuz: merge-quarterly?


Attachments
devel/ocaml-opam 2.1.2 build log on armv7 FreeBSD 13. (474.63 KB, text/plain)
2022-01-13 14:32 UTC, Robert Clausecker
no flags Details
Patch configure for armv7 support on FreeBSD (1.76 KB, patch)
2022-01-17 15:00 UTC, Hannes Mehnert
no flags Details | Diff
devel/ocaml-opam 2.1.2 build log after applying patch #231075 (474.63 KB, text/plain)
2022-01-17 16:21 UTC, Robert Clausecker
no flags Details
devel/ocaml-opam 2.1.2 build log after applying patch #231075 (474.42 KB, text/plain)
2022-01-17 16:56 UTC, Robert Clausecker
no flags Details
File oatch-src__ext_ocaml-patches_0001-Fix-relocation-ocaml-32-bit.patch (1.89 KB, patch)
2022-02-23 14:07 UTC, Hannes Mehnert
hannes: maintainer-approval+
Details | Diff
Patch for devel/ocaml-opam/Makefile (568 bytes, patch)
2022-02-23 14:08 UTC, Hannes Mehnert
hannes: maintainer-approval+
Details | Diff
0001-devel-ocaml-opam-Fix-build-on-armv7.patch (2.34 KB, patch)
2024-02-07 19:42 UTC, Benjamin Jacobs
hannes: maintainer-approval+
Details | Diff
0002-devel-ocaml-opam-GNUMake-run-dependency.patch (798 bytes, patch)
2024-02-07 19:42 UTC, Benjamin Jacobs
hannes: maintainer-approval+
Details | Diff
0001-devel-ocaml-opam-Fix-build-on-armv7.patch (2.58 KB, patch)
2024-02-08 14:46 UTC, Benjamin Jacobs
no flags Details | Diff
0002-devel-ocaml-opam-GNUMake-run-dependency.patch (807 bytes, patch)
2024-02-08 14:47 UTC, Benjamin Jacobs
no flags Details | Diff
0001-devel-ocaml-opam-Fix-build-on-armv7.patch (2.58 KB, patch)
2024-02-08 14:47 UTC, Benjamin Jacobs
no flags Details | Diff
0002-devel-ocaml-opam-GNUMake-run-dependency.patch (807 bytes, patch)
2024-02-08 14:47 UTC, Benjamin Jacobs
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Clausecker freebsd_committer freebsd_triage 2022-01-13 14:32:58 UTC
Created attachment 230990 [details]
devel/ocaml-opam 2.1.2 build log on armv7 FreeBSD 13.

An attempt to build this package in version 2.1.2 on armv7 FreeBSD 13 from branch 2022Q1 fails because an object file armv7.o cannot be built.

    gmake[4]: *** No rule to make target 'armv7.o', needed by 'libasmrun.a'.

This is likely because the architecture is detected as armv7 when it should be arm.  A source file arm.S exists and I suppose patching the configure script to set the architecture to arm even when armv6 or armv7 is detected might fix the build.

See attached build log for details.
Comment 1 Hannes Mehnert 2022-01-17 15:00:58 UTC
Created attachment 231075 [details]
Patch configure for armv7 support on FreeBSD

Thanks for your report. Please find attached a patch for the files subdirectory that should allow you to build devel/ocaml-opam on arm. Would you be able to test the patch and report back (since I don't have access to a FreeBSD arm system)?

Thanks a lot.
Comment 2 Robert Clausecker freebsd_committer freebsd_triage 2022-01-17 16:21:44 UTC
Created attachment 231080 [details]
devel/ocaml-opam 2.1.2 build log after applying patch #231075

Hi Hannes,

That seems to have not done the trick; the build fails with the same issue.  See attached build log for the failure.

Could it be that you need to patch the configure script in the bootstrap directory created during the build?
Comment 3 Hannes Mehnert 2022-01-17 16:29:11 UTC
(In reply to Robert Clausecker from comment #2)
Thanks for testing.

From your build output:

Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/configure b/configure
|index b1e287aed..4754e8ab2 100755
|--- a/configure
|+++ b/configure
--------------------------
Patching file configure using Plan A...
Hunk #1 succeeded at 14120.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/configure.ac b/configure.ac
|index 656ffe20c..1c9694805 100644
|--- a/configure.ac
|+++ b/configure.ac
--------------------------
Patching file configure.ac using Plan A...
Hunk #1 succeeded at 1070.
done
configure: Configuring OCaml version 4.12.1

This only shows a single hunk for each (configure/configure.ac) file -- which is the case for the current devel/ocaml-opam patch (files/patch-src__ext_ocaml_patches_0001-Fix-rela...), while my attachment above had a second hunk in each of the files (with the arm fix). Could you verify that your build actually had my attachment as patch applied?

This patch file is used after the ocaml compiler sources are unpacked, but before configure is executed.

Thanks a lot!
Comment 4 Hannes Mehnert 2022-01-17 16:53:21 UTC
(In reply to Hannes Mehnert from comment #3)
on my machine, the start of a make build looks like:

Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/configure b/configure
|index b1e287aed..4754e8ab2 100755
|--- a/configure
|+++ b/configure
--------------------------
Patching file configure using Plan A...
Hunk #1 succeeded at 13901.
Hunk #2 succeeded at 14122.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/configure.ac b/configure.ac
|index 656ffe20c..1c9694805 100644
|--- a/configure.ac
|+++ b/configure.ac
--------------------------
Patching file configure.ac using Plan A...
Hunk #1 succeeded at 971.
Hunk #2 succeeded at 1072.
done
configure: Configuring OCaml version 4.12.1

Notice the 2 hunks for both files.
Comment 5 Robert Clausecker freebsd_committer freebsd_triage 2022-01-17 16:56:22 UTC
Created attachment 231087 [details]
devel/ocaml-opam 2.1.2 build log after applying patch #231075

(In reply to Hannes Mehnert from comment #3)

Hi Hannes,

I had accidentally uploaded the wrong build log.

Here's the right one, showing that your patch took effect.
Comment 6 Hannes Mehnert 2022-01-19 09:57:03 UTC
(In reply to Robert Clausecker from comment #5)
Thanks for your updated log. In order to fix the issue, I wanted to setup a virtual armv7/FreeBSD system to have faster turnarounds.

I tried https://wiki.freebsd.org/QemuRecipes (i.e. using qemu and an FreeBSD 13 installer image), I can see the loader, but no kernel output (I put console=comsonsole in /boot/loader.conf and -Dh in /boot.config) -- instead qemu uses 100% CPU and I see a single "|" (maybe the spinner from the kernel?).

Do you have any experience / guidance on how to setup an emulated armv7 system on a FreeBSD/13.0/amd64 host?

Of course what you could try on your system is to remove the `model=armv7` from the patch attached in this PR (or set `model=armv6` -- it looks like OCaml on FreeBSD/arm is only support with the armv6), but I'm not sure that'll lead to a working package.
Comment 7 Robert Clausecker freebsd_committer freebsd_triage 2022-01-23 22:14:27 UTC
(In reply to Hannes Mehnert from comment #6)

Hi Hannes,

Unfortunately I have no experience with that.  I use a Raspberry Pi for ARM testing.
Comment 8 Mikael Urankar freebsd_committer freebsd_triage 2022-02-01 18:25:12 UTC
It's because the bootstrap tarball is extracted at build time:

step to reproduce:

modify work/opam-full-2.1.2/bootstrap/ocaml-4.12.1/configure.ac
chflags schg work/opam-full-2.1.2/bootstrap/ocaml-4.12.1/configure.ac

make
cd /usr/ports/devel/ocaml-opam/work/opam-full-2.1.2 && gmake compiler
gmake[2]: Entering directory '/usr/ports/devel/ocaml-opam/work/opam-full-2.1.2'
env MAKE=gmake BOOTSTRAP_EXTRA_OPTS= BOOTSTRAP_OPT_TARGET=opt.opt BOOTSTRAP_ROOT=.. BOOTSTRAP_DIR=bootstrap ./shell/bootstrap-ocaml.sh 
ocaml-4.12.1/configure.ac: Can't unlink already-existing object
tar: Error exit delayed from previous errors.
Comment 9 Mikael Urankar freebsd_committer freebsd_triage 2022-02-01 18:27:38 UTC
(In reply to Mikael Urankar from comment #8)
nevermind, the patch is applied with shell/bootstrap-ocaml.sh
Comment 10 Mikael Urankar freebsd_committer freebsd_triage 2022-02-01 19:02:44 UTC
You need to put NOPRECIOUSMAKEVARS=yes in the port Makefile (to not override ARCH in ocaml makefiles)
Comment 11 Stefan Grundmann 2022-02-21 14:08:08 UTC
the patch together with NOPRECIOUSMAKEVARS=yes in the port Makefile gave me a successful build on arm64 (NanoPi R4S).
Comment 12 Stefan Grundmann 2022-02-23 12:37:48 UTC
after more testing on arm.armv7 and arm64.aarch64 it seems that while the attached patch is not sufficient to fix the build it is a step in the right direction.

1. unmodified devel/ocaml-opam:

1.1 arm64.aarch64 FreeBSD 13 fails:
gmake[5]: *** No rule to make target 'aarch64.o', needed by 'libasmrun.a'.

1.2 arm.armv7 FreeBSD 13 fails:
gmake[5]: *** No rule to make target 'armv7.o', needed by 'libasmrun.a'.



2. with NOPRECIOUSMAKEVARS=yes in Makefile

2.1 arm64.aarch64 FreeBSD 13 succeeds

2.2 arm.armv7 FreeBSD 13 fails:
Makefile:920: *** The native-code compiler is not supported on this platform.


3. with NOPRECIOUSMAKEVARS=yes in Makefile and applied patch

3.1 arm64.aarch64 FreeBSD 13 succeeds

3.2 arm.armv7 FreeBSD 13 fails:
ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: caml_program in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in arm_libasmrunpic.o
>>> referenced by arm_libasmrunpic.o:(.text+0x1D0)

ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: Caml_state in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in domain.npic.o
>>> referenced by arm_libasmrunpic.o:(.text+0x1D4)

ld: error: can't create dynamic relocation R_ARM_ABS32 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in arm_libasmrunpic.o
>>> referenced by arm_libasmrunpic.o:(.text+0x1D8)

ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: caml_apply2 in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in arm_libasmrunpic.o
>>> referenced by arm_libasmrunpic.o:(.text+0x1DC)

ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: caml_apply3 in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in arm_libasmrunpic.o
>>> referenced by arm_libasmrunpic.o:(.text+0x1E0)

ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: caml_array_bound_error in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in fail_nat.npic.o
>>> referenced by arm_libasmrunpic.o:(.text+0x1E4)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[5]: *** [Makefile:311: libasmrun_shared.so] Error 1
Comment 13 Robert Clausecker freebsd_committer freebsd_triage 2022-02-23 13:44:49 UTC
(In reply to Stefan Grundmann from comment #12)

Thanks for your experiments!  This is very valuable.  I'll look into possibly patching the linker errors you posted.  -z notext is not the right solution usually.
Comment 14 Hannes Mehnert 2022-02-23 14:07:25 UTC
Created attachment 232043 [details]
File oatch-src__ext_ocaml-patches_0001-Fix-relocation-ocaml-32-bit.patch

Could you test this patch instead of the one posted earlier? This should also avoid the ld warning on arm.
Comment 15 Hannes Mehnert 2022-02-23 14:08:26 UTC
Created attachment 232044 [details]
Patch for devel/ocaml-opam/Makefile
Comment 16 Hannes Mehnert 2022-02-23 14:14:06 UTC
Thanks for testing. I uploaded a patch to replace the files/patch-src__ext_ocaml-patches_0001-Fix-relocation-ocaml-32-bit.patch and a patch for the Makefile. With both applied, does a build work on arm32?

> -z notext is not the right solution usually

There's a discussion in https://github.com/ocaml/ocaml/pull/10835 -- indeed there could be a nicer way (see https://github.com/ocaml/ocaml/pull/10835#issuecomment-1011266122 - with a (partial?) patch to avoid the issue on arm), but the attached patch may be sufficient and doesn't need to modify the assembly.
Comment 17 Stefan Grundmann 2022-02-23 17:16:02 UTC
arm.armv7 with patch from 2022-02-23 14:08 UTC and NOPRECIOUSMAKEVARS= yes in Makefile fails:

gmake[6]: Entering directory '/usr/ports/devel/ocaml-opam/work/opam-full-2.1.2/bootstrap/ocaml-4.12.1/stdlib'
../boot/ocamlrun ../ocamlopt -strict-sequence -absname -w +a-4-9-41-42-44-45-48 -g -warn-error A -bin-annot -nostdlib -principal -safe-string -strict-formats   -nopervasives -c camlinternalFormatBasics.ml
/tmp/camlasmccb845.s:58:1: error: symbol '.L116' is already defined
.L116:
^
/tmp/camlasmccb845.s:459:1: error: symbol '.L193' is already defined
.L193:
^
/tmp/camlasmccb845.s:861:1: error: symbol '.L280' is already defined
.L280:
^
File "/usr/ports/devel/ocaml-opam/work/opam-full-2.1.2/bootstrap/ocaml-4.12.1/stdlib/camlinternalFormatBasics.ml", line 1:
Error: Assembler error, input left in file /tmp/camlasmccb845.s
Comment 18 Benjamin Jacobs 2024-02-07 19:42:20 UTC
Created attachment 248241 [details]
0001-devel-ocaml-opam-Fix-build-on-armv7.patch
Comment 19 Benjamin Jacobs 2024-02-07 19:42:57 UTC
Created attachment 248242 [details]
0002-devel-ocaml-opam-GNUMake-run-dependency.patch
Comment 20 Benjamin Jacobs 2024-02-07 19:43:52 UTC
Hello,

Please consider applying the newly attached patches. The first one, 0001-devel-ocaml-opam-Fix-build-on-armv7.patch fixes this ticket. The text relocations issue is fixed by supplying LDFLAGS to the configure (hence no need to patch the OCaml configure script), and the later assembler issue reported by Stefan.

(In reply to Stefan Grundmann from comment #17)
It seems that ocaml generated assembly for ARM 32 contains duplicated (identical) sections, which GNU binutils happily processes. Fixed by setting USE_BINUTILS on ARM32 archs.

This patch is likley to fix armv6 and ppc32 as well.

The second patch, 0002-devel-ocaml-opam-GNUMake-run-dependency.patch adds gmake as run dep, as it is required for opam init to bootstrap an OCaml compiler. IOW it is required in most of the user use-cases, except for opam-install as part of some other (package).
Comment 21 Robert Clausecker freebsd_committer freebsd_triage 2024-02-07 19:47:12 UTC
Comment on attachment 248241 [details]
0001-devel-ocaml-opam-Fix-build-on-armv7.patch

Request maintainer approval.
Comment 22 Robert Clausecker freebsd_committer freebsd_triage 2024-02-07 19:47:51 UTC
Comment on attachment 248242 [details]
0002-devel-ocaml-opam-GNUMake-run-dependency.patch

Request maintainer approval.

Are there patches 3--6 or is it only these two?
Comment 23 Benjamin Jacobs 2024-02-07 19:58:03 UTC
(In reply to Robert Clausecker from comment #22)

Ah sorry this is only those two patches indeed. They were were sitting at the bottom of my patch queue which contains a gigantic, tree-wide, OCaml update (that I'll try to submit later once it gets more polished, but first thing first...).

Note that the previous 2 patches were validated on CURRENT and on armv7, i386 and amd64 using poudriere. Aarch64 is likely ok as well, however poudriere is still busy chewing the head of the queue at this time... :)
Comment 24 Benjamin Jacobs 2024-02-07 21:57:28 UTC
The 0001-devel-ocaml-opam-Fix-build-on-armv7.patch patch has been tested on CURRENT/arm64 as well.
Comment 25 Hannes Mehnert 2024-02-08 09:43:53 UTC
(In reply to Benjamin Jacobs from comment #23)

Thanks for your patches and testing. I confirm that they're fine (though, due to lack of hardware, I haven't tested them on arm32 architectures -- but I trust your poudriere results).

Again, thanks a lot!
Comment 26 Robert Clausecker freebsd_committer freebsd_triage 2024-02-08 11:48:34 UTC
The USE_BINUTILS part won't work as ARCH is only set when bsd.port.mk is included.  I'll go ahead and change this slightly so it works.
Comment 27 Benjamin Jacobs 2024-02-08 13:01:31 UTC
Ok nice catch, and I'm sorry, I guess that I've must added the if after testing on armv7 in my testing cycle :-/ It sure works with USE_BINUTILS=yes on all the other arch too, but it isn't really needed so I added the if later.

While at it, maybe you could add a RUN_DEPENDS_${ARCH} to RUN_DEPENDS and a pair or of RUN_DEPENDS_armv6/RUN_DEPENDS_armv7=${LOCALBASE}/bin/as:devel/binutils, as this will make sure that an "opam switch create xwz" has a reasonable chance to work too?

Thanks to both of you, and I'm looking forward to see this bug resolved :)
Comment 28 Benjamin Jacobs 2024-02-08 14:46:46 UTC
Created attachment 248259 [details]
0001-devel-ocaml-opam-Fix-build-on-armv7.patch
Comment 29 Benjamin Jacobs 2024-02-08 14:47:03 UTC
Created attachment 248260 [details]
0002-devel-ocaml-opam-GNUMake-run-dependency.patch
Comment 30 Benjamin Jacobs 2024-02-08 14:47:33 UTC
Created attachment 248261 [details]
0001-devel-ocaml-opam-Fix-build-on-armv7.patch
Comment 31 Benjamin Jacobs 2024-02-08 14:47:56 UTC
Created attachment 248262 [details]
0002-devel-ocaml-opam-GNUMake-run-dependency.patch
Comment 32 Benjamin Jacobs 2024-02-08 14:51:00 UTC
Hi again, I've updated the patches. I'll confirm once my armv7 is done building.
Comment 33 Hannes Mehnert 2024-02-08 16:23:24 UTC
(In reply to Benjamin Jacobs from comment #32)

Thanks for your updated patches. I tried (and failed) to set the flag maintainer-approval to true. I hereby approve the most recent two patches. Thanks a lot for your work on this!
Comment 34 Benjamin Jacobs 2024-02-08 16:28:19 UTC
(In reply to Hannes Mehnert from comment #33)

Cool! In the mean time, I can confirm that those patches produce a working package. Tested on a  cubieboard v1: opam was succesfully able to bootstrap an ocaml compiler from the official Opam repository.

# opam init && opam switch create 5.1.0 && eval `opam env`; which ocamlc.opt
/root/.opam/5.1.0/bin/ocamlc.opt
# ocamlc.opt -config |grep -e model -e arch
architecture: arm
model: armv7
Comment 35 commit-hook freebsd_committer freebsd_triage 2024-02-10 13:48:45 UTC
A commit in branch main references this bug:

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

commit 173b2c2ac99f5372e18feb94d81453d56ba93c67
Author:     Benjamin Jacobs <freebsd@dev.thsi.be>
AuthorDate: 2024-02-07 18:42:30 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2024-02-10 13:42:58 +0000

    devel/ocaml-opam: GNUMake run dependency.

    GNUMake is needed to build ocaml, and therefore it is needed by the
    `opam init` command.

    PR:             261180
    Reported by:    fuz
    Approved by:    hannes@mehnert.org (maintainer)
    MFH:            2024Q1

 devel/ocaml-opam/Makefile | 1 +
 1 file changed, 1 insertion(+)
Comment 36 commit-hook freebsd_committer freebsd_triage 2024-02-10 13:48:47 UTC
A commit in branch main references this bug:

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

commit 84ef6c1c612525c29dd4c271ea4e91c2d54074af
Author:     Benjamin Jacobs <freebsd@dev.thsi.be>
AuthorDate: 2024-02-07 18:10:46 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2024-02-10 13:42:26 +0000

    devel/ocaml-opam: Fix build on armv7.

    The LLVM assembler chokes on the assembly generated by the ARM32
    backend of OCAML. Fixed by forcing binutils on ARM32.

    The OCaml compiler generates text relocations on all of its supported
    32 bits architectures, however the configure script only sets the -z
    notext linker flag in the x86 case. This change makes sure that this
    flag is used for the other architectures by setting LDFLAGS in the
    environment of the configure script.

    This commit may fix armv6 and powerpc as well, but this hasn't been
    verified.

    PR:             261180
    MFH:            2024Q1
    Reported by:    fuz
    Approved by:    hannes@mehnert.org (maintainer)

 devel/ocaml-opam/Makefile | 25 +++++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)
Comment 37 commit-hook freebsd_committer freebsd_triage 2024-02-10 13:49:51 UTC
A commit in branch 2024Q1 references this bug:

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

commit e8511dc888403b210b509c00f0b3f8e9c081d81a
Author:     Benjamin Jacobs <freebsd@dev.thsi.be>
AuthorDate: 2024-02-07 18:10:46 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2024-02-10 13:49:20 +0000

    devel/ocaml-opam: Fix build on armv7.

    The LLVM assembler chokes on the assembly generated by the ARM32
    backend of OCAML. Fixed by forcing binutils on ARM32.

    The OCaml compiler generates text relocations on all of its supported
    32 bits architectures, however the configure script only sets the -z
    notext linker flag in the x86 case. This change makes sure that this
    flag is used for the other architectures by setting LDFLAGS in the
    environment of the configure script.

    This commit may fix armv6 and powerpc as well, but this hasn't been
    verified.

    PR:             261180
    MFH:            2024Q1
    Reported by:    fuz
    Approved by:    hannes@mehnert.org (maintainer)

    (cherry picked from commit 84ef6c1c612525c29dd4c271ea4e91c2d54074af)

 devel/ocaml-opam/Makefile | 25 +++++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)
Comment 38 commit-hook freebsd_committer freebsd_triage 2024-02-10 13:49:53 UTC
A commit in branch 2024Q1 references this bug:

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

commit bc1d478dce2b37067d9834f92bfe97e296b1503a
Author:     Benjamin Jacobs <freebsd@dev.thsi.be>
AuthorDate: 2024-02-07 18:42:30 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2024-02-10 13:49:20 +0000

    devel/ocaml-opam: GNUMake run dependency.

    GNUMake is needed to build ocaml, and therefore it is needed by the
    `opam init` command.

    PR:             261180
    Reported by:    fuz
    Approved by:    hannes@mehnert.org (maintainer)
    MFH:            2024Q1

    (cherry picked from commit 173b2c2ac99f5372e18feb94d81453d56ba93c67)

 devel/ocaml-opam/Makefile | 1 +
 1 file changed, 1 insertion(+)
Comment 39 Robert Clausecker freebsd_committer freebsd_triage 2024-02-10 13:51:16 UTC
Thank you for the patches!

Committed them with minor changes.
Comment 40 Benjamin Jacobs 2024-02-10 14:45:24 UTC
Thank you Robert!
Comment 41 Hannes Mehnert 2024-02-10 18:18:16 UTC
(In reply to Benjamin Jacobs from comment #40)

Thanks Robert and Benjamin.