-
Notifications
You must be signed in to change notification settings - Fork 464
Closed
ocaml/opam-repository
#17967Description
Expected Behavior
Everything should work fine under arm32.
Actual Behavior
From what I gathered from ocaml-ci's log, it appears that building the cgenerated cinaps executable fails, getting relocation errors from ld. I'm guessing this might be due to missing flags along the chain somewhere. The dune runtest fails with the following:
(cd _build/default && /home/opam/.opam/4.11/bin/ocamlopt.opt -w -24 -o lib/.cinaps/cinaps.exe /home/opam/.opam/4.11/lib/ocaml/unix.cmxa -I /home/opam/.opam/4.11/lib/ocaml /home/opam/.opam/4.11/lib/cinaps/runtime/cinaps_runtime.cmxa lib/.cinaps/.cinaps.eobjs/native/dune__exe__Cinaps.cmx)
/usr/bin/ld: lib/.cinaps/.cinaps.eobjs/native/dune__exe__Cinaps.o: relocation R_ARM_THM_MOVW_ABS_NC against `camlCinaps_runtime' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/.cinaps/.cinaps.eobjs/native/dune__exe__Cinaps.o: in function `.L111':
:(.text+0xfc): dangerous relocation: unsupported relocation
/usr/bin/ld: :(.text+0x100): dangerous relocation: unsupported relocation
/usr/bin/ld: :(.text+0x104): dangerous relocation: unsupported relocation
/usr/bin/ld: :(.text+0x108): dangerous relocation: unsupported relocation
/usr/bin/ld: lib/.cinaps/.cinaps.eobjs/native/dune__exe__Cinaps.o: in function `camlDune__exe__Cinaps__6':
:(.data+0x4): dangerous relocation: unsupported relocation
...
Reproduction
I wrote a minimal example here: https://github.com/NathanReb/dune-cinaps-arm32
I openend a dummy PR on the repo to trigger an ocaml-ci build, here is the arm32 build: https://ci.ocamllabs.io/github/NathanReb/dune-cinaps-arm32/commit/c5312927c1f56868dae15c9c6762d022e6faaaf8/variant/debian-10-4.11_arm32
Specifications
- Version of
dune(output ofdune --version): 2.7.1 - Version of
ocaml(output ofocamlc --version): 4.11.1 - Operating system (distribution and version): linux-arm64:debian-10-4.11_arm32
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels