-
-
Notifications
You must be signed in to change notification settings - Fork 55.6k
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
‘memcpy’ was not declared in this scope (Ubuntu 16.04) #6500
Comments
Actually I get this error if I try to build all CUDA architectures. Instead I just change 2 CMAKE variables, |
i have tried it on two pc's but it doesnt' work for me Edit: if nessesary i can try it on other pc too. But for the next two weeks i can let one pc in this configuration, if you need more testing. |
One fast workaround is to use as "CUDA_HOST_COMPILER" the "clang-3.5" |
@StevenEWright Hey, can you give an example what exactly you changed in |
The Geforce 940m is 5.0 compatible. |
@jamesapollo2016 I understand it uses CUDA Compute 5.0, but what what should I insert in This is what I get if I set no changes:
I tried all combinations of |
Compiled with 5 just fine for me using cmake-gui. Compiling CUDA for a single version is MUCH FASTER. |
|
I tried addin 50. I get the exact memcpy error. It might not even be in Philip's message seems to be deleted, its available here:
|
since my assumption was wrong after testing this i deleted this again. Since you have to state the version with a dot.
so this wouldn't change a thing. Seems to be different issue for you So did you try already the option "5.0" since this has to be compatible with your 940M? |
@Dikay900 I did it with the dots. I am using the commandline, this is my command: |
can you try making a build folder for building the source and then build again using the commandline option my gui is stating? So something like this:
|
@Dikay900 Does not work, get the same error. I should stress, opencv compiles fine if I do |
I have tried it also on 3 clean installations with ubuntu 16.04 and the "nvidia-cuda-toolkit" isntalled from synaptic. All failed, are you all sure you have the same system? @guysoft |
@tommy87 It works if you disable the nvidia cuda with The reason I don't want to use clang is because I am using the OpenCV installtion to link against Caffe. Correct me if I am wrong, but using different compiles should result in a linking error. |
Im Not sure if it leeds to a linking error... I want to used it also with Caffe, but i hadn't the time to test it yet. But maybe i will try this today and than i can tell you if it works or not |
@guysoft i have tried to compile caffe and i didnt get linking errors @ALL |
Simple replace in opencv/cmake/OpencvDetectCuda.cmake
to
it's work for me! |
@chapaev28 's solution works. Added a pull request. |
👍 |
Similar answer here https://github.com/BVLC/caffe/wiki/Ubuntu-16.04-or-15.10-Installation-Guide |
Please state the information for your system
In which part of the OpenCV library you got the issue?
When trying to compile opencv (ubuntu 16.04) i get the following error:
[ 9%] Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o
/usr/include/string.h: In function ‘void* mempcpy_inline(void, const void, size_t)’:
/usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope
return (char *) memcpy (__dest, __src, __n) + __n;
^
CMake Error at cuda_compile_generated_gpu_mat.cu.o.cmake:264 (message):
Error generating file
/home/mag/opencv/build_opencv_master/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o
The problem is known, but you need to make a workaround to support cuda. Here is a link to the same Proplem in the caffe git, but unfortunetly the solution doesnt work for me:
BVLC/caffe#4046
The text was updated successfully, but these errors were encountered: