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

Building SHOC #67

Open
MahmoudAbdelrehim opened this issue Apr 28, 2020 · 2 comments
Open

Building SHOC #67

MahmoudAbdelrehim opened this issue Apr 28, 2020 · 2 comments

Comments

@MahmoudAbdelrehim
Copy link

I have got an error while trying to build the shoc directory the problem is while compiling for BusSpeedDownload, hence my cuda path is set.
one of the errors I have got is:
/common/main.cpp:60: undefined reference to `cudaSetDevice'
...
Makefile:329: recipe for target 'BusSpeedDownload' failed
make[4]: *** [BusSpeedDownload] Error 1

@FSchoettl
Copy link

FSchoettl commented May 18, 2020

specifying the cuda libs during configure solved it for me: ../configure LIBS="-lcuda -lcudart"

Not sure what caused it though. For me it worked well with cuda 10.0 on a NVIDIA Jetson TX2 and after I wiped it and flashed it with a newer cuda version 10.2 I got the linker errors.

It seems like for some reason config/find_cuda_libs.sh is not able to extract the libraries anymore.

Edit: you also need to set LDFLAGS: ../configure LIBS="-lcuda -lcudart" LDFLAGS="-L/usr/local/cuda/lib64"

@chasays
Copy link

chasays commented Aug 11, 2023

add ' -lcuda -lcudart' to common.mk.in

……
LIBS      = @LIBS@ -lcudart -lcuda
……

btw, compile SHOC in nvidia , and occurred error message " nvcc fatal : unsupported gpu architechture 'compute_30'"
you can disable gencode=arch=xxx with `CUDA_CPPFLAGS='-I/usr/local/cucda/include" to fix it.

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

3 participants