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

Undeclared identifier sqrt #174

Open
dpo opened this issue Dec 9, 2015 · 3 comments
Open

Undeclared identifier sqrt #174

dpo opened this issue Dec 9, 2015 · 3 comments

Comments

@dpo
Copy link

dpo commented Dec 9, 2015

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
Copy link
Contributor

kknox commented Dec 11, 2015

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
Copy link
Author

dpo commented Dec 11, 2015

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
Copy link
Contributor

kknox commented Dec 16, 2015

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 )

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

2 participants