Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeBSD CI failures #924

Closed
hannesm opened this issue Mar 19, 2024 · 8 comments
Closed

FreeBSD CI failures #924

hannesm opened this issue Mar 19, 2024 · 8 comments
Assignees

Comments

@hannesm
Copy link
Contributor

hannesm commented Mar 19, 2024

Dear Madam or Sir,

thanks for providing this CI system. I encounter various failures that are FreeBSD related:

https://ocaml.ci.dev/github/mirage/mirage-crypto/commit/c7c4eb58a6aca2a316b9f1883f02a29e52238768/variant/freebsd-4.14_opam-2.1

/src: (run (cache (opam-archives (target /home/opam/.opam/download-cache)))
           (network host)
           (shell "opam update --depexts && opam install --cli=2.1 --depext-only -y mirage-crypto.dev mirage-crypto-rng.dev mirage-crypto-rng-mirage.dev mirage-crypto-rng-lwt.dev mirage-crypto-rng-async.dev mirage-crypto-pk.dev mirage-crypto-ec.dev $DEPS"))
[WARNING] Unknown update command for bsd, skipping system update


<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>
[mirage-crypto.dev] synchronised (no changes)
[mirage-crypto-pk.dev] synchronised (no changes)
[mirage-crypto-ec.dev] synchronised (no changes)
[mirage-crypto-rng.dev] synchronised (no changes)
[mirage-crypto-rng-async.dev] synchronised (no changes)
[mirage-crypto-rng-lwt.dev] synchronised (no changes)
[mirage-crypto-rng-mirage.dev] synchronised (no changes)


[NOTE] Package ocaml-options-vanilla is already installed (current version is 1).
[NOTE] Package ocaml-config is already installed (current version is 2).
[NOTE] Package base-unix is already installed (current version is base).
[NOTE] Package base-threads is already installed (current version is base).
[NOTE] Package base-bigarray is already installed (current version is base).
[ERROR] Package conflict!
  * No agreement on the version of ocaml-base-compiler:
    - ocaml-base-compiler = 4.14.1
    - (invariant) → ocaml-base-compiler = 4.14.2
    You can temporarily relax the switch invariant with `--update-invariant'


2024-03-19 11:00.40 ---> saved as "755a7dbe7b13fdf96fc96d0b86389d708dda8d9c5fbbbcaa6e0872edf87314c1"


/src: (run (cache (opam-archives (target /home/opam/.opam/download-cache)))
           (network host)
           (shell "opam install $DEPS"))
[NOTE] Package ocaml-options-vanilla is already installed (current version is 1).
[NOTE] Package ocaml-config is already installed (current version is 2).
[NOTE] Package base-unix is already installed (current version is base).
[NOTE] Package base-threads is already installed (current version is base).
[NOTE] Package base-bigarray is already installed (current version is base).
[ERROR] Package conflict!
  * No agreement on the version of ocaml-base-compiler:
    - ocaml-base-compiler = 4.14.1
    - (invariant) → ocaml-base-compiler = 4.14.2
    You can temporarily relax the switch invariant with `--update-invariant'


