ccminer-cryptonight icon indicating copy to clipboard operation
ccminer-cryptonight copied to clipboard

error: ‘memcpy’ was not declared in this scope

Open demosthenesk opened this issue 7 years ago • 9 comments

i get these errors in linux mint 18.3.

user@linuxmint-desktop ~/Dropbox/Cryptocurrencies/Monero XMR/ccminer-cryptonight-0.17 $ ./autogen.sh user@linuxmint-desktop ~/Dropbox/Cryptocurrencies/Monero XMR/ccminer-cryptonight-0.17 $ ./configure checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes /home/user/Dropbox/Cryptocurrencies/Monero XMR/ccminer-cryptonight-0.17/missing: Unknown --is-lightweight' option Try /home/user/Dropbox/Cryptocurrencies/Monero XMR/ccminer-cryptonight-0.17/missing --help' for more information configure: WARNING: 'missing' script is too old or missing checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether to enable maintainer-specific portions of Makefiles... no checking for style of include used by make... GNU checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking dependency style of gcc... gcc3 checking for gcc option to accept ISO C99... none needed checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking whether gcc needs -traditional... no checking dependency style of gcc... gcc3 checking for ranlib... ranlib checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking dependency style of g++... gcc3 checking for gcc option to support OpenMP... -fopenmp checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking sys/endian.h usability... no checking sys/endian.h presence... no checking for sys/endian.h... no checking sys/param.h usability... yes checking sys/param.h presence... yes checking for sys/param.h... yes checking syslog.h usability... yes checking syslog.h presence... yes checking for syslog.h... yes checking for sys/sysctl.h... yes checking whether be32dec is declared... no checking whether le32dec is declared... no checking whether be32enc is declared... no checking whether le32enc is declared... no checking for size_t... yes checking for working alloca.h... yes checking for alloca... yes checking for getopt_long... yes checking whether we can compile AVX code... yes checking whether we can compile XOP code... yes checking whether we can compile AVX2 code... yes checking for json_loads in -ljansson... no checking for pthread_create in -lpthread... yes checking for SSL_library_init in -lssl... yes checking for EVP_DigestFinal_ex in -lcrypto... yes checking for gawk... (cached) gawk checking for curl-config... /usr/bin/curl-config checking for the version of libcurl... 7.47.0 checking for libcurl >= version 7.15.2... yes checking whether libcurl is usable... yes checking for curl_free... yes checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating compat/Makefile config.status: creating compat/jansson/Makefile config.status: creating cpuminer-config.h config.status: executing depfiles commands user@linuxmint-desktop ~/Dropbox/Cryptocurrencies/Monero XMR/ccminer-cryptonight-0.17 $ make make all-recursive make[1]: Entering directory '/home/user/Dropbox/Cryptocurrencies/Monero XMR/ccminer-cryptonight-0.17' Making all in compat make[2]: Entering directory '/home/user/Dropbox/Cryptocurrencies/Monero XMR/ccminer-cryptonight-0.17/compat' Making all in jansson make[3]: Entering directory '/home/user/Dropbox/Cryptocurrencies/Monero XMR/ccminer-cryptonight-0.17/compat/jansson' gcc -DHAVE_CONFIG_H -I. -I../.. -g -O2 -MT dump.o -MD -MP -MF .deps/dump.Tpo -c -o dump.o dump.c mv -f .deps/dump.Tpo .deps/dump.Po gcc -DHAVE_CONFIG_H -I. -I../.. -g -O2 -MT hashtable.o -MD -MP -MF .deps/hashtable.Tpo -c -o hashtable.o hashtable.c mv -f .deps/hashtable.Tpo .deps/hashtable.Po gcc -DHAVE_CONFIG_H -I. -I../.. -g -O2 -MT load.o -MD -MP -MF .deps/load.Tpo -c -o load.o load.c mv -f .deps/load.Tpo .deps/load.Po gcc -DHAVE_CONFIG_H -I. -I../.. -g -O2 -MT strbuffer.o -MD -MP -MF .deps/strbuffer.Tpo -c -o strbuffer.o strbuffer.c mv -f .deps/strbuffer.Tpo .deps/strbuffer.Po gcc -DHAVE_CONFIG_H -I. -I../.. -g -O2 -MT utf.o -MD -MP -MF .deps/utf.Tpo -c -o utf.o utf.c mv -f .deps/utf.Tpo .deps/utf.Po gcc -DHAVE_CONFIG_H -I. -I../.. -g -O2 -MT value.o -MD -MP -MF .deps/value.Tpo -c -o value.o value.c mv -f .deps/value.Tpo .deps/value.Po rm -f libjansson.a ar cru libjansson.a dump.o hashtable.o load.o strbuffer.o utf.o value.o ar: u' modifier ignored since D' is the default (see U') ranlib libjansson.a make[3]: Leaving directory '/home/user/Dropbox/Cryptocurrencies/Monero XMR/ccminer-cryptonight-0.17/compat/jansson' make[3]: Entering directory '/home/user/Dropbox/Cryptocurrencies/Monero XMR/ccminer-cryptonight-0.17/compat' make[3]: Nothing to be done for 'all-am'. make[3]: Leaving directory '/home/user/Dropbox/Cryptocurrencies/Monero XMR/ccminer-cryptonight-0.17/compat' make[2]: Leaving directory '/home/user/Dropbox/Cryptocurrencies/Monero XMR/ccminer-cryptonight-0.17/compat' make[2]: Entering directory '/home/user/Dropbox/Cryptocurrencies/Monero XMR/ccminer-cryptonight-0.17' gcc -DHAVE_CONFIG_H -I. -msse2 -fopenmp -pthread -fno-strict-aliasing -I./compat/jansson -DSCRYPT_KECCAK512 -DSCRYPT_CHACHA -DSCRYPT_CHOOSE_COMPILETIME -g -O2 -MT ccminer-cpu-miner.o -MD -MP -MF .deps/ccminer-cpu-miner.Tpo -c -o ccminer-cpu-miner.o test -f 'cpu-miner.c' || echo './'cpu-miner.c mv -f .deps/ccminer-cpu-miner.Tpo .deps/ccminer-cpu-miner.Po gcc -DHAVE_CONFIG_H -I. -msse2 -fopenmp -pthread -fno-strict-aliasing -I./compat/jansson -DSCRYPT_KECCAK512 -DSCRYPT_CHACHA -DSCRYPT_CHOOSE_COMPILETIME -g -O2 -MT ccminer-util.o -MD -MP -MF .deps/ccminer-util.Tpo -c -o ccminer-util.o test -f 'util.c' || echo './'util.c mv -f .deps/ccminer-util.Tpo .deps/ccminer-util.Po gcc -DHAVE_CONFIG_H -I. -msse2 -fopenmp -pthread -fno-strict-aliasing -I./compat/jansson -DSCRYPT_KECCAK512 -DSCRYPT_CHACHA -DSCRYPT_CHOOSE_COMPILETIME -g -O2 -MT ccminer-sha2.o -MD -MP -MF .deps/ccminer-sha2.Tpo -c -o ccminer-sha2.o test -f 'sha2.c' || echo './'`sha2.c mv -f .deps/ccminer-sha2.Tpo .deps/ccminer-sha2.Po 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 make[2]: Leaving directory '/home/user/Dropbox/Cryptocurrencies/Monero XMR/ccminer-cryptonight-0.17' Makefile:729: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/home/user/Dropbox/Cryptocurrencies/Monero XMR/ccminer-cryptonight-0.17' Makefile:399: recipe for target 'all' failed make: *** [all] Error 2 user@linuxmint-desktop ~/Dropbox/Cryptocurrencies/Monero XMR/ccminer-cryptonight-0.17 $

demosthenesk avatar Dec 06 '17 13:12 demosthenesk

Getting exactly same error

saurabhnemade avatar Dec 09 '17 12:12 saurabhnemade

Same error.. little help??

Fever905 avatar Dec 30 '17 07:12 Fever905

I am getting the exact same error. could it be because of cuda version 7.5? When i updated the cuda driver to version 8 the problem was solved.

JochenWilms avatar Jan 02 '18 20:01 JochenWilms

i think this is the case. i have cuda 7.5 from ubuntu repository.

demosthenesk avatar Jan 02 '18 22:01 demosthenesk

Alternative is xmr-stak. It works fine with cuda 7.5

demosthenesk avatar Jan 02 '18 22:01 demosthenesk

Workround. add -D_FORCE_INLINES as shown in the Make file. Ubuntu 16 with repo NV cuda: sudo apt-get install nvidia-cuda-toolkit

$(NVCC) -g -O2 -I . -Xptxas "-abi=no -v" $(NVCC_GENCODE) --maxrregcount=80 --ptxas-options=-v -D_FORCE_INLINES $(JANSSON_INCLUDES) -o $@ -c $<

ghost avatar Jan 05 '18 04:01 ghost

Confirming this works:

-	$(NVCC) -g -O2 -I . -Xptxas "-abi=no -v" $(NVCC_GENCODE) --maxrregcount=80 --ptxas-options=-v $(JANSSON_INCLUDES) -o $@ -c $<
+	$(NVCC) -g -O2 -I . -Xptxas "-abi=no -v" $(NVCC_GENCODE) --maxrregcount=80 --ptxas-options=-v -D_FORCE_INLINES $(JANSSON_INCLUDES) -o $@ -c $< that adding -

in Makefile

eab avatar Jan 05 '18 10:01 eab

For CUDA 6.5 on Quadro FX 570 (6.5 is newest supporting this card), I had to do the following: --maxregcount=63 in addition ot the -D_FORCE_INLINES

This is using nvidia-340 driver on Ubuntu 16.04 (nvidia-340 is last driver to support Quadro FX 750)

benmesander avatar Jan 07 '18 20:01 benmesander

I need a little additional help. Which makefile do I edit? I edited the makefile.in and when I execute ccminer I get a "stack smashing detected" error and the program terminates.

TheKrimeStopper avatar Apr 12 '18 01:04 TheKrimeStopper