2017-05-24 106 views
0

我試圖在Ubuntu 16.04 LTS ppc64le(IBM POWER8)安裝gpuR,但撞向它說「矢量」沒有指定類型」的錯誤安裝gpuR。麻煩Ubuntu上ppc64le

你能請幫助我嗎?任何評論將不勝感激。

> install.packages("gpuR") 
Installing package into ‘/usr/local/lib/R/site-library’ 
(as ‘lib’ is unspecified) 
trying URL 'https://ftp.iitm.ac.in/cran/src/contrib/gpuR_1.2.1.tar.gz' 
Content type 'application/x-gzip' length 451127 bytes (440 KB) 
================================================== 
downloaded 440 KB 

... 

** package ‘gpuR’ successfully unpacked and MD5 sums checked 
OPENCL_FLAGS not set, using default -DCL_HPP_MINIMUM_OPENCL_VERSION=110 - 
DCL_USE_DEPRECATED_OPENCL_1_2_APIS -DCL_HPP_TARGET_OPENCL_VERSION=120 
Linux OS 
found OpenCL library 
Checking OpenCL C++ API 
OPENCL_INC not set, using default include directory /usr/include 
No OpenCL C++ API found, will use the headers contained in the package 

*********** Generated Makevars file *********** 
CXX_STD=CXX11 
PKG_CPPFLAGS=-I../inst/include -DCL_HPP_MINIMUM_OPENCL_VERSION=110 - 
DCL_USE_DEPRECATED_OPENCL_1_2_APIS -DCL_HPP_TARGET_OPENCL_VERSION=120 - 
I'/usr/include/' -I. -pthread 
PKG_CXXFLAGS= 
PKG_LIBS=-lOpenCL 
BUILD_LIB= 

$(SHLIB): $(BUILD_LIB) 

../inst/include/loader/libOpenCL.a: 
     cd ../inst/include/loader/ && $(MAKE) libOpenCL.a \ 
     CC="$(CC)" CFLAGS="$(ALL_CFLAGS)" AR="$(AR)" RM="$(RM)" \ 
     ICD_OS=icd_linux 
*********************************************** 
** libs 
g++ -std=c++11 -I/usr/share/R/include -DNDEBUG -I../inst/include - 
DCL_HPP_MINIMUM_OPENCL_VERSION=110 -DCL_USE_DEPRECATED_OPENCL_1_2_APIS - 
DCL_HPP_TARGET_OPENCL_VERSION=120 -I'/usr/include/' -I. -pthread - 
I"/usr/local/lib/R/site-library/Rcpp/include" -I"/usr/local/lib/R/site- 
library/RcppEigen/include" -I"/usr/local/lib/R/site- 
library/RViennaCL/include" -I"/usr/local/lib/R/site-library/BH/include" - 
fPIC -g -O3 -fstack-protector-strong -Wformat -Werror=format-security - 
Wdate-time -D_FORTIFY_SOURCE=2 -g -c RcppExports.cpp -o RcppExports.o 
g++ -std=c++11 -I/usr/share/R/include -DNDEBUG -I../inst/include - 
DCL_HPP_MINIMUM_OPENCL_VERSION=110 -DCL_USE_DEPRECATED_OPENCL_1_2_APIS - 
DCL_HPP_TARGET_OPENCL_VERSION=120 -I'/usr/include/' -I. -pthread - 
I"/usr/local/lib/R/site-library/Rcpp/include" -I"/usr/local/lib/R/site- 
library/RcppEigen/include" -I"/usr/local/lib/R/site- 
library/RViennaCL/include" -I"/usr/local/lib/R/site-library/BH/include" - 
fPIC -g -O3 -fstack-protector-strong -Wformat -Werror=format-security - 
Wdate-time -D_FORTIFY_SOURCE=2 -g -c chol.cpp -o chol.o 
In file included from ../inst/include/CL/cl.h:35:0, 
       from /usr/local/lib/R/site- 
library/RViennaCL/include/viennacl/ocl/context.hpp:28, 
       from /usr/local/lib/R/site- 
library/RViennaCL/include/viennacl/ocl/backend.hpp:26, 
       from chol.cpp:5: 
../inst/include/CL/cl_platform.h:390:12: error: ‘vector’ does not name a 
type 
    typedef vector unsigned char  __cl_uchar16; 
      ^
../inst/include/CL/cl_platform.h:391:12: error: ‘vector’ does not name a 
type 
typedef vector signed char  __cl_char16; 
      ^
../inst/include/CL/cl_platform.h:392:12: error: ‘vector’ does not name a 
type 
    typedef vector unsigned short __cl_ushort8; 
      ^
../inst/include/CL/cl_platform.h:393:12: error: ‘vector’ does not name a 
type 
    typedef vector signed short  __cl_short8; 

... 

../inst/include/CL/cl_platform.h:1214:5: error: ‘__cl_float4’ does not name 
a type 
    __cl_float4  v4[4]; 
    ^
/usr/lib/R/etc/Makeconf:143: recipe for target 'chol.o' failed 
make: *** [chol.o] Error 1 
ERROR: compilation failed for package ‘gpuR’ 
* removing ‘/usr/local/lib/R/site-library/gpuR’ 

The downloaded source packages are in 
     ‘/tmp/RtmpGoy6Af/downloaded_packages’ 
Warning message: 
In install.packages("gpuR") : 
    installation of package ‘gpuR’ had non-zero exit status 
+0

如果你還沒有簽出[gpuR GitHub](https://github.com/cdeterman/gpuR),你可能想在這裏提出這個問題。 – steveb

+0

謝謝。我也會在那裏發帖。 – nasica88

回答

0

我通過修改包含在gpuR_1.2.1.tar.gz中的cl_platform.h解決了這個特定的問題。我簡單地將「typedef vector」改成了「typedef __vector」。

[email protected]:~$ wget 
https://cran.revolutionanalytics.com/src/contrib/gpuR_1.2.1.tar.gz 

[email protected]:~$ tar -zxvf gpuR_1.2.1.tar.gz 

[email protected]:~$ cd gpuR/inst/include/CL 

[email protected]:~/gpuR/inst/include/CL$ vi cl_platform.h 

    #include <altivec.h> /* may be omitted depending on compiler. AltiVec spec provides no way to detect whether the header is required. */ 
    typedef vector unsigned char  __cl_uchar16; 
    typedef vector signed char  __cl_char16; 
    typedef vector unsigned short __cl_ushort8; 
    typedef vector signed short  __cl_short8; 
    typedef vector unsigned int  __cl_uint4; 
    typedef vector signed int  __cl_int4; 
    typedef vector float    __cl_float4; 
+0

我從gpuR所有者的響應。請參閱https://github.com/cdeterman/gpuR/issues/81 – nasica88