Bug 1156300
Summary: | FTBFS on ppc64 and ppc64le | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Dan Horák <dan> | ||||
Component: | ocaml | Assignee: | Richard W.M. Jones <rjones> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 22 | CC: | c.david86, normand, rdossant, rjones | ||||
Target Milestone: | --- | Flags: | normand:
needinfo-
|
||||
Target Release: | --- | ||||||
Hardware: | ppc64le | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2015-08-13 12:32:05 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 1071880, 1051573 | ||||||
Attachments: |
|
But with the fixed configure it still fails, now with ... ln -s power64le/proc.ml asmcomp/proc.ml boot/ocamlrun boot/ocamlc -nostdlib -I boot -strict-sequence -w +33..39+48 -warn-error A -bin-annot -safe-string -I utils -I parsing -I typing -I bytecomp -I asmcomp -I driver -I toplevel -c asmcomp/proc.mli boot/ocamlrun boot/ocamlc -nostdlib -I boot -strict-sequence -w +33..39+48 -warn-error A -bin-annot -safe-string -I utils -I parsing -I typing -I bytecomp -I asmcomp -I driver -I toplevel -c asmcomp/proc.ml File "asmcomp/proc.ml", line 88, characters 10-22: Warning 3: deprecated: Array.create File "asmcomp/proc.ml", line 92, characters 10-22: Warning 3: deprecated: Array.create File "asmcomp/proc.ml", line 108, characters 12-24: Warning 3: deprecated: Array.create File "asmcomp/proc.ml", line 162, characters 12-24: Warning 3: deprecated: Array.create File "asmcomp/proc.ml", line 1: Error: The implementation asmcomp/proc.ml does not match the interface asmcomp/proc.cmi: The value `op_is_pure' is required but not provided The value `regs_are_volatile' is required but not provided Makefile:822: recipe for target 'asmcomp/proc.cmo' failed make[1]: Leaving directory '/builddir/build/BUILD/ocaml-4.02.0' Makefile:259: recipe for target 'opt' failed make[1]: *** [asmcomp/proc.cmo] Error 2 the last failing scratch build is http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=2157351 This used to work fine, just a few weeks ago. Why did it suddenly stop working? Oh I see, Fedora not RHEL. (In reply to Richard W.M. Jones from comment #4) > Oh I see, Fedora not RHEL. yes, and it's 4.02, 4.01 is OK I've added this guesswork patch which may fix the ppc64/ppc64le build. It could really use checking by someone more familiar with the POWER architecture. https://git.fedorahosted.org/cgit/fedora-ocaml.git/commit/?h=fedora-22-4.02&id=0d60237e349595e1022c2258fe6fcb4137d9e128 'regs_are_volatile' seems to be a hack to deal with the 8087 stack. Every other architecture apart from i386 has this returning false. 'op_is_pure' is required by the new CSE code (which caused us endless trouble on arm64). I have copied this definition from the one used by ppc32, on the basis that POWER is similar for 32 and 64 bit, but it still may be wrong, and that would cause CSE-related code gen failures, that are hard to track down and fix. This patch was not even compile tested. Both patches are included in ocaml-4.02.0-5.fc22. it still doesn't build - http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=2158978 - and there are few more issues incomplete work in progress (based on ppc port) is diff --git a/asmcomp/power64/emit.mlp b/asmcomp/power64/emit.mlp index d84ac5c..db77452 100644 --- a/asmcomp/power64/emit.mlp +++ b/asmcomp/power64/emit.mlp @@ -370,7 +370,7 @@ let instr_size = function if chunk = Byte_signed then load_store_size addr + 1 else load_store_size addr - | Lop(Istore(chunk, addr)) -> load_store_size addr + | Lop(Istore(chunk, addr, _)) -> load_store_size addr | Lop(Ialloc n) -> 4 | Lop(Ispecific(Ialloc_far n)) -> 5 | Lop(Iintop Imod) -> 3 @@ -397,7 +397,7 @@ let instr_size = function | Lsetuptrap lbl -> 1 | Lpushtrap -> 7 | Lpoptrap -> 1 - | Lraise -> 6 + | Lraise _ -> 6 let label_map code = let map = Hashtbl.create 37 in @@ -581,7 +581,7 @@ let rec emit_instr i dslot = emit_load_store loadinstr addr i.arg 0 i.res.(0); if chunk = Byte_signed then ` extsb {emit_reg i.res.(0)}, {emit_reg i.res.(0)}\n` - | Lop(Istore(chunk, addr)) -> + | Lop(Istore(chunk, addr, _)) -> let storeinstr = match chunk with Byte_unsigned | Byte_signed -> "stb" @@ -772,7 +772,7 @@ let rec emit_instr i dslot = ` mr {emit_gpr 29}, {emit_gpr 11}\n` | Lpoptrap -> ` ld {emit_gpr 29}, 0({emit_gpr 29})\n` - | Lraise -> + | Lraise k -> ` ld {emit_gpr 0}, 8({emit_gpr 29})\n`; ` ld {emit_gpr 1}, 16({emit_gpr 29})\n`; ` ld {emit_gpr 2}, 24({emit_gpr 29})\n`; diff --git a/asmcomp/power64/proc.ml b/asmcomp/power64/proc.ml index 372303d..0a4a442 100644 --- a/asmcomp/power64/proc.ml +++ b/asmcomp/power64/proc.ml @@ -85,11 +85,11 @@ let rotate_registers = true (* Representation of hard registers by pseudo-registers *) let hard_int_reg = - let v = Array.create 23 Reg.dummy in + let v = Array.make 23 Reg.dummy in for i = 0 to 22 do v.(i) <- Reg.at_location Int (Reg i) done; v let hard_float_reg = - let v = Array.create 31 Reg.dummy in + let v = Array.make 31 Reg.dummy in for i = 0 to 30 do v.(i) <- Reg.at_location Float (Reg(100 + i)) done; v let all_phys_regs = @@ -105,7 +105,7 @@ let stack_slot slot ty = let calling_conventions first_int last_int first_float last_float make_stack stack_ofs arg = - let loc = Array.create (Array.length arg) Reg.dummy in + let loc = Array.make (Array.length arg) Reg.dummy in let int = ref first_int in let float = ref first_float in let ofs = ref stack_ofs in @@ -159,7 +159,7 @@ let loc_results res = let poweropen_external_conventions first_int last_int first_float last_float arg = - let loc = Array.create (Array.length arg) Reg.dummy in + let loc = Array.make (Array.length arg) Reg.dummy in let int = ref first_int in let float = ref first_float in let ofs = ref (14 * size_addr) in diff --git a/asmcomp/power64/scheduling.ml b/asmcomp/power64/scheduling.ml index b7bba9b..b582b6a 100644 --- a/asmcomp/power64/scheduling.ml +++ b/asmcomp/power64/scheduling.ml @@ -46,7 +46,7 @@ method reload_retaddr_latency = 12 method oper_issue_cycles = function Iconst_float _ | Iconst_symbol _ -> 2 | Iload(_, Ibased(_, _)) -> 2 - | Istore(_, Ibased(_, _)) -> 2 + | Istore(_, Ibased(_, _), _) -> 2 | Ialloc _ -> 4 | Iintop(Imod) -> 40 (* assuming full stall *) | Iintop(Icomp _) -> 4 and here my naive attempt gets out of knowledge :-) FYI it's easier to test build from this git repo: https://git.fedorahosted.org/git/fedora-ocaml.git in the branch fedora-22-4.02. (In reply to Richard W.M. Jones from comment #10) > FYI it's easier to test build from this git repo: > > https://git.fedorahosted.org/git/fedora-ocaml.git > > in the branch fedora-22-4.02. yes, that's where I started Try the ocaml-4.02.0-6.fc22. It adds the following even more speculative patches: https://git.fedorahosted.org/cgit/fedora-ocaml.git/commit/?h=fedora-22-4.02&id=e07a92272d84fc98ddbe0b42439fa1518283296d https://git.fedorahosted.org/cgit/fedora-ocaml.git/commit/?h=fedora-22-4.02&id=2d809c0bf3d0f4106ec7ff9c9e4ee3c8204d9516 and success - http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=2159054 Thanks a lot. Builds anyway. Whether it truly works or not is another question. Keep an eye out for any odd build failures in the dependent packages, and file bugs for them .. This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle. Changing version to '22'. More information and reason for this action is here: https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22 Can we close this bug or are there issues left? I'm testing OCaml on ppc64 & ppc64le fairly regularly now, so I think this is fixed now. |
Created attachment 950240 [details] fix configure for ppc64* ocaml-4.02.0-4.fc22 is FTBFS on ppc64* arches ... gcc -I../byterun -DCAML_NAME_SPACE -DNATIVE_CODE -DTARGET_power64 -DSYS_elf -O -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -c -o dynlink.o dynlink.c DSYS_elf -DMODEL_ppc64 -o power64-elf.o power64-elf.S || \ { echo "If your assembler produced syntax errors, it is probably";\ echo "unhappy with the preprocessor. Check your assembler, or";\ echo "try producing power64-elf.o by hand.";\ exit 2; } /bin/sh: DSYS_elf: command not found If your assembler produced syntax errors, it is probably unhappy with the preprocessor. Check your assembler, or try producing power64-elf.o by hand. Makefile:191: recipe for target 'power64-elf.o' failed make[2]: [power64-elf.o] Error 2 (ignored) cp power64-elf.o power64.o cp: cannot stat 'power64-elf.o': No such file or directory Makefile:97: recipe for target 'power64.o' failed make[2]: *** [power64.o] Error 1 make[2]: Leaving directory '/builddir/build/BUILD/ocaml-8c1e5cdf9154b7c4f979327a554bdde5c8f76436/asmrun' Makefile:658: recipe for target 'makeruntimeopt' failed make[1]: *** [makeruntimeopt] Error 2 Please see attachment for a fix of this error