From 29305cfb9a4b8e205000ad7e3f147b55ca1e6f8b Mon Sep 17 00:00:00 2001 From: Marek Kubica Date: Tue, 4 Jun 2024 11:05:08 +0200 Subject: [PATCH 1/2] `core_unix.v0.16` does not work properly on FreeBSD FTBFS with ld: error: undefined symbol: core_linux_timerfd_create >>> referenced by linux_ext.o:(.text+0x39FD) in archive /home/opam/.opam/4.14.2/lib/core_unix/linux_ext/linux_ext.a >>> referenced by linux_ext.o:(.data+0x32D0) in archive /home/opam/.opam/4.14.2/lib/core_unix/linux_ext/linux_ext.a ld: error: undefined symbol: core_linux_timerfd_settime >>> referenced by linux_ext.o:(.text+0x3C61) in archive /home/opam/.opam/4.14.2/lib/core_unix/linux_ext/linux_ext.a >>> referenced by linux_ext.o:(.text+0x3F41) in archive /home/opam/.opam/4.14.2/lib/core_unix/linux_ext/linux_ext.a >>> referenced by linux_ext.o:(.data+0x32C8) in archive /home/opam/.opam/4.14.2/lib/core_unix/linux_ext/linux_ext.a ld: error: undefined symbol: core_linux_timerfd_gettime >>> referenced by linux_ext.o:(.text+0x3E9A) in archive /home/opam/.opam/4.14.2/lib/core_unix/linux_ext/linux_ext.a >>> referenced by linux_ext.o:(.data+0x32C0) in archive /home/opam/.opam/4.14.2/lib/core_unix/linux_ext/linux_ext.a ld: error: undefined symbol: core_linux_timerfd_CLOCK_REALTIME >>> referenced by linux_ext.o:(.text+0x7364) in archive /home/opam/.opam/4.14.2/lib/core_unix/linux_ext/linux_ext.a >>> referenced by linux_ext.o:(.data+0x32F0) in archive /home/opam/.opam/4.14.2/lib/core_unix/linux_ext/linux_ext.a ld: error: undefined symbol: core_linux_timerfd_CLOCK_MONOTONIC >>> referenced by linux_ext.o:(.text+0x737E) in archive /home/opam/.opam/4.14.2/lib/core_unix/linux_ext/linux_ext.a >>> referenced by linux_ext.o:(.data+0x32E8) in archive /home/opam/.opam/4.14.2/lib/core_unix/linux_ext/linux_ext.a ld: error: undefined symbol: core_linux_timerfd_TFD_NONBLOCK >>> referenced by linux_ext.o:(.text+0x7430) in archive /home/opam/.opam/4.14.2/lib/core_unix/linux_ext/linux_ext.a >>> referenced by linux_ext.o:(.data+0x32E0) in archive /home/opam/.opam/4.14.2/lib/core_unix/linux_ext/linux_ext.a ld: error: undefined symbol: core_linux_timerfd_TFD_CLOEXEC >>> referenced by linux_ext.o:(.text+0x7449) in archive /home/opam/.opam/4.14.2/lib/core_unix/linux_ext/linux_ext.a >>> referenced by linux_ext.o:(.data+0x32D8) in archive /home/opam/.opam/4.14.2/lib/core_unix/linux_ext/linux_ext.a cc: error: linker command failed with exit code 1 (use -v to see invocation) File "caml_startup", line 1: Error: Error during linking (exit code 1) --- packages/core_unix/core_unix.v0.16.0/opam | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/core_unix/core_unix.v0.16.0/opam b/packages/core_unix/core_unix.v0.16.0/opam index 00ee8eefce2..fca5fe74f16 100644 --- a/packages/core_unix/core_unix.v0.16.0/opam +++ b/packages/core_unix/core_unix.v0.16.0/opam @@ -30,6 +30,7 @@ description: " Unix-specific extensions to some of the modules defined in [core] and [core_kernel]. " depexts: ["linux-headers"] {os-family = "alpine"} +available: [ os != "freebsd" ] url { src: "https://ocaml.janestreet.com/ocaml-core/v0.16/files/core_unix-v0.16.0.tar.gz" checksum: "sha256=4f70a9d3a761799d00c0a207942b4abd9f1a144bbcb19df98021d9fb7bfa9e5f" From b49e40f58ba5f77367e2c85c68c43dca275e5456 Mon Sep 17 00:00:00 2001 From: Marek Kubica Date: Tue, 4 Jun 2024 13:37:05 +0200 Subject: [PATCH 2/2] Restrict availability exclusion to just FreeBSD 14+ --- packages/core_unix/core_unix.v0.16.0/opam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core_unix/core_unix.v0.16.0/opam b/packages/core_unix/core_unix.v0.16.0/opam index fca5fe74f16..1c73c820c77 100644 --- a/packages/core_unix/core_unix.v0.16.0/opam +++ b/packages/core_unix/core_unix.v0.16.0/opam @@ -30,7 +30,7 @@ description: " Unix-specific extensions to some of the modules defined in [core] and [core_kernel]. " depexts: ["linux-headers"] {os-family = "alpine"} -available: [ os != "freebsd" ] +available: [ !(os = "freebsd" & os-version >= "14") ] url { src: "https://ocaml.janestreet.com/ocaml-core/v0.16/files/core_unix-v0.16.0.tar.gz" checksum: "sha256=4f70a9d3a761799d00c0a207942b4abd9f1a144bbcb19df98021d9fb7bfa9e5f"