Open LocutusOfBorg opened 4 years ago
I tried a quick and dirty test with 0.10.3...
gcc -o dump -I /usr/lib/ocaml -I debian/tmp/usr/lib/morbig/ examples/c/dump.c -lm -ldl debian/tmp/usr/lib/morbig/morbig.a debian/tmp/usr/lib/morbig/libmorbigc.o
debian/tmp/usr/lib/morbig/libmorbigc.o: in function `camlMap__fun_2919':
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/map.ml:62:(.text+0x11b2c4): relocation truncated to fit: R_PPC64_TOC16_DS against `.toc'+10140
debian/tmp/usr/lib/morbig/libmorbigc.o: in function `camlMap__Make_1243':
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/map.ml:62:(.text+0x11b2e8): relocation truncated to fit: R_PPC64_TOC16_DS against `.toc'+100f8
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/map.ml:62:(.text+0x11b2ec): relocation truncated to fit: R_PPC64_TOC16_DS against `.toc'+ffe8
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/map.ml:62:(.text+0x11b2f0): relocation truncated to fit: R_PPC64_TOC16_DS against `.toc'+10030
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/map.ml:62:(.text+0x11b2f4): relocation truncated to fit: R_PPC64_TOC16_DS against `.toc'+10150
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/map.ml:62:(.text+0x11b2f8): relocation truncated to fit: R_PPC64_TOC16_DS against `.toc'+100c0
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/map.ml:62:(.text+0x11b320): relocation truncated to fit: R_PPC64_TOC16_DS against `.toc'+100b8
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/map.ml:62:(.text+0x11b328): relocation truncated to fit: R_PPC64_TOC16_DS against `.toc'+fff8
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/map.ml:62:(.text+0x11b348): relocation truncated to fit: R_PPC64_TOC16_DS against `.toc'+100a8
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/map.ml:62:(.text+0x11b384): relocation truncated to fit: R_PPC64_TOC16_DS against `.toc'+100e0
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/map.ml:62:(.text+0x11b39c): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
same happens with Debian 0.10.3 package in experimental...
(experimental_ppc64el-dchroot)locutusofborg@plummer:/tmp/morbig-package-test/ocaml-api$ cc -o dump -I /usr/lib/ocaml -I dump.c ~/morbig-0.10.3/debian/libmorbig-ocaml-dev/usr/lib/ocaml//libmorbigc.o -lm -ldl -I ~/morbig-0.10.3/debian/libmorbig-ocaml-dev/usr/lib/ocaml/
cc: error: /home/locutusofborg/morbig-0.10.3/debian/libmorbig-ocaml-dev/usr/lib/ocaml//libmorbigc.o: No such file or directory
(experimental_ppc64el-dchroot)locutusofborg@plummer:/tmp/morbig-package-test/ocaml-api$ cc -o dump -I /usr/lib/ocaml -I dump.c ~/morbig-0.10.3/debian/libmorbig-ocaml-dev/usr/lib/ocaml/morbig/libmorbigc.o -lm -ldl -I ~/morbig-0.10.3/debian/libmorbig-ocaml-dev/usr/lib/ocaml/
/usr/bin/ld: /usr/lib/gcc/powerpc64le-linux-gnu/8/../../../powerpc64le-linux-gnu/Scrt1.o:(.data.rel.ro.local+0x8): undefined reference to `main'
/home/locutusofborg/morbig-0.10.3/debian/libmorbig-ocaml-dev/usr/lib/ocaml/morbig/libmorbigc.o: in function `camlMap__fun_2919':
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/map.ml:62:(.text+0x11b2c4): relocation truncated to fit: R_PPC64_TOC16_DS against `.toc'+10140
/home/locutusofborg/morbig-0.10.3/debian/libmorbig-ocaml-dev/usr/lib/ocaml/morbig/libmorbigc.o: in function `camlMap__Make_1243':
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/map.ml:62:(.text+0x11b2e8): relocation truncated to fit: R_PPC64_TOC16_DS against `.toc'+100f8
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/map.ml:62:(.text+0x11b2ec): relocation truncated to fit: R_PPC64_TOC16_DS against `.toc'+ffe8
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/map.ml:62:(.text+0x11b2f0): relocation truncated to fit: R_PPC64_TOC16_DS against `.toc'+10030
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/map.ml:62:(.text+0x11b2f4): relocation truncated to fit: R_PPC64_TOC16_DS against `.toc'+10150
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/map.ml:62:(.text+0x11b2f8): relocation truncated to fit: R_PPC64_TOC16_DS against `.toc'+100c0
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/map.ml:62:(.text+0x11b320): relocation truncated to fit: R_PPC64_TOC16_DS against `.toc'+100b8
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/map.ml:62:(.text+0x11b328): relocation truncated to fit: R_PPC64_TOC16_DS against `.toc'+fff8
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/map.ml:62:(.text+0x11b348): relocation truncated to fit: R_PPC64_TOC16_DS against `.toc'+100a8
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/map.ml:62:(.text+0x11b384): relocation truncated to fit: R_PPC64_TOC16_DS against `.toc'+100e0
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/map.ml:62:(.text+0x11b39c): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Judging by the logs, it seems that the problem occurs in OCaml's standard library. Would that be a problem from OCaml on that architecture? Have you ever compiled something else using a C library in OCaml?
I will try reproducing that.
@treinen @yurug Any idea?
Hello, morbig 0.10.3 did compile in the past on debian ppc64el and ppc64 with ocaml 4.02, see
https://buildd.debian.org/status/package.php?p=morbig&suite=experimental
I cannot look into this more atm since I have a quite shaky net access from here.
-Ralf.
@treinen correct, morbig builds correctly. The as-installed test with c binding fails.
Could that be related to https://github.com/ocaml/ocaml/issues/7887 ? In that case one should try rebuilding morbig with ocaml 4.08 (which currently is in debian/experimental, we are waiting for an OK by the release team to start the transition in sid).
Hello, I just tried it out with the debian package morbig 0.10-4-2 which has been compiled with ocaml 4.08, and unfortunately we still we have the same error.
This seems to be a bug of OCaml, I have reported it as ocaml/ocaml#9137.
There were a few suggestions of things to try in the OCaml upstream bug, in particular passing the -flarge-toc
flag to ocamlopt, have you had the chance to try them?
I updated the bug report thanks!
I'm testing 0.9.1 version