Source: oclgrind
Version: 15.5-1
Severity: normal
Tags: patch

Dear Maintainer,

The package oclgrind fails to build from source on ppc64el with,
initially the error:

  /usr/include/c++/5/bits/cpp_type_traits.h:98:24: error: expected 
primary-expression before '__attribute__'
         enum { __value = bool(_Sp::__value) || bool(_Tp::__value) };

Full log can be found at:
https://buildd.debian.org/status/fetch.php?pkg=oclgrind&arch=ppc64el&ver=15.5-1&stamp=1445511925

I created a patch to bypass usage of altivec with -mno-altivec flag.
The concerns on using the method of the patch I created is that it will
not apply on cross-compiling and it will apply for the whole code, not just
for the parts where it fails.

In any case, the package builds successfully with the patch.
If you have any concerns, please let me know.

Thanks and regards.

Fernando
diff -Nru oclgrind-15.5/debian/changelog oclgrind-15.5/debian/changelog
--- oclgrind-15.5/debian/changelog	2015-09-12 13:22:48.000000000 -0400
+++ oclgrind-15.5/debian/changelog	2015-12-03 10:20:43.000000000 -0500
@@ -1,3 +1,10 @@
+oclgrind (15.5-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Added condition to not use altivec on ppc64el to fix FTBFS 
+
+ -- Fernando Seiti Furusato <ferse...@br.ibm.com>  Thu, 03 Dec 2015 10:20:26 -0500
+
 oclgrind (15.5-1) unstable; urgency=low
 
   * Initial release (Closes: #794787)
diff -Nru oclgrind-15.5/debian/patches/ppc64el-no-altivec.patch oclgrind-15.5/debian/patches/ppc64el-no-altivec.patch
--- oclgrind-15.5/debian/patches/ppc64el-no-altivec.patch	1969-12-31 19:00:00.000000000 -0500
+++ oclgrind-15.5/debian/patches/ppc64el-no-altivec.patch	2015-12-03 10:20:24.000000000 -0500
@@ -0,0 +1,11 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -299,3 +299,8 @@
+ 
+ # Add app tests
+ add_subdirectory(tests/apps)
++
++# Condition not to use altivec on ppc64el
++if (CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64le")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mno-altivec")
++endif()
diff -Nru oclgrind-15.5/debian/patches/series oclgrind-15.5/debian/patches/series
--- oclgrind-15.5/debian/patches/series	2015-09-12 13:22:48.000000000 -0400
+++ oclgrind-15.5/debian/patches/series	2015-12-03 10:20:10.000000000 -0500
@@ -6,3 +6,4 @@
 pch-location.patch
 clang-library-order.patch
 cmake-preserve-flags.patch
+ppc64el-no-altivec.patch

Reply via email to