clMathLibraries / clSPARSE

a software library containing Sparse functions written in OpenCL
Apache License 2.0
173 stars 61 forks source link

Undeclared identifier sqrt #174

Open dpo opened 8 years ago

dpo commented 8 years ago

I'm trying to build clsparse using the missing cl.hpp header (as mentioned in #139) on OSX 10.9, and I'm getting an error:

[ 22%] Linking CXX shared library libclsparseTimer.dylib
/tmp/clsparse20151209-96503-gdqb4b/clSPARSE-0.8.1.0/src/benchmarks/cusparse-bench/src/statisticalTimer.cpp:240:9: error: use of undeclared identifier 'sqrt'
        return  sqrt( variance );
                ^
1 error generated.

Any ideas?

kknox commented 8 years ago

Sounds like we are missing a header file for the benchmark program. Funny thing is that I believe this compiles on travis. I assume that this is something that fixed itself on 10.10 or 10.11.

As a fast fix, the benchmark program is not needed; you can configure cmake to not build it.

dpo commented 8 years ago

I see, thanks. What would be the CMake flags to skip building the benchmark?

ps: the goal here is to build a Homebrew formula.

kknox commented 8 years ago

Does not look like there is yet a way to pass a flag from the superbuild into the clsparse subproject build.
As a test for you, you could try modifying src/clsparseTimer/CMakeLists.txt:59 to target_link_libraries( clsparseTimer ${OPENCL_LIBRARIES} -lm )