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 1356189

Summary: enable build on ppc64
Product: [Fedora] Fedora Reporter: Dan Horák <dan>
Component: openblasAssignee: Susi Lehtola <susi.lehtola>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: susi.lehtola
Target Milestone: ---   
Target Release: ---   
Hardware: ppc64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-13 22:32:07 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: 1356152    
Bug Blocks: 1071880    

Description Dan Horák 2016-07-13 15:30:32 UTC
With the following spec file change I'm able to build openblas for ppc64

diff --git a/openblas.spec b/openblas.spec
index 886a282..2490fb9 100644
--- a/openblas.spec
+++ b/openblas.spec
@@ -78,7 +78,7 @@ BuildRequires:  lapack64-static
 
 # Upstream supports the package only on these architectures.
 # Runtime processor detection is not available on other archs.
-ExclusiveArch:  x86_64 %{ix86} armv7hl ppc64le aarch64
+ExclusiveArch:  x86_64 %{ix86} armv7hl %{power64} aarch64
 
 %global base_description \
 OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD \
@@ -331,7 +331,7 @@ export AVX="NO_AVX2=1"
 %ifarch armv7hl
 TARGET="TARGET=ARMV7 DYNAMIC_ARCH=0"
 %endif
-%ifarch ppc64le
+%ifarch ppc64 ppc64le
 TARGET="TARGET=POWER8 DYNAMIC_ARCH=0"
 %endif
 %ifarch aarch64
@@ -375,7 +375,7 @@ cp -a %{_includedir}/lapacke %{buildroot}%{_includedir}/%{name}
 %ifarch armv7hl
 suffix="_armv7"
 %endif
-%ifarch ppc64le
+%ifarch ppc64 ppc64le
 suffix="_power8"
 %endif
 %ifarch aarch64

With only extending the ExclusiveArch I got into bug 1356152 which likely shows a bug in the openblas buildsystem (in ./test/Makefile). The %ifarch commands could be switched to %{power64} too.

Having both ppc64 and ppc64le subarches available would make it easier in packages that R: or BR: openblas.

Comment 1 Dan Horák 2016-07-13 16:55:28 UTC
diff --git a/openblas.spec b/openblas.spec
index 886a282..e8e6eb0 100644
--- a/openblas.spec
+++ b/openblas.spec
@@ -78,7 +78,7 @@ BuildRequires:  lapack64-static
 
 # Upstream supports the package only on these architectures.
 # Runtime processor detection is not available on other archs.
-ExclusiveArch:  x86_64 %{ix86} armv7hl ppc64le aarch64
+ExclusiveArch:  x86_64 %{ix86} armv7hl %{power64} aarch64
 
 %global base_description \
 OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD \
@@ -331,6 +331,9 @@ export AVX="NO_AVX2=1"
 %ifarch armv7hl
 TARGET="TARGET=ARMV7 DYNAMIC_ARCH=0"
 %endif
+%ifarch ppc64
+TARGET="TARGET=POWER6 DYNAMIC_ARCH=0"
+%endif
 %ifarch ppc64le
 TARGET="TARGET=POWER8 DYNAMIC_ARCH=0"
 %endif
@@ -375,6 +378,9 @@ cp -a %{_includedir}/lapacke %{buildroot}%{_includedir}/%{name}
 %ifarch armv7hl
 suffix="_armv7"
 %endif
+%ifarch ppc64
+suffix="_power6"
+%endif
 %ifarch ppc64le
 suffix="_power8"
 %endif

Slightly better version, covers more from the ppc64 supported hw. Seems the DYNAMIC_ARCH supports only x86 :-( Would be useful for our ppc64 case ...