ocaml / opam-repository

Main public package repository for opam, the source package manager of OCaml.
https://opam.ocaml.org
Creative Commons Zero v1.0 Universal
516 stars 1.12k forks source link

Make `core_unix.v0.15.x` unavailable on FreeBSD 14+ #26156

Closed Leonidas-from-XIV closed 3 months ago

Leonidas-from-XIV commented 3 months ago

Similar to #26013 this makes core_unix.v0.15.x unavailable on FreeBSD 14+ (example CI failure, @hannesm mentioning the same issue on v0.15.2. The code seems to be the same in all three releases, and the reason seems to be the same as timerfd detection enables it but it doesn't work. In older versions the code is slightly different so it might work, or it might not, haven't explored so far.

Failures look like this:

ld: error: undefined symbol: core_linux_timerfd_create
>>> referenced by linux_ext.o:(.text+0x464D) in archive /home/opam/.opam/4.14.2/lib/core_unix/linux_ext/linux_ext.a
>>> referenced by linux_ext.o:(.data+0x2E38) 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+0x48B1) in archive /home/opam/.opam/4.14.2/lib/core_unix/linux_ext/linux_ext.a
>>> referenced by linux_ext.o:(.text+0x4B91) in archive /home/opam/.opam/4.14.2/lib/core_unix/linux_ext/linux_ext.a
>>> referenced by linux_ext.o:(.data+0x2E30) 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+0x4AEA) in archive /home/opam/.opam/4.14.2/lib/core_unix/linux_ext/linux_ext.a
>>> referenced by linux_ext.o:(.data+0x2E28) 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+0x7B6A) in archive /home/opam/.opam/4.14.2/lib/core_unix/linux_ext/linux_ext.a
>>> referenced by linux_ext.o:(.data+0x2E58) 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+0x7B84) in archive /home/opam/.opam/4.14.2/lib/core_unix/linux_ext/linux_ext.a
>>> referenced by linux_ext.o:(.data+0x2E50) 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+0x7C36) in archive /home/opam/.opam/4.14.2/lib/core_unix/linux_ext/linux_ext.a
>>> referenced by linux_ext.o:(.data+0x2E48) 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+0x7C4F) in archive /home/opam/.opam/4.14.2/lib/core_unix/linux_ext/linux_ext.a
>>> referenced by linux_ext.o:(.data+0x2E40) in archive /home/opam/.opam/4.14.2/lib/core_unix/linux_ext/linux_ext.a
hannesm commented 3 months ago

Thanks a lot for picking this up and submitting this PR.