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
517 stars 1.14k forks source link

`bin_prot.0.17.0` fails to build on OpenSUSE and FreeBSD with OCaml 5.0 #26005

Open shonfeder opened 5 months ago

shonfeder commented 5 months ago

Observed in https://github.com/ocaml/opam-repository/pull/25956 and https://github.com/ocaml/opam-repository/pull/25957#issuecomment-2137543695:

On OpenSUSE with OCaml 5.2 we have

#=== ERROR while compiling bin_prot.v0.17.0 ===================================#
# context              2.2.0~beta3~dev | linux/x86_64 | ocaml-base-compiler.5.2.0 | file:///home/opam/opam-repository
# path                 ~/.opam/5.2/.opam-switch/build/bin_prot.v0.17.0
# command              ~/.opam/opam-init/hooks/sandbox.sh build dune build -p bin_prot -j 255
# exit-code            1
# env-file             ~/.opam/log/bin_prot-7-1d174a.env
# output-file          ~/.opam/log/bin_prot-7-1d174a.out
### output ###
# (cd _build/default/xen && /usr/bin/bash -e -u -o pipefail -c './cflags.sh > cflags.sexp')
# Package mirage-xen was not found in the pkg-config search path.
# Perhaps you should add the directory containing `mirage-xen.pc'
# to the PKG_CONFIG_PATH environment variable
# No package 'mirage-xen' found
# File "xen/dune", line 8, characters 0-215:
#  8 | (library
#  9 |  (foreign_stubs
# 10 |   (language c)
# 11 |   (flags
# 12 |    (:include cflags.sexp)))
# 13 |  (name bin_prot_xen)
# 14 |  (public_name bin_prot.xen)
# 15 |  (optional)
# 16 |  (virtual_deps mirage-xen-ocaml)
# 17 |  (libraries)
# 18 |  (preprocess no_preprocessing))
# (cd _build/default && /home/opam/.opam/5.2/bin/ocamlmklib -g -o xen/bin_prot_xen_stubs xen/blit_stubs.o)
# /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: xen/blit_stubs.o: warning: relocation against `caml_leave_blocking_section' in read-only section `.text'
# /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: xen/blit_stubs.o: relocation R_X86_64_PC32 against symbol `memcpy@@GLIBC_2.14' can not be used when making a shared object; recompile with -fPIC
# /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: final link failed: bad value
# collect2: error: ld returned 1 exit status

<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
+- The following actions failed
| - build bin_prot v0.17.0
+-

And on FreeBSD with OCaml 5.2

#=== ERROR while compiling bin_prot.v0.17.0 ===================================#
# context              2.2.0~beta3~dev | freebsd/x86_64 | ocaml-base-compiler.5.2.0 | file:///home/opam/opam-repository
# path                 ~/.opam/5.2.0/.opam-switch/build/bin_prot.v0.17.0
# command              ~/.opam/5.2.0/bin/dune build -p bin_prot -j 15
# exit-code            1
# env-file             ~/.opam/log/bin_prot-54960-fb980c.env
# output-file          ~/.opam/log/bin_prot-54960-fb980c.out
### output ###
# File "xen/dune", line 1, characters 0-111:
# 1 | (rule
# 2 |  (targets cflags.sexp)
# 3 |  (deps
# 4 |   (:first_dep cflags.sh))
# 5 |  (action
# 6 |   (bash "./%{first_dep} > %{targets}")))
# (cd _build/default/xen && /usr/local/bin/bash -e -u -o pipefail -c './cflags.sh > cflags.sexp')
# /usr/local/bin/bash: line 1: ./cflags.sh: cannot execute: required file not found

<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build bin_prot v0.17.0

bin_prot is a dependency of core, so this is liable to effect a lot of packages. Ideally we should get this building, but if we can't, then I guess we should mark this with x-ci-accept-failures for those targets?

shonfeder commented 5 months ago

The FreeBSD failure is https://github.com/janestreet/bin_prot/issues/26

Leonidas-from-XIV commented 5 months ago

The opensuse failure is probably fixed by https://github.com/janestreet/bin_prot/pull/27