Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1078190 - ocaml ppc64le archi with native compiler
Summary: ocaml ppc64le archi with native compiler
Keywords:
Status: CLOSED DUPLICATE of bug 1077767
Alias: None
Product: Fedora
Classification: Fedora
Component: ocaml
Version: rawhide
Hardware: ppc64le
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1077767
Blocks: F-ExcludeArch-ppc64le, PPC64LETracker 1083616
TreeView+ depends on / blocked
 
Reported: 2014-03-19 11:09 UTC by Michel Normand
Modified: 2014-04-09 16:36 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-04-09 16:36:12 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
ocaml.ppc64le.step2.patch (3.13 KB, patch)
2014-03-19 11:09 UTC, Michel Normand
no flags Details | Diff
ocaml.ppc64le.step2.patch is still a pending working patch (71.46 KB, patch)
2014-03-24 08:14 UTC, Michel Normand
no flags Details | Diff
ocaml.ppc64le.step2.patch is still a pending working patch (75.13 KB, patch)
2014-03-27 19:05 UTC, Michel Normand
no flags Details | Diff
ocaml.ppc64le.step2.patch is still a pending working patch (79.87 KB, patch)
2014-04-03 13:33 UTC, Michel Normand
no flags Details | Diff
ocaml.ppc64le.step2.patch valid patch (74.93 KB, patch)
2014-04-07 13:20 UTC, Michel Normand
no flags Details | Diff
ocaml.spec.ppc64le.step2.patch (1.96 KB, patch)
2014-04-09 15:32 UTC, Michel Normand
no flags Details | Diff

Description Michel Normand 2014-03-19 11:09:47 UTC
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 1 Michel Normand 2014-03-24 08:07:18 UTC
Comment on attachment 876323 [details]
ocaml.ppc64le.step2.patch

obsoleted by new patch, same name.

Comment 2 Michel Normand 2014-03-24 08:14:28 UTC
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
===

Comment 3 Michel Normand 2014-03-27 19:05:31 UTC
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'
===

Comment 4 Michel Normand 2014-04-03 13:33:17 UTC
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)

Comment 5 Michel Normand 2014-04-07 13:20:41 UTC
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.

Comment 6 Michel Normand 2014-04-08 14:54:53 UTC
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'
===

Comment 7 Michel Normand 2014-04-09 14:13:28 UTC
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

Comment 8 Michel Normand 2014-04-09 15:32:18 UTC
Created attachment 884553 [details]
ocaml.spec.ppc64le.step2.patch

ocaml.spec.ppc64le.step2.patch to be committed with first attachment ocaml.ppc64le.step2.patch

Comment 9 Richard W.M. Jones 2014-04-09 16:36:12 UTC
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 ***


Note You need to log in before you can comment on or make changes to this bug.