Skip to content

Build fail at mm-reader.cpp #220

@GasonC

Description

@GasonC

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions