Original bug ID: 6283 Reporter: Richard Jones Status: closed (set by @xavierleroy on 2015-12-11T18:27:54Z) Resolution: fixed Priority: normal Severity: major Platform: aarch64 OS: linux OS Version: Fedora 19 Target version: 4.02.0+dev Fixed in version: 4.02.0+dev Category: back end (clambda to assembly) Tags: patch Monitored by: "Richard Jones"
Bug description
I am try to compile OCaml (from subversion) on aarch64. Since I do not have access to real hardware, I am using qemu aarch64 emulation as described here:
When building OCaml on Fedora 19 / aarch64 it fails to link ocamldoc:
../ocamlcompopt.sh -pp './remove_DEBUG' -I ../parsing -I ../utils -I ../typing -I ../driver -I ../bytecomp -I ../tools -I ../toplevel/ -I ../stdlib -I ../otherlibs/str -I ../otherlibs/dynlink -I ../otherlibs/unix -I ../otherlibs/num -I ../otherlibs/graph -warn-error A -c odoc.ml
../ocamlcompopt.sh -o ocamldoc.opt -linkall unix.cmxa str.cmxa dynlink.cmxa ../compilerlibs/ocamlcommon.cmxa -I ../parsing -I ../utils -I ../typing -I ../driver -I ../bytecomp -I ../tools -I ../toplevel/ -I ../stdlib -I ../otherlibs/str -I ../otherlibs/dynlink -I ../otherlibs/unix -I ../otherlibs/num -I ../otherlibs/graph -nostdlib ../tools/depend.cmx odoc_config.cmx odoc_messages.cmx odoc_global.cmx odoc_types.cmx odoc_misc.cmx odoc_text_parser.cmx odoc_text_lexer.cmx odoc_text.cmx odoc_name.cmx odoc_parameter.cmx odoc_value.cmx odoc_type.cmx odoc_exception.cmx odoc_class.cmx odoc_module.cmx odoc_print.cmx odoc_str.cmx odoc_comments_global.cmx odoc_parser.cmx odoc_lexer.cmx odoc_see_lexer.cmx odoc_env.cmx odoc_merge.cmx odoc_sig.cmx odoc_ast.cmx odoc_control.cmx odoc_inherit.cmx odoc_search.cmx odoc_scan.cmx odoc_cross.cmx odoc_comments.cmx odoc_dep.cmx odoc_analyse.cmx odoc_info.cmx odoc_dag2html.cmx odoc_to_text.cmx odoc_ocamlhtml.cmx odoc_html.cmx odoc_man.cmx odoc_latex_style.cmx odoc_latex.cmx odoc_texi.cmx odoc_dot.cmx odoc_gen.cmx odoc_args.cmx odoc.cmx
odoc_type.o: In function camlOdoc_type__entry': (.text+0xc): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol camlOdoc_type' defined in .data section in odoc_type.o
../stdlib/stdlib.a(listLabels.o): In function camlListLabels__entry': (.text+0x10): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol camlListLabels' defined in .data section in ../stdlib/stdlib.a(listLabels.o)
../stdlib/stdlib.a(listLabels.o): In function camlListLabels__entry': (.text+0x1c): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol camlListLabels' defined in .data section in ../stdlib/stdlib.a(listLabels.o)
../stdlib/stdlib.a(listLabels.o): In function camlListLabels__entry': (.text+0x28): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol camlListLabels' defined in .data section in ../stdlib/stdlib.a(listLabels.o)
../stdlib/stdlib.a(listLabels.o): In function camlListLabels__entry': (.text+0x34): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol camlListLabels' defined in .data section in ../stdlib/stdlib.a(listLabels.o)
../stdlib/stdlib.a(listLabels.o): In function camlListLabels__entry': (.text+0x40): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol camlListLabels' defined in .data section in ../stdlib/stdlib.a(listLabels.o)
../stdlib/stdlib.a(listLabels.o): In function camlListLabels__entry': (.text+0x4c): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol camlListLabels' defined in .data section in ../stdlib/stdlib.a(listLabels.o)
../stdlib/stdlib.a(listLabels.o): In function camlListLabels__entry': (.text+0x58): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol camlListLabels' defined in .data section in ../stdlib/stdlib.a(listLabels.o)
../stdlib/stdlib.a(listLabels.o): In function camlListLabels__entry': (.text+0x64): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol camlListLabels' defined in .data section in ../stdlib/stdlib.a(listLabels.o)
../stdlib/stdlib.a(listLabels.o): In function camlListLabels__entry': (.text+0x70): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol camlListLabels' defined in .data section in ../stdlib/stdlib.a(listLabels.o)
../stdlib/stdlib.a(listLabels.o): In function camlListLabels__entry': (.text+0x7c): additional relocation overflows omitted from the output collect2: error: ld returned 1 exit status File "caml_startup", line 1: Error: Error during linking make[3]: *** [ocamldoc.opt] Error 2 make[3]: Leaving directory /home/rjones/d/ocaml/ocamldoc'
make[2]: *** [ocamldoc.opt] Error 2
make[2]: Leaving directory /home/rjones/d/ocaml' make[1]: *** [opt.opt] Error 2 make[1]: Leaving directory /home/rjones/d/ocaml'
make: *** [world.opt] Error 2
I believe this to be an alignment problem, not a truncation problem (the error message is certainly confusing). Making code and data aligned to 8 bytes, as in the attached patch, cures the ocamldoc problem for me. However I'm going to build a few more virt tools before I can be certain that I've fixed this.
I'm not quite sure what happens here (in particular data should be naturally 8-aligned already). Thanks for the testing and patch. To be applied in 4.02.
Original bug ID: 6283
Reporter: Richard Jones
Status: closed (set by @xavierleroy on 2015-12-11T18:27:54Z)
Resolution: fixed
Priority: normal
Severity: major
Platform: aarch64
OS: linux
OS Version: Fedora 19
Target version: 4.02.0+dev
Fixed in version: 4.02.0+dev
Category: back end (clambda to assembly)
Tags: patch
Monitored by: "Richard Jones"
Bug description
I am try to compile OCaml (from subversion) on aarch64. Since I do not have access to real hardware, I am using qemu aarch64 emulation as described here:
http://rwmj.wordpress.com/2013/12/22/how-to-run-aarch64-binaries-on-an-x86-64-host-using-qemu-userspace-emulation/#content
plus the following patch to fix a bug in qemu:
https://lists.gnu.org/archive/html/qemu-devel/2013-12/msg04379.html
When building OCaml on Fedora 19 / aarch64 it fails to link ocamldoc:
../ocamlcompopt.sh -pp './remove_DEBUG' -I ../parsing -I ../utils -I ../typing -I ../driver -I ../bytecomp -I ../tools -I ../toplevel/ -I ../stdlib -I ../otherlibs/str -I ../otherlibs/dynlink -I ../otherlibs/unix -I ../otherlibs/num -I ../otherlibs/graph -warn-error A -c odoc.ml
../ocamlcompopt.sh -o ocamldoc.opt -linkall unix.cmxa str.cmxa dynlink.cmxa ../compilerlibs/ocamlcommon.cmxa -I ../parsing -I ../utils -I ../typing -I ../driver -I ../bytecomp -I ../tools -I ../toplevel/ -I ../stdlib -I ../otherlibs/str -I ../otherlibs/dynlink -I ../otherlibs/unix -I ../otherlibs/num -I ../otherlibs/graph -nostdlib ../tools/depend.cmx odoc_config.cmx odoc_messages.cmx odoc_global.cmx odoc_types.cmx odoc_misc.cmx odoc_text_parser.cmx odoc_text_lexer.cmx odoc_text.cmx odoc_name.cmx odoc_parameter.cmx odoc_value.cmx odoc_type.cmx odoc_exception.cmx odoc_class.cmx odoc_module.cmx odoc_print.cmx odoc_str.cmx odoc_comments_global.cmx odoc_parser.cmx odoc_lexer.cmx odoc_see_lexer.cmx odoc_env.cmx odoc_merge.cmx odoc_sig.cmx odoc_ast.cmx odoc_control.cmx odoc_inherit.cmx odoc_search.cmx odoc_scan.cmx odoc_cross.cmx odoc_comments.cmx odoc_dep.cmx odoc_analyse.cmx odoc_info.cmx odoc_dag2html.cmx odoc_to_text.cmx odoc_ocamlhtml.cmx odoc_html.cmx odoc_man.cmx odoc_latex_style.cmx odoc_latex.cmx odoc_texi.cmx odoc_dot.cmx odoc_gen.cmx odoc_args.cmx odoc.cmx
odoc_type.o: In function
camlOdoc_type__entry': (.text+0xc): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol
camlOdoc_type' defined in .data section in odoc_type.o../stdlib/stdlib.a(listLabels.o): In function
camlListLabels__entry': (.text+0x10): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol
camlListLabels' defined in .data section in ../stdlib/stdlib.a(listLabels.o)../stdlib/stdlib.a(listLabels.o): In function
camlListLabels__entry': (.text+0x1c): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol
camlListLabels' defined in .data section in ../stdlib/stdlib.a(listLabels.o)../stdlib/stdlib.a(listLabels.o): In function
camlListLabels__entry': (.text+0x28): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol
camlListLabels' defined in .data section in ../stdlib/stdlib.a(listLabels.o)../stdlib/stdlib.a(listLabels.o): In function
camlListLabels__entry': (.text+0x34): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol
camlListLabels' defined in .data section in ../stdlib/stdlib.a(listLabels.o)../stdlib/stdlib.a(listLabels.o): In function
camlListLabels__entry': (.text+0x40): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol
camlListLabels' defined in .data section in ../stdlib/stdlib.a(listLabels.o)../stdlib/stdlib.a(listLabels.o): In function
camlListLabels__entry': (.text+0x4c): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol
camlListLabels' defined in .data section in ../stdlib/stdlib.a(listLabels.o)../stdlib/stdlib.a(listLabels.o): In function
camlListLabels__entry': (.text+0x58): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol
camlListLabels' defined in .data section in ../stdlib/stdlib.a(listLabels.o)../stdlib/stdlib.a(listLabels.o): In function
camlListLabels__entry': (.text+0x64): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol
camlListLabels' defined in .data section in ../stdlib/stdlib.a(listLabels.o)../stdlib/stdlib.a(listLabels.o): In function
camlListLabels__entry': (.text+0x70): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol
camlListLabels' defined in .data section in ../stdlib/stdlib.a(listLabels.o)../stdlib/stdlib.a(listLabels.o): In function
camlListLabels__entry': (.text+0x7c): additional relocation overflows omitted from the output collect2: error: ld returned 1 exit status File "caml_startup", line 1: Error: Error during linking make[3]: *** [ocamldoc.opt] Error 2 make[3]: Leaving directory
/home/rjones/d/ocaml/ocamldoc'make[2]: *** [ocamldoc.opt] Error 2
make[2]: Leaving directory
/home/rjones/d/ocaml' make[1]: *** [opt.opt] Error 2 make[1]: Leaving directory
/home/rjones/d/ocaml'make: *** [world.opt] Error 2
Steps to reproduce
On an aarch64 platform or emulation, do:
./configure
make world.opt -j1
File attachments
The text was updated successfully, but these errors were encountered: