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 1085341 - add ppc64le in macros.ocaml-srpm
Summary: add ppc64le in macros.ocaml-srpm
Keywords:
Status: CLOSED RAWHIDE
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: 1087794
Blocks: F-ExcludeArch-ppc64le, PPC64LETracker
TreeView+ depends on / blocked
 
Reported: 2014-04-08 12:13 UTC by Michel Normand
Modified: 2014-05-14 17:18 UTC (History)
7 users (show)

Fixed In Version: ocaml-4.01.0-14.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1087794 (view as bug list)
Environment:
Last Closed: 2014-05-14 17:18:29 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
redhat-rpm-config.add_ppc64le.patch (1.88 KB, text/x-c)
2014-04-08 12:13 UTC, Michel Normand
no flags Details
redhat-rpm-config.add_ppc64le_for_ocaml.patch (816 bytes, patch)
2014-04-15 08:15 UTC, Michel Normand
no flags Details | Diff

Description Michel Normand 2014-04-08 12:13:41 UTC
Created attachment 884002 [details]
redhat-rpm-config.add_ppc64le.patch

Description of problem: ocaml-easy-format package build failure:
===
Building target platforms: ppc64le
Building for target ppc64le
error: Architecture is not included: ppc64le
===

the problem is caused by missing ppc64le in /etc/rpm/macros.ocaml-srpm
provided by redhat-rpm-config package.

Version-Release number of selected component (if applicable):
redhat-rpm-config-14-1.fc21.

Steps to Reproduce:
1. fedpkg clone -a ocaml-easy-format
2. fedpkg prep

Actual results:
===
$fedpkg prep

error: Architecture is not included: ppc64le
Could not execute prep: Command 'rpmbuild --define '_sourcedir /home/ppc64le/stage2/ocaml-easy-format' --define '_specdir /home/ppc64le/stage2/ocaml-easy-format' --define '_builddir /home/ppc64le/stage2/ocaml-easy-format' --define '_srcrpmdir /home/ppc64le/stage2/ocaml-easy-format' --define '_rpmdir /home/ppc64le/stage2/ocaml-easy-format' --define 'dist .fc21' --define 'fedora 21' --eval '%undefine rhel' --define 'fc21 1' --nodeps -bp /home/ppc64le/stage2/ocaml-easy-format/ocaml-easy-format.spec' returned non-zero exit status 1
===

Additional info:
refer to attach redhat-rpm-config.add_ppc64le.patch to be applied to redhat-rpm-config package to solve this problem.

Comment 1 Panu Matilainen 2014-04-15 07:27:52 UTC
Are ghc, gnat, mono and ocaml actually available for ppc64le? That's what these macros indicate, and we shouldn't add new arches for pieces that dont (yet) exist.

Comment 2 Michel Normand 2014-04-15 08:15:46 UTC
Created attachment 886397 [details]
redhat-rpm-config.add_ppc64le_for_ocaml.patch

as suggested by Panu reduce the patch to the ocaml macro.

Comment 3 Richard W.M. Jones 2014-04-15 08:40:16 UTC
(In reply to Michel Normand from comment #2)
> Created attachment 886397 [details]
> redhat-rpm-config.add_ppc64le_for_ocaml.patch
> 
> as suggested by Panu reduce the patch to the ocaml macro.

In general terms (not related to ppc64le) I wish that
RPM would *not* have an ocaml_arches macro at all.

The macro usually has the wrong contents, but more seriously
it is incorrect: There are two separate sets of OCaml native
arches, those supporting compilation and those supporting
native dynamic linking.  We could define the correct macro(s)
in the OCaml package.

Comment 4 Panu Matilainen 2014-04-15 09:05:45 UTC
These macros are not my invention, its nothing but ridiculous (not to mention cumbersome to all involved parties) that I'm the "maintainer" of these macros when I haven't got a clue. Gnat? Is that a sound caused by swallowing with a dry throat? Although I suppose it means something different here...

The reason these macros are in redhat-rpm-config is a compromise because they need to be present on the buildsystem at .src.rpm creation time (ie before buildrequires have been evaluated) and you dont want to pull in every possible language stack into the buildsys "just because".

Now, perl already has its own "perl-srpm-macros" package which redhat-rpm-config requires for the above reason, this arrangement transfers the language stack control and knowledge out of my lap to where it belongs. So if you Richard want a similar arrangement for OCaml, I'm game. Just be careful not to add excess dependencies to the ocaml-srpm-macros package because that'll get pulled in on a LOT of systems.

Comment 5 Richard W.M. Jones 2014-04-15 09:36:21 UTC
Hmm .. OK.   I didn't realize there was this requirement to have
the macros available before ocaml.rpm was installed.  I will see if
it's easy to build a subpackage with no dependencies and open a
new bug about it if I get anywhere.

Comment 6 Richard W.M. Jones 2014-04-15 11:35:47 UTC
This should be fixed in ocaml-4.01.0-14.fc21.  However I'll
leave this open because of the dependent bug 1087794, and
because it would be good if someone could check that it
actually works.

Comment 7 Michel Normand 2014-04-23 14:38:41 UTC
the changes made with rhbz #1087794
removed ocaml_arches macro and
added ocaml_native_compiler and ocaml_natdynlink macros

old ocaml_arches had two archis (alpha, ia64) that are not present in new macros.
meaning these two (and may be others) do not have ocaml native compiler support.

At least need to update two packages below that used ocaml_arches:
ocaml-easy-format
hevea

I did a test on ppc64le for this two packages removing in spec the line
ExclusiveArch:  %{ocaml_arches}
but I want confirmation that this is the right thing to be done.

Comment 8 Richard W.M. Jones 2014-04-23 14:54:25 UTC
(In reply to Michel Normand from comment #7)
> the changes made with rhbz #1087794
> removed ocaml_arches macro and
> added ocaml_native_compiler and ocaml_natdynlink macros
> 
> old ocaml_arches had two archis (alpha, ia64) that are not present in new
> macros.
> meaning these two (and may be others) do not have ocaml native compiler
> support.

At least IA64 does have a working code generator (although I think
upstream dropped it).  In any case both architectures are obsolete.

> At least need to update two packages below that used ocaml_arches:
> ocaml-easy-format
> hevea

Yup, any use of %{ocaml_arches} is wrong.  I think I got most of
the packages, but I didn't see these two.

> I did a test on ppc64le for this two packages removing in spec the line
> ExclusiveArch:  %{ocaml_arches}
> but I want confirmation that this is the right thing to be done.

Yup, it's correct to remove that line from any spec file that
you see.

Since I don't think you're a Proven Packager, I can do these two
packages if you want.

Comment 9 Richard W.M. Jones 2014-04-23 15:23:25 UTC
(In reply to Richard W.M. Jones from comment #8)
> (In reply to Michel Normand from comment #7)
> > the changes made with rhbz #1087794
> > removed ocaml_arches macro and
> > added ocaml_native_compiler and ocaml_natdynlink macros
> > 
> > old ocaml_arches had two archis (alpha, ia64) that are not present in new
> > macros.
> > meaning these two (and may be others) do not have ocaml native compiler
> > support.
> 
> At least IA64 does have a working code generator (although I think
> upstream dropped it).  In any case both architectures are obsolete.

I checked this out further.  The "retired camels" branch:

https://github.com/retired-camels/ocaml

has support for Alpha & IA64 (and others).  However we don't
ship the retired camels backends in Fedora.  So it is correct
that these two architectures do *not* appear in the new list.

FWIW I've no intention of shipping the obsolete backends from
retired camels.  Someone else will need to come along and do that
work if they care about it.

Comment 10 Michel Normand 2014-04-23 15:33:08 UTC
(In reply to Richard W.M. Jones from comment #8)
> 
> Since I don't think you're a Proven Packager, I can do these two
> packages if you want.

I would appreciate, thanks.

Comment 11 Jaromír Cápík 2014-05-14 17:18:29 UTC
We already have releases 14-17 built for ppc64le. I'm closing this to clean the tracker bug. Feel free to reopen if you wanted to close this later. Thanks for your help.


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