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

build failure of dump.c on ppc64el (Debian and Ubuntu) #112

Open
LocutusOfBorg opened this issue Jul 30, 2019 · 10 comments
Open

build failure of dump.c on ppc64el (Debian and Ubuntu) #112

LocutusOfBorg opened this issue Jul 30, 2019 · 10 comments

Comments

@LocutusOfBorg
Copy link

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

@LocutusOfBorg
Copy link
Author

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

@LocutusOfBorg
Copy link
Author

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

@Niols
Copy link
Member

Niols commented Jul 31, 2019

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?

@treinen
Copy link
Contributor

treinen commented Aug 2, 2019 via email

@LocutusOfBorg
Copy link
Author

@treinen correct, morbig builds correctly.
The as-installed test with c binding fails.

@treinen
Copy link
Contributor

treinen commented Oct 25, 2019

Could that be related to ocaml/ocaml#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).

@treinen
Copy link
Contributor

treinen commented Nov 14, 2019

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.

@treinen
Copy link
Contributor

treinen commented Nov 24, 2019

This seems to be a bug of OCaml, I have reported it as ocaml/ocaml#9137.

@gasche
Copy link

gasche commented Apr 16, 2020

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?

@LocutusOfBorg
Copy link
Author

I updated the bug report thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants