ccminer-cryptonight
ccminer-cryptonight copied to clipboard
/usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope
Failed at compile time with the following error:
nvcc -g -O2 -I . -Xptxas "-abi=no -v" -gencode=arch=compute_20,code="sm_20,compute_20" -gencode=arch=compute_30,code="sm_30,compute_30" -gencode=arch=compute_35,code="sm_35,compute_35" --maxrregcount=80 --ptxas-options=-v -I./compat/jansson -o cryptonight/cryptonight.o -c cryptonight/cryptonight.cu ptxas warning : 'option -abi=no' might get deprecated in future ptxas warning : Too big maxrregcount value specified 80, will be ignored ptxas info : 0 bytes gmem ptxas info : Compiling entry function 'cuda_dummy_entry' for 'sm_20' ptxas info : Used 0 registers ptxas warning : 'option -abi=no' might get deprecated in future ptxas warning : Too big maxrregcount value specified 80, will be ignored ptxas info : 0 bytes gmem ptxas info : Compiling entry function 'cuda_dummy_entry' for 'sm_30' ptxas info : Used 0 registers ptxas warning : 'option -abi=no' might get deprecated in future ptxas info : 0 bytes gmem ptxas info : Compiling entry function 'cuda_dummy_entry' for 'sm_35' ptxas info : Used 0 registers /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; ^ Makefile:1155: recipe for target 'cryptonight/cryptonight.o' failed make[2]: ** [cryptonight/cryptonight.o] Error 1
Same here!
Well, considering it's been almost 2 years since the last commit, it may be time to look elsewhere...
And where is elsewhere?
Solution is to add -D_FORCE_INLINES in the Makefile when compiling.
example: NVCC_GENCODE = -D_FORCE_INLINES -gencode=arch=compute_20,code="sm_20,compute
Although I did not have this issue when using CUDA 8, but with CUDA 7.5 I needed to add the flag.
After making @PsychicCat change, compile was succesful but now when running I get:
*** stack smashing detected ***: ./ccminer terminated Aborted (core dumped)
Ubuntu 16.04 Xenial with Cuda 8 drivers. Any ideas?
@emkman haven't seen that issue myself but first try https://github.com/KlausT/ccminer-cryptonight, this fork is being actively maintained.
@PsychicCat excellent, thank you!
GTX 1060, Nv 387, cuda 9 , Linux Mint 18.2 x64 , Ryzen 5 i use this manual. http://fucking-it.com/ru/2016-01-21-14-35-44/bitcoin/854-monero-ccminer-cryptonight-gpu-miner-na-linux
/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;
anybody knows how to do with it?
Somewhere in internet i found method , but this is not work NVCCFLAGS - are not exist. (nvcc of course inalled)
After a long time looking through various internet sources I solved this problem by going to the Makefile and changing the line
NVCCFLAGS += -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS)
into
NVCCFLAGS += -D_FORCE_INLINES -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS)
For me this was on line 406
.cu.o:
$(NVCC) -g -O2 -I . -Xptxas "-abi=no -v" $(NVCC_GENCODE) --maxrregcount=80 --ptxas-options=-v -D_FORCE_INLINES $(JANSSON_INCLUDES) -o $@ -c $<
added: -D_FORCE_INLINES in Makefile
For anybody who had this error shown on his/her terminal while running cuIBM (Immersed Boundary Method Solver developed by the Lorena Barba group) When running "make" as it says in the tutorial https://github.com/barbagroup/cuIBM An error massage may jump out saying /usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope This can be solved adding -D_FORCE_INLINES at the end of the line 10 of the "make" file in the cuIBM folder, so it would look like this: CCFLAGS = -arch=sm_21 -O3 -D_FORCE_INLINES On the other hand, its important to modify the compute capability to your nvdia version see: https://developer.nvidia.com/cuda-gpus
I dont konw if its ok to write it here, if not please notify me.
@comarius That worked. Thank you.
GTX 1060, Nv 387, cuda 9 , Linux Mint 18.2 x64 , Ryzen 5 i use this manual. http://fucking-it.com/ru/2016-01-21-14-35-44/bitcoin/854-monero-ccminer-cryptonight-gpu-miner-na-linux
/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;
anybody knows how to do with it?
Somewhere in internet i found method , but this is not work NVCCFLAGS - are not exist. (nvcc of course inalled)
After a long time looking through various internet sources I solved this problem by going to the Makefile and changing the line
NVCCFLAGS += -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS)
into
NVCCFLAGS += -D_FORCE_INLINES -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS)
For me this was on line 406
where is Makefile
can you tell me where is the Makefile,i dont know how to find it and modify it as you say