Giter Site home page Giter Site logo

FreeBSD CI failures about ocaml-ci HOT 8 OPEN

hannesm avatar hannesm commented on August 22, 2024
FreeBSD CI failures

from ocaml-ci.

Comments (8)

hannesm avatar hannesm commented on August 22, 2024 1

Thanks for your investigations -- sounds like there should be an issue (and potential fix for core_unix).

from ocaml-ci.

mtelvers avatar mtelvers commented on August 22, 2024

This error is occurring because of the 4.14.2 release. The FreeBSD base images have been updated to 4.14.2, but OCaml-CI still needs to. I am working on updating the various elements at the moment.

from ocaml-ci.

hannesm avatar hannesm commented on August 22, 2024

Thanks for your reply. The OCaml 5 failure, is this expected on FreeBSD? I have not seen it earlier.

from ocaml-ci.

hannesm avatar hannesm commented on August 22, 2024

An example successful build and run with OCaml-CI from last week (where likely FreeBSD 13 was used): https://ocaml.ci.dev/github/mirage/mirage-crypto/commit/61721c270d4cbd3222950dc21632d88eb69be339/variant/freebsd-5.1_opam-2.1

from ocaml-ci.

mtelvers avatar mtelvers commented on August 22, 2024

We now have the OCaml 4.14.2 base images and support in OCaml CI. I now see the same linking error in 4.14.2 as we are seeing in 5.1.1. I can reproduce the issue within the FreeBSD 14.0p5 jail, by downloading core_unix and building a test sample of just let _ = Linux_ext.Timerfd.create.

~/core_unix-v0.16.0 $ dune exec --release -- bin/test.exe
....
ld: error: undefined symbol: core_linux_timerfd_create
>>> referenced by linux_ext.o:(.text+0x39FD) in archive linux_ext/src/linux_ext.a
>>> referenced by linux_ext.o:(.data+0x32D0) in archive linux_ext/src/linux_ext.a

ld: error: undefined symbol: core_linux_timerfd_settime
>>> referenced by linux_ext.o:(.text+0x3C61) in archive linux_ext/src/linux_ext.a
>>> referenced by linux_ext.o:(.text+0x3F41) in archive linux_ext/src/linux_ext.a
>>> referenced by linux_ext.o:(.data+0x32C8) in archive linux_ext/src/linux_ext.a

ld: error: undefined symbol: core_linux_timerfd_gettime
>>> referenced by linux_ext.o:(.text+0x3E9A) in archive linux_ext/src/linux_ext.a
>>> referenced by linux_ext.o:(.data+0x32C0) in archive linux_ext/src/linux_ext.a

ld: error: undefined symbol: core_linux_timerfd_CLOCK_REALTIME
>>> referenced by linux_ext.o:(.text+0x7364) in archive linux_ext/src/linux_ext.a
>>> referenced by linux_ext.o:(.data+0x32F0) in archive linux_ext/src/linux_ext.a

ld: error: undefined symbol: core_linux_timerfd_CLOCK_MONOTONIC
>>> referenced by linux_ext.o:(.text+0x737E) in archive linux_ext/src/linux_ext.a
>>> referenced by linux_ext.o:(.data+0x32E8) in archive linux_ext/src/linux_ext.a

ld: error: undefined symbol: core_linux_timerfd_TFD_NONBLOCK
>>> referenced by linux_ext.o:(.text+0x7430) in archive linux_ext/src/linux_ext.a
>>> referenced by linux_ext.o:(.data+0x32E0) in archive linux_ext/src/linux_ext.a

ld: error: undefined symbol: core_linux_timerfd_TFD_CLOEXEC
>>> referenced by linux_ext.o:(.text+0x7449) in archive linux_ext/src/linux_ext.a
>>> referenced by linux_ext.o:(.data+0x32D8) in archive linux_ext/src/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)

I will continue to investigate.

from ocaml-ci.

mtelvers avatar mtelvers commented on August 22, 2024

The configuration of core_unix is performed using jst-config, which tests the system functionality using small C programs. One of these is

#include <sys/timerfd.h>

int main()
{
  timerfd_create(0, 0);
  return 0;
}

This defines JSC_TIMERFD in config.h.

On both of the FreeBSD 14 systems, there is a header called sys/timerfd.h. If I rename/move this header, JSC_TIMERFD is not defined and the test code builds successfully.

In the FreeBSD 14 blog it says

New efforts to enhance interoperability with Linux represent an interesting shift in direction for FreeBSD. FreeBSD 14 makes it easier for users to port applications and programs from Linux to FreeBSD, or vice versa. In this area, a number of utilities have been added to FreeBSD 14, including an nproc(1) utility, compatible with the Linux program of the same name, native timerfd(2) facility to enable porting of Linux programs that use timerfd, and a netlink(4) utility for further compatibility with Linux.

from ocaml-ci.

mtelvers avatar mtelvers commented on August 22, 2024

Testing with mirage-crypto... these commands run the tests successfully:

sudo mv /usr/include/sys/timerfd.h /usr/include/sys/timerfd.h.bak
opam switch create . 5.1.1 --deps-only --with-test -y
opam exec -- dune build @install @check @runtest

from ocaml-ci.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.