Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pocl 1.4, ppc64le, and c++11 build issue #800

branfosj opened this issue Jan 2, 2020 · 2 comments

pocl 1.4, ppc64le, and c++11 build issue #800

branfosj opened this issue Jan 2, 2020 · 2 comments


Copy link

@branfosj branfosj commented Jan 2, 2020

Building pocl 1.4 on ppc64le (IBM Power9 box) I've hit an issue with the c++11 standard being set as a compiler flag. Using LLVM 9.0.1, GCC 8.3.0 and setting -DENABLE_ICD=0 -DINSTALL_OPENCL_HEADERS=1 as CMake options. The error message is:

/rds/bear-apps/devel/2019b/branfosj-eb-2/EL7/EL7-power9/software/GCCcore/8.3.0/include/c++/8.3.0/cmath:585:31: error: cannot convert int to __vector(4) __bool int in return
   { return __builtin_isinf(__x); }

which lead me to and that suggests a fix.

I've used and this fixes the issue.

@pjaaskel pjaaskel added this to the 1.5 milestone Jan 2, 2020

This comment has been minimized.

Copy link

@branfosj branfosj commented Jan 3, 2020

I've done some more testing and an alternative is the following patch:

diff -aur pocl-1.4.orig/include/CL/cl_platform.h pocl-1.4/include/CL/cl_platform.h
--- pocl-1.4.orig/include/CL/cl_platform.h      2020-01-03 09:55:56.986465000 +0000
+++ pocl-1.4/include/CL/cl_platform.h   2020-01-03 09:59:18.058173021 +0000
@@ -356,6 +356,8 @@
 /* Define basic vector types */
 #if defined( __VEC__ )
    #include <altivec.h>   /* may be omitted depending on compiler. AltiVec spec provides no way to detect whether the header is required. */
+   #undef bool
+   #undef vector
    typedef __vector unsigned char     __cl_uchar16;
    typedef __vector signed char       __cl_char16;
    typedef __vector unsigned short    __cl_ushort8;
@branfosj branfosj mentioned this issue Jan 3, 2020
2 of 2 tasks complete
franz pushed a commit that referenced this issue Mar 25, 2020

This comment has been minimized.

Copy link

@franz franz commented Mar 25, 2020

Messing with LLVM_CXXFLAGS is generally a bad idea, so i have merged the second patch. Thanks

@franz franz closed this Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.