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 1204876

Summary: ocaml-camlp4 doesn't build on ppc64/ppc
Product: [Fedora] Fedora Reporter: Than Ngo <than>
Component: ocaml-camlp4Assignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: dan, rjones, than
Target Milestone: ---   
Target Release: ---   
Hardware: ppc64   
OS: Unspecified   
Whiteboard:
Fixed In Version: ocaml-camlp4-4.02.0-0.9.git87c6a6b0.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-31 21:52:36 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    

Description Than Ngo 2015-03-23 16:35:30 UTC
ocaml-camlp4 doesn't build on ppc64/ppc64

/usr/bin/ocamlopt.opt -c -g -w a -I camlp4/import -warn-error A-3 -I camlp4/config -I camlp4/boot -o camlp4/boot/camlp4boot.cmx camlp4/boot/camlp4boot.ml
File "camlp4/boot/camlp4boot.ml", line 3, characters 9-15:
Error: Unbound module Camlp4

For more infos please take a look at http://ppc.koji.fedoraproject.org/kojifiles/work/tasks/3941/2443941/build.log

Comment 1 Richard W.M. Jones 2015-03-23 16:49:58 UTC
The actual error is:

Command got signal -10.

which is probably some kind of bus error (although 'man 7 signal'
says SIGUSR1 which is pretty weird).

Anyway, OCaml does generally work on ppc64 & ppc64le, and we even
maintain a special downstream backend for that.  What hardware is this?

Comment 2 Richard W.M. Jones 2015-03-23 16:50:47 UTC
Also please enable core dumps and grab the stack trace.

Comment 3 Dan Horák 2015-03-23 17:39:46 UTC
Than, have you tried the build with a larger stack? We saw situations when the default was too low and "ulimit -s 65536" helped to workaround the issue.

Comment 4 Richard W.M. Jones 2015-03-23 17:55:35 UTC
(In reply to Dan Horák from comment #3)
> Than, have you tried the build with a larger stack? We saw situations when
> the default was too low and "ulimit -s 65536" helped to workaround the issue.

Yup, that's actually quite likely to be the problem.  If it
turns out to be this we'll have to modify the spec file.

Comment 5 Than Ngo 2015-03-24 11:27:53 UTC
Hi Dan, Richard

yes, with "ulimit -s 65536", ocaml-camlp4 built fine. We should add the workaround in spec file so that it build correctly on ppc in the future.

Thanks,
Than

Comment 6 Than Ngo 2015-03-24 12:06:11 UTC
i have modified the spec file in my local branch and did scratch build. it built fine now

http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=2444438

it's the patch for the spec file.

diff --git a/ocaml-camlp4.spec b/ocaml-camlp4.spec
index f8cd276..b243b73 100644
--- a/ocaml-camlp4.spec
+++ b/ocaml-camlp4.spec
@@ -50,6 +50,10 @@ This package contains the development files.
 
 
 %build
+%ifarch %{power64} 
+ulimit -s 65536
+%endif
+
 ./configure
 # Incompatible with parallel builds:
 unset MAKEFLAGS

Comment 7 Richard W.M. Jones 2015-03-24 12:06:12 UTC
Thanks for testing.  This is fixed in:

ocaml-camlp4-4.02.1-0.4.gitcf1935d3.fc23
ocaml-camlp4-4.02.0-0.9.git87c6a6b0.fc22

Comment 8 Fedora Update System 2015-03-24 12:20:57 UTC
ocaml-camlp4-4.02.0-0.9.git87c6a6b0.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/ocaml-camlp4-4.02.0-0.9.git87c6a6b0.fc22

Comment 9 Fedora Update System 2015-03-26 21:57:15 UTC
Package ocaml-camlp4-4.02.0-0.9.git87c6a6b0.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing ocaml-camlp4-4.02.0-0.9.git87c6a6b0.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-4643/ocaml-camlp4-4.02.0-0.9.git87c6a6b0.fc22
then log in and leave karma (feedback).

Comment 10 Fedora Update System 2015-03-31 21:52:36 UTC
ocaml-camlp4-4.02.0-0.9.git87c6a6b0.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.