Created attachment 876323 [details] ocaml.ppc64le.step2.patch Description of problem: For the moment the ocaml package do not built with ocaml native compiler. The purpose of this bugzilla is to track the pending work for native compiler problem on ppc64le archi. I am still working on top of attached patch, to solve the ABI version problem reported below. Version-Release number of selected component (if applicable): ocaml-4.01.0-8 Steps to Reproduce: 1. retrieve the patch from bug https://bugzilla.redhat.com/show_bug.cgi?id=1077767 2. retrieve the working patch present in attachment 3. modify the spec file to apply two patches and enable native_compiler 4. the rpmbuild is failing with following log extract. Actual results: === ... make[2]: Entering directory `/home/michel/rpmbuild/BUILD/ocaml-4.01.0/otherlibs/unix' ../../ocamlcompopt.sh -c -w +33..39 -warn-error A -g -nolabels unix.ml ../../ocamlcompopt.sh -c -w +33..39 -warn-error A -g -nolabels unixLabels.ml ../../boot/ocamlrun ../../tools/ocamlmklib -o unix -oc unix -ocamlopt '../../ocamlcompopt.sh' -linkall \ unix.cmx unixLabels.cmx ../../ocamlcompopt.sh -shared -o unix.cmxs -I . unix.cmxa /usr/bin/ld: unix.cmxs.startup.o: ABI version 1 is not compatible with ABI version 2 output /usr/bin/ld: failed to merge target specific data of file unix.cmxs.startup.o /usr/bin/ld: unix.a(unix.o): ABI version 1 is not compatible with ABI version 2 output /usr/bin/ld: failed to merge target specific data of file unix.a(unix.o) /usr/bin/ld: unix.a(unixLabels.o): ABI version 1 is not compatible with ABI version 2 output /usr/bin/ld: failed to merge target specific data of file unix.a(unixLabels.o) ===
Comment on attachment 876323 [details] ocaml.ppc64le.step2.patch obsoleted by new patch, same name.
Created attachment 877953 [details] ocaml.ppc64le.step2.patch is still a pending working patch the new ocaml.ppc64le.step2.patch added March 24th is still a pending working patch that need more work to solve following build error: === boot/ocamlrun ./ocamlopt -nostdlib -I stdlib -I otherlibs/dynlink -strict-sequence -w +33..39 -warn-error A -I utils -I parsing -I typing -I bytecomp -I asmcomp -I driver -I toplevel -c driver/main.ml boot/ocamlrun ./ocamlopt -nostdlib -I stdlib -I otherlibs/dynlink -ccopt "-Wl,-E" -o ocamlc.opt \ compilerlibs/ocamlcommon.cmxa compilerlibs/ocamlbytecomp.cmxa \ driver/main.cmx -cclib "-lm -ldl -lpthread" /usr/bin/ld: stdlib/stdlib.a(pervasives.o): In function `camlPervasives__entry': (.data+0x30f8): unresolvable R_PPC64_ADDR64 against `fmod@@GLIBC_2.18' ... /usr/bin/ld: stdlib/stdlib.a(pervasives.o): In function `camlPervasives__entry': (.data+0x31a0): unresolvable R_PPC64_ADDR64 against `pow@@GLIBC_2.18' /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status File "caml_startup", line 1: Error: Error during linking ===
Created attachment 879578 [details] ocaml.ppc64le.step2.patch is still a pending working patch this version of the patch is still not complete because of segmentation fault on first execution of the ocamlcompopt compiler. === make[1]: Entering directory `/home/michel/rpmbuild/BUILD/ocaml-4.01.0/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_config.ml + exec ../ocamlopt.opt -nostdlib -I ../stdlib -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_config.ml make[1]: *** [odoc_config.cmx] Segmentation fault make[1]: Leaving directory `/home/michel/rpmbuild/BUILD/ocaml-4.01.0/ocamldoc' ===
Created attachment 882275 [details] ocaml.ppc64le.step2.patch is still a pending working patch replacing previous patch, but still have segfault (now when compiling odoc_scan.ml)
Created attachment 883619 [details] ocaml.ppc64le.step2.patch valid patch ocaml.ppc64le.step2.patch last version is now sufficient to build ocaml with native compiler for ppc64le archi.
The ocamlopt.opt native compiler generated with the above patch has a new segfault when trying to build the ocaml-camlp5 package for ppc64le arch. So probably above patch is not enough. === make[2]: Entering directory `/builddir/build/BUILD/camlp5-6.11/meta' ocamlrun ../boot/camlp5r -nolib -I ../boot -mode S -o q_MLast.ppo q_MLast.ml ocamlopt.opt -g -warn-error A -I ../main -I ../boot -I ../ocaml_stuff/4.01.0/utils -c -impl q_MLast.ppo ../tools/ocamlopt.sh: line 5: 31034 Segmentation fault $COMM $* make[2]: *** [q_MLast.cmx] Error 139 make[2]: Leaving directory `/builddir/build/BUILD/camlp5-6.11/meta' ===
In reply to comment #6 The ocaml-camlp5 build failure is tracked by a new bz 1085850 with its specific patch. There is no need to change previous ocaml.ppc64le.step2.patch of comment #5
Created attachment 884553 [details] ocaml.spec.ppc64le.step2.patch ocaml.spec.ppc64le.step2.patch to be committed with first attachment ocaml.ppc64le.step2.patch
No real reason to have two bugs tracking the same feature, so combining them into one. *** This bug has been marked as a duplicate of bug 1077767 ***