No solution found, exiting
jail: /usr/bin/su -l opam -c cd '/src' && env OCAMLCI='true' CI='true' DEPS='alcotest.1.7.0 astring.0.8.5 async.v0.16.0 async_kernel.v0.16.0 async_rpc_kernel.v0.16.0 async_unix.v0.16.0 base.v0.16.3 base-bigarray.base base-bytes.base base-threads.base base-unix.base base_bigstring.v0.16.0 base_quickcheck.v0.16.0 bin_prot.v0.16.0 cmdliner.1.2.0 conf-bash.1 conf-gmp.4 conf-gmp-powm-sec.3 core.v0.16.2 core_kernel.v0.16.0 core_unix.v0.16.0 cppo.1.6.9 csexp.1.5.2 cstruct.6.2.0 digestif.1.2.0 domain-name.0.4.0 dune.3.14.2 dune-configurator.3.14.2 duration.0.2.1 eqaf.0.9 expect_test_helpers_core.v0.16.0 fieldslib.v0.16.0 fmt.0.9.0 functoria-runtime.4.4.2 hex.1.5.0 int_repr.v0.16.0 ipaddr.5.5.0 jane-street-headers.v0.16.0 jst-config.v0.16.0 logs.0.7.0 lwt.5.7.0 macaddr.5.5.0 mirage-clock.4.2.0 mirage-clock-unix.4.2.0 mirage-runtime.4.4.2 mirage-time.3.0.0 mirage-time-unix.3.0.0 mirage-unix.5.0.1 mtime.2.0.0 num.1.5 ocaml.4.14.1 ocaml-base-compiler.4.14.1 ocaml-compiler-libs.v0.12.4 ocaml-config.2 ocaml-options-vanilla.1 ocaml-syntax-shims.1.0.0 ocaml_intrinsics.v0.16.1 ocamlbuild.0.14.3 ocamlfind.1.9.6 ocplib-endian.1.2 ounit2.2.2.7 parsexp.v0.16.0 ppx_assert.v0.16.0 ppx_base.v0.16.0 ppx_bench.v0.16.0 ppx_bin_prot.v0.16.0 ppx_cold.v0.16.0 ppx_compare.v0.16.0 ppx_custom_printf.v0.16.0 ppx_derivers.1.2.1 ppx_deriving.5.2.1 ppx_deriving_yojson.3.7.0 ppx_disable_unused_warnings.v0.16.0 ppx_enumerate.v0.16.0 ppx_expect.v0.16.0 ppx_fields_conv.v0.16.0 ppx_fixed_literal.v0.16.0 ppx_globalize.v0.16.0 ppx_hash.v0.16.0 ppx_here.v0.16.0 ppx_ignore_instrumentation.v0.16.0 ppx_inline_test.v0.16.1 ppx_jane.v0.16.0 ppx_let.v0.16.0 ppx_log.v0.16.0 ppx_module_timer.v0.16.0 ppx_optcomp.v0.16.0 ppx_optional.v0.16.0 ppx_pipebang.v0.16.0 ppx_sexp_conv.v0.16.0 ppx_sexp_message.v0.16.0 ppx_sexp_value.v0.16.0 ppx_stable.v0.16.0 ppx_stable_witness.v0.16.0 ppx_string.v0.16.0 ppx_tydi.v0.16.0 ppx_typerep_conv.v0.16.0 ppx_variants_conv.v0.16.0 ppxlib.0.32.0 protocol_version_header.v0.16.0 randomconv.0.2.0 re.1.11.0 result.1.5 seq.base sexp_pretty.v0.16.0 sexplib.v0.16.0 sexplib0.v0.16.0 spawn.v0.15.1 splittable_random.v0.16.0 stdio.v0.16.0 stdlib-shims.0.3.0 textutils.v0.16.0 textutils_kernel.v0.16.0 time_now.v0.16.0 timezone.v0.16.0 topkg.1.0.7 typerep.v0.16.0 uutf.1.0.3 variantslib.v0.16.0 yojson.2.1.2 zarith.1.13' OPAMCOLOR='always' CLICOLOR_FORCE='1' '/usr/bin/env' 'bash' '-c' 'opam install $DEPS': failed
"jail" "-c" "name=obuilder_34190_4365" "mount.fstab=/tmp/obuilder-jail-8d9ebd/fstab" "mount.devfs" "path=/obuilder/result/a7bab9fdd737b5a3e6047927ca9e67db482d7c9f392afe8102a83b6f4dc48afe/rootfs" "host=inherit" "ip6=inherit" "ip4=inherit" "command=/usr/bin/su" "-l" "opam" "-c" "cd '/src' && env OCAMLCI='true' CI='true' DEPS='alcotest.1.7.0 astring.0.8.5 async.v0.16.0 async_kernel.v0.16.0 async_rpc_kernel.v0.16.0 async_unix.v0.16.0 base.v0.16.3 base-bigarray.base base-bytes.base base-threads.base base-unix.base base_bigstring.v0.16.0 base_quickcheck.v0.16.0 bin_prot.v0.16.0 cmdliner.1.2.0 conf-bash.1 conf-gmp.4 conf-gmp-powm-sec.3 core.v0.16.2 core_kernel.v0.16.0 core_unix.v0.16.0 cppo.1.6.9 csexp.1.5.2 cstruct.6.2.0 digestif.1.2.0 domain-name.0.4.0 dune.3.14.2 dune-configurator.3.14.2 duration.0.2.1 eqaf.0.9 expect_test_helpers_core.v0.16.0 fieldslib.v0.16.0 fmt.0.9.0 functoria-runtime.4.4.2 hex.1.5.0 int_repr.v0.16.0 ipaddr.5.5.0 jane-street-headers.v0.16.0 jst-config.v0.16.0 logs.0.7.0 lwt.5.7.0 macaddr.5.5.0 mirage-clock.4.2.0 mirage-clock-unix.4.2.0 mirage-runtime.4.4.2 mirage-time.3.0.0 mirage-time-unix.3.0.0 mirage-unix.5.0.1 mtime.2.0.0 num.1.5 ocaml.4.14.1 ocaml-base-compiler.4.14.1 ocaml-compiler-libs.v0.12.4 ocaml-config.2 ocaml-options-vanilla.1 ocaml-syntax-shims.1.0.0 ocaml_intrinsics.v0.16.1 ocamlbuild.0.14.3 ocamlfind.1.9.6 ocplib-endian.1.2 ounit2.2.2.7 parsexp.v0.16.0 ppx_assert.v0.16.0 ppx_base.v0.16.0 ppx_bench.v0.16.0 ppx_bin_prot.v0.16.0 ppx_cold.v0.16.0 ppx_compare.v0.16.0 ppx_custom_printf.v0.16.0 ppx_derivers.1.2.1 ppx_deriving.5.2.1 ppx_deriving_yojson.3.7.0 ppx_disable_unused_warnings.v0.16.0 ppx_enumerate.v0.16.0 ppx_expect.v0.16.0 ppx_fields_conv.v0.16.0 ppx_fixed_literal.v0.16.0 ppx_globalize.v0.16.0 ppx_hash.v0.16.0 ppx_here.v0.16.0 ppx_ignore_instrumentation.v0.16.0 ppx_inline_test.v0.16.1 ppx_jane.v0.16.0 ppx_let.v0.16.0 ppx_log.v0.16.0 ppx_module_timer.v0.16.0 ppx_optcomp.v0.16.0 ppx_optional.v0.16.0 ppx_pipebang.v0.16.0 ppx_sexp_conv.v0.16.0 ppx_sexp_message.v0.16.0 ppx_sexp_value.v0.16.0 ppx_stable.v0.16.0 ppx_stable_witness.v0.16.0 ppx_string.v0.16.0 ppx_tydi.v0.16.0 ppx_typerep_conv.v0.16.0 ppx_variants_conv.v0.16.0 ppxlib.0.32.0 protocol_version_header.v0.16.0 randomconv.0.2.0 re.1.11.0 result.1.5 seq.base sexp_pretty.v0.16.0 sexplib.v0.16.0 sexplib0.v0.16.0 spawn.v0.15.1 splittable_random.v0.16.0 stdio.v0.16.0 stdlib-shims.0.3.0 textutils.v0.16.0 textutils_kernel.v0.16.0 time_now.v0.16.0 timezone.v0.16.0 topkg.1.0.7 typerep.v0.16.0 uutf.1.0.3 variantslib.v0.16.0 yojson.2.1.2 zarith.1.13' OPAMCOLOR='always' CLICOLOR_FORCE='1' '/usr/bin/env' 'bash' '-c' 'opam install $DEPS'" failed with exit status 1
2024-03-19 11:04.44: Job failed: Failed: Build failed

