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

Build fail at mm-reader.cpp #220

Open
GasonC opened this issue May 18, 2022 · 0 comments
Open

Build fail at mm-reader.cpp #220

GasonC opened this issue May 18, 2022 · 0 comments

Comments

@GasonC
Copy link

GasonC commented May 18, 2022

Hi, I am ready to try clSPARSE an Ubuntu 20.04, and I installed AMD ROCm,
then do

cd src && mkdir build && cd build
cmake ..

And I get some error message,
then I do

sudo apt-get install googletest

set PATH

ccmake ..
CXX=/opt/rocm/hip/bin/hipcc
OPENCL_INCLUDE_DIRS=/opt/rocm/opencl/include
OPENCL_LIBRARIES=/opt/rocm/lib/libOpenCL.so
CMAKE_LINKER=/usr/lib/x86_64-linux-gnu

then do

sudo make

but I can't build still.

It shows message below

In file included from /home/user/clSPARSE/src/library/io/mm-reader.cpp:45:
In file included from /home/user/clSPARSE/src/library/include/clSPARSE-private.hpp:26:
In file included from /home/user/clSPARSE/src/include/clSPARSE.h:37:
In file included from /home/user/clSPARSE/src/include/clSPARSE-1x.h:26:
In file included from /home/user/clSPARSE/src/include/clSPARSE-xx.h:28:
In file included from /opt/rocm/opencl/include/CL/cl.h:32:
/opt/rocm/opencl/include/CL/cl_version.h:34:9: warning: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2) [-W#pragma-messages]
#pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)")
^
/home/user/clSPARSE/src/library/io/mm-reader.cpp:123:16: error: non-const lvalue reference to type 'char' cannot bind to a value of unrelated type 'char [4]'
return Typecode;
^~~~~~~~
1 warning and 1 error generated when compiling for gfx1030.
make[2]: *** [library/CMakeFiles/clSPARSE.dir/build.make:80: library/CMakeFiles/clSPARSE.dir/io/mm-reader.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:244: library/CMakeFiles/clSPARSE.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

I googled but no result, so I come here.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant