morbig
morbig copied to clipboard
build failure of dump.c on ppc64el (Debian and Ubuntu)
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/powerpc64le-linux-gnu/8/lto-wrapper
Target: powerpc64le-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 8.3.0-19' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=powerpc64le-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --enable-plugin --enable-default-pie --with-system-zlib --disable-libphobos --enable-objc-gc=auto --enable-secureplt --with-cpu=power8 --enable-targets=powerpcle-linux --disable-multilib --enable-multiarch --disable-werror --with-long-double-128 --enable-checking=release --build=powerpc64le-linux-gnu --host=powerpc64le-linux-gnu --target=powerpc64le-linux-gnu --with-build-config=bootstrap-lto --enable-link-mutex
Thread model: posix
gcc version 8.3.0 (Debian 8.3.0-19)
~/morbig-0.9.1$ gcc -o dump -I /usr/lib/ocaml -I /usr/lib/ocaml/morbig examples/c/dump.c -lm -ldl ./src/_build/libmorbigc.a
./src/_build/libmorbigc.a(CAPI.native.o): in function `camlCamlinternalFormat__create_char_set_1226':
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/camlinternalFormat.ml:24:(.text+0x114180): relocation truncated to fit: R_PPC64_TOC16_DS against `.toc'+fff0
./src/_build/libmorbigc.a(CAPI.native.o): in function `camlCamlinternalFormat__char_of_counter_1365':
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/camlinternalFormat.ml:297:(.text+0x114df4): relocation truncated to fit: R_PPC64_TOC16_DS against `.toc'+ffd0
./src/_build/libmorbigc.a(CAPI.native.o): in function `camlCamlinternalFormat__bprint_char_set_1367':
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/camlinternalFormat.ml:305:(.text+0x114e68): relocation truncated to fit: R_PPC64_TOC16_DS against `.toc'+10120
./src/_build/libmorbigc.a(CAPI.native.o): in function `camlCamlinternalFormat__print_start_1370':
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/camlinternalFormat.ml:306:(.text+0x114fb8): relocation truncated to fit: R_PPC64_TOC16_DS against `.toc'+10170
./src/_build/libmorbigc.a(CAPI.native.o): in function `camlCamlinternalFormat__print_first_1372':
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/camlinternalFormat.ml:321:(.text+0x115294): relocation truncated to fit: R_PPC64_TOC16_DS against `.toc'+10120
./src/_build/libmorbigc.a(CAPI.native.o): in function `camlCamlinternalFormat__print_second_1373':
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/camlinternalFormat.ml:331:(.text+0x115418): relocation truncated to fit: R_PPC64_TOC16_DS against `.toc'+10120
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/camlinternalFormat.ml:335:(.text+0x1154e0): relocation truncated to fit: R_PPC64_TOC16_DS against `.toc'+10120
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/camlinternalFormat.ml:340:(.text+0x11552c): relocation truncated to fit: R_PPC64_TOC16_DS against `.toc'+10120
./src/_build/libmorbigc.a(CAPI.native.o): in function `camlCamlinternalFormat__print_in_1374':
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/camlinternalFormat.ml:347:(.text+0x11562c): relocation truncated to fit: R_PPC64_TOC16_DS against `.toc'+10120
./src/_build/libmorbigc.a(CAPI.native.o): in function `camlCamlinternalFormat__bprint_iconv_flag_1432':
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/camlinternalFormat.ml:407:(.text+0x115978): relocation truncated to fit: R_PPC64_TOC16_DS against `.toc'+10020
./src/_build/libmorbigc.a(CAPI.native.o): in function `camlCamlinternalFormat__bprint_fconv_flag_1448':
/build/ocaml-01ejyQ/ocaml-4.05.0/stdlib/camlinternalFormat.ml:435:(.text+0x115b94): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
I'm testing 0.9.1 version
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!