And https://ocaml.ci.dev/github/mirage/mirage-crypto/commit/c7c4eb58a6aca2a316b9f1883f02a29e52238768/variant/freebsd-5.1_opam-2.1

File "tests/dune", line 35, characters 7-36:
35 |  (name test_entropy_collection_async)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(cd _build/default && /home/opam/.opam/5.1.1/bin/ocamlopt.opt -w @1..3@5..28@30..39@43@46..47@49..57@61..62-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -o tests/test_entropy_collection_async.exe /home/opam/.opam/5.1.1/lib/base/base_internalhash_types/base_internalhash_types.cmxa -I /home/opam/.opam/5.1.1/lib/base/base_internalhash_types /home/opam/.opam/5.1.1/lib/base/caml/caml.cmxa /home/opam/.opam/5.1.1/lib/sexplib0/sexplib0.cmxa /home/opam/.opam/5.1.1/lib/base/shadow_stdlib/shadow_stdlib.cmxa /home/opam/.opam/5.1.1/lib/base/base.cmxa -I /home/opam/.opam/5.1.1/lib/base /home/opam/.opam/5.1.1/lib/ppx_sexp_conv/runtime-lib/ppx_sexp_conv_lib.cmxa /home/opam/.opam/5.1.1/lib/ppx_compare/runtime-lib/ppx_compare_lib.cmxa /home/opam/.opam/5.1.1/lib/ppx_enumerate/runtime-lib/ppx_enumerate_lib.cmxa /home/opam/.opam/5.1.1/lib/ppx_hash/runtime-lib/ppx_hash_lib.cmxa /home/opam/.opam/5.1.1/lib/ppx_here/runtime-lib/ppx_here_lib.cmxa /home/opam/.opam/5.1.1/lib/ppx_assert/runtime-lib/ppx_assert_lib.cmxa /home/opam/.opam/5.1.1/lib/ppx_bench/runtime-lib/ppx_bench_lib.cmxa /home/opam/.opam/5.1.1/lib/base/md5/md5_lib.cmxa /home/opam/.opam/5.1.1/lib/fieldslib/fieldslib.cmxa /home/opam/.opam/5.1.1/lib/variantslib/variantslib.cmxa /home/opam/.opam/5.1.1/lib/bin_prot/shape/bin_shape.cmxa /home/opam/.opam/5.1.1/lib/ppx_stable_witness/stable_witness/stable_witness.cmxa /home/opam/.opam/5.1.1/lib/bin_prot/bin_prot.cmxa -I /home/opam/.opam/5.1.1/lib/bin_prot /home/opam/.opam/5.1.1/lib/ppx_inline_test/config/inline_test_config.cmxa /home/opam/.opam/5.1.1/lib/jane-street-headers/jane_street_headers.cmxa /home/opam/.opam/5.1.1/lib/time_now/time_now.cmxa -I /home/opam/.opam/5.1.1/lib/time_now /home/opam/.opam/5.1.1/lib/ppx_inline_test/runtime-lib/ppx_inline_test_lib.cmxa /home/opam/.opam/5.1.1/lib/stdio/stdio.cmxa /home/opam/.opam/5.1.1/lib/ppx_module_timer/runtime/ppx_module_timer_runtime.cmxa /home/opam/.opam/5.1.1/lib/ppx_stable_witness/runtime/ppx_stable_witness_runtime.cmxa /home/opam/.opam/5.1.1/lib/typerep/typerep_lib.cmxa /home/opam/.opam/5.1.1/lib/ppx_expect/common/expect_test_common.cmxa /home/opam/.opam/5.1.1/lib/ppx_expect/config_types/expect_test_config_types.cmxa /home/opam/.opam/5.1.1/lib/ppx_expect/collector/expect_test_collector.cmxa -I /home/opam/.opam/5.1.1/lib/ppx_expect/collector /home/opam/.opam/5.1.1/lib/ppx_expect/config/expect_test_config.cmxa /home/opam/.opam/5.1.1/lib/parsexp/parsexp.cmxa /home/opam/.opam/5.1.1/lib/sexplib/sexplib.cmxa /home/opam/.opam/5.1.1/lib/ppx_log/types/ppx_log_types.cmxa /home/opam/.opam/5.1.1/lib/splittable_random/splittable_random.cmxa /home/opam/.opam/5.1.1/lib/base_quickcheck/base_quickcheck.cmxa /home/opam/.opam/5.1.1/lib/base_quickcheck/ppx_quickcheck/runtime/ppx_quickcheck_runtime.cmxa /home/opam/.opam/5.1.1/lib/int_repr/int_repr.cmxa /home/opam/.opam/5.1.1/lib/base_bigstring/base_bigstring.cmxa -I /home/opam/.opam/5.1.1/lib/base_bigstring /home/opam/.opam/5.1.1/lib/core/base_for_tests/base_for_tests.cmxa /home/opam/.opam/5.1.1/lib/core/filename_base/filename_base.cmxa /home/opam/.opam/5.1.1/lib/core/univ_map/univ_map.cmxa /home/opam/.opam/5.1.1/lib/core/command/command.cmxa /home/opam/.opam/5.1.1/lib/core/heap_block/heap_block.cmxa -I /home/opam/.opam/5.1.1/lib/core/heap_block /home/opam/.opam/5.1.1/lib/core/validate/validate.cmxa /home/opam/.opam/5.1.1/lib/core/core.cmxa -I /home/opam/.opam/5.1.1/lib/core /home/opam/.opam/5.1.1/lib/core_kernel/thread_pool_cpu_affinity/thread_pool_cpu_affinity.cmxa /home/opam/.opam/5.1.1/lib/core_kernel/tuple_pool/tuple_pool.cmxa /home/opam/.opam/5.1.1/lib/core_kernel/timing_wheel/timing_wheel.cmxa /home/opam/.opam/5.1.1/lib/async_kernel/config/async_kernel_config.cmxa /home/opam/.opam/5.1.1/lib/core_kernel/moption/moption.cmxa /home/opam/.opam/5.1.1/lib/core_kernel/pairing_heap/pairing_heap.cmxa /home/opam/.opam/5.1.1/lib/core_kernel/sexp_hidden_in_test/sexp_hidden_in_test.cmxa /home/opam/.opam/5.1.1/lib/core_kernel/uopt/uopt.cmxa /home/opam/.opam/5.1.1/lib/core_kernel/thread_safe_queue/thread_safe_queue.cmxa /home/opam/.opam/5.1.1/lib/async_kernel/async_kernel.cmxa /home/opam/.opam/5.1.1/lib/ocaml/unix/unix.cmxa /home/opam/.opam/5.1.1/lib/ocaml/threads/threads.cmxa /home/opam/.opam/5.1.1/lib/core_kernel/caml_threads/caml_threads.cmxa /home/opam/.opam/5.1.1/lib/core_unix/error_checking_mutex/error_checking_mutex.cmxa -I /home/opam/.opam/5.1.1/lib/core_unix/error_checking_mutex /home/opam/.opam/5.1.1/lib/core_kernel/flags/flags.cmxa /home/opam/.opam/5.1.1/lib/sexplib/unix/sexplib_unix.cmxa /home/opam/.opam/5.1.1/lib/core_kernel/caml_unix/caml_unix.cmxa /home/opam/.opam/5.1.1/lib/core_unix/signal_unix/signal_unix.cmxa -I /home/opam/.opam/5.1.1/lib/core_unix/signal_unix /home/opam/.opam/5.1.1/lib/spawn/spawn.cmxa -I /home/opam/.opam/5.1.1/lib/spawn /home/opam/.opam/5.1.1/lib/core_unix/core_unix.cmxa -I /home/opam/.opam/5.1.1/lib/core_unix /home/opam/.opam/5.1.1/lib/core_unix/ocaml_c_utils/ocaml_c_utils.cmxa -I /home/opam/.opam/5.1.1/lib/core_unix/ocaml_c_utils /home/opam/.opam/5.1.1/lib/core_unix/bigstring_unix/bigstring_unix.cmxa -I /home/opam/.opam/5.1.1/lib/core_unix/bigstring_unix /home/opam/.opam/5.1.1/lib/core_kernel/bounded_int_table/bounded_int_table.cmxa /home/opam/.opam/5.1.1/lib/async_kernel/eager_deferred/eager_deferred.cmxa /home/opam/.opam/5.1.1/lib/core_unix/sys_unix/sys_unix.cmxa -I /home/opam/.opam/5.1.1/lib/core_unix/sys_unix /home/opam/.opam/5.1.1/lib/core_unix/filename_unix/filename_unix.cmxa -I /home/opam/.opam/5.1.1/lib/core_unix/filename_unix /home/opam/.opam/5.1.1/lib/core_kernel/iobuf/iobuf.cmxa /home/opam/.opam/5.1.1/lib/core_unix/iobuf_unix/iobuf_unix.cmxa -I /home/opam/.opam/5.1.1/lib/core_unix/iobuf_unix /home/opam/.opam/5.1.1/lib/core_unix/core_thread/core_thread.cmxa -I /home/opam/.opam/5.1.1/lib/core_unix/core_thread /home/opam/.opam/5.1.1/lib/core_unix/nano_mutex/nano_mutex.cmxa /home/opam/.opam/5.1.1/lib/async_kernel/read_write_pair/read_write_pair.cmxa /home/opam/.opam/5.1.1/lib/core_unix/squeue/squeue.cmxa /home/opam/.opam/5.1.1/lib/timezone/timezone.cmxa /home/opam/.opam/5.1.1/lib/core_unix/time_float_unix/time_float_unix.cmxa /home/opam/.opam/5.1.1/lib/core_unix/time_ns_unix/time_ns_unix.cmxa /home/opam/.opam/5.1.1/lib/core_unix/linux_ext/linux_ext.cmxa -I /home/opam/.opam/5.1.1/lib/core_unix/linux_ext /home/opam/.opam/5.1.1/lib/async_unix/thread_safe_ivar/thread_safe_ivar.cmxa /home/opam/.opam/5.1.1/lib/async_unix/thread_pool/thread_pool.cmxa /home/opam/.opam/5.1.1/lib/ocaml_intrinsics/ocaml_intrinsics.cmxa -I /home/opam/.opam/5.1.1/lib/ocaml_intrinsics /home/opam/.opam/5.1.1/lib/core_unix/time_stamp_counter/time_stamp_counter.cmxa -I /home/opam/.opam/5.1.1/lib/core_unix/time_stamp_counter /home/opam/.opam/5.1.1/lib/core_kernel/uuid/uuid.cmxa /home/opam/.opam/5.1.1/lib/core_unix/uuid/uuid_unix.cmxa /home/opam/.opam/5.1.1/lib/async_unix/async_unix.cmxa -I /home/opam/.opam/5.1.1/lib/async_unix /home/opam/.opam/5.1.1/lib/async/async_command/async_command.cmxa /home/opam/.opam/5.1.1/lib/async/async_quickcheck/async_quickcheck.cmxa /home/opam/.opam/5.1.1/lib/core_kernel/bus/bus.cmxa /home/opam/.opam/5.1.1/lib/async_kernel/persistent_connection_kernel/persistent_connection_kernel.cmxa /home/opam/.opam/5.1.1/lib/protocol_version_header/protocol_version_header.cmxa /home/opam/.opam/5.1.1/lib/async_rpc_kernel/async_rpc_kernel.cmxa /home/opam/.opam/5.1.1/lib/async/async_rpc/async_rpc.cmxa -I /home/opam/.opam/5.1.1/lib/async/async_rpc /home/opam/.opam/5.1.1/lib/async/async.cmxa /home/opam/.opam/5.1.1/lib/cstruct/cstruct.cmxa -I /home/opam/.opam/5.1.1/lib/cstruct /home/opam/.opam/5.1.1/lib/eqaf/eqaf.cmxa /home/opam/.opam/5.1.1/lib/eqaf/bigstring/eqaf_bigstring.cmxa /home/opam/.opam/5.1.1/lib/eqaf/cstruct/eqaf_cstruct.cmxa src/mirage_crypto.cmxa -I src /home/opam/.opam/5.1.1/lib/digestif/c/digestif_c.cmxa -I /home/opam/.opam/5.1.1/lib/digestif/c rng/mirage_crypto_rng.cmxa /home/opam/.opam/5.1.1/lib/logs/logs.cmxa rng/unix/mirage_crypto_rng_unix.cmxa -I rng/unix rng/async/mirage_crypto_rng_async.cmxa tests/.test_entropy_collection_async.eobjs/native/dune__exe__Test_entropy_collection_async.cmx)
ld: error: undefined symbol: core_linux_timerfd_create
>>> referenced by linux_ext.o:(.text+0x3B6D) in archive /home/opam/.opam/5.1.1/lib/core_unix/linux_ext/linux_ext.a
>>> referenced by linux_ext.o:(.data+0x3528) in archive /home/opam/.opam/5.1.1/lib/core_unix/linux_ext/linux_ext.a


ld: error: undefined symbol: core_linux_timerfd_settime
>>> referenced by linux_ext.o:(.text+0x3DEA) in archive /home/opam/.opam/5.1.1/lib/core_unix/linux_ext/linux_ext.a
>>> referenced by linux_ext.o:(.text+0x4128) in archive /home/opam/.opam/5.1.1/lib/core_unix/linux_ext/linux_ext.a
>>> referenced by linux_ext.o:(.data+0x3520) in archive /home/opam/.opam/5.1.1/lib/core_unix/linux_ext/linux_ext.a


ld: error: undefined symbol: core_linux_timerfd_gettime
>>> referenced by linux_ext.o:(.text+0x408A) in archive /home/opam/.opam/5.1.1/lib/core_unix/linux_ext/linux_ext.a
>>> referenced by linux_ext.o:(.data+0x3518) in archive /home/opam/.opam/5.1.1/lib/core_unix/linux_ext/linux_ext.a


ld: error: undefined symbol: core_linux_timerfd_CLOCK_REALTIME
>>> referenced by linux_ext.o:(.text+0x98A4) in archive /home/opam/.opam/5.1.1/lib/core_unix/linux_ext/linux_ext.a
>>> referenced by linux_ext.o:(.data+0x3548) in archive /home/opam/.opam/5.1.1/lib/core_unix/linux_ext/linux_ext.a


ld: error: undefined symbol: core_linux_timerfd_CLOCK_MONOTONIC
>>> referenced by linux_ext.o:(.text+0x98BA) in archive /home/opam/.opam/5.1.1/lib/core_unix/linux_ext/linux_ext.a
>>> referenced by linux_ext.o:(.data+0x3540) in archive /home/opam/.opam/5.1.1/lib/core_unix/linux_ext/linux_ext.a


ld: error: undefined symbol: core_linux_timerfd_TFD_NONBLOCK
>>> referenced by linux_ext.o:(.text+0x9977) in archive /home/opam/.opam/5.1.1/lib/core_unix/linux_ext/linux_ext.a
>>> referenced by linux_ext.o:(.data+0x3538) in archive /home/opam/.opam/5.1.1/lib/core_unix/linux_ext/linux_ext.a


ld: error: undefined symbol: core_linux_timerfd_TFD_CLOEXEC
>>> referenced by linux_ext.o:(.text+0x998C) in archive /home/opam/.opam/5.1.1/lib/core_unix/linux_ext/linux_ext.a
>>> referenced by linux_ext.o:(.data+0x3530) in archive /home/opam/.opam/5.1.1/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)
@mtelvers mtelvers self-assigned this Mar 19, 2024
@mtelvers
Copy link
Member

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.

@hannesm
Copy link
Contributor Author

hannesm commented Mar 19, 2024

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

@hannesm
Copy link
Contributor Author

hannesm commented Mar 19, 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

@mtelvers
Copy link
Member

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.

@mtelvers
Copy link
Member

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.

@hannesm
Copy link
Contributor Author

hannesm commented Mar 19, 2024

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

@mtelvers
Copy link
Member

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

@hannesm
Copy link
Contributor Author

hannesm commented Jun 9, 2024

Since the issue is not in ocaml-ci, and it has been reported upstream, I'm closing this issue.

@hannesm hannesm closed this as completed Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants