KlausT / ccminer-cryptonight

Software for mining various cryptocoins, like Monero (pool mining only)
GNU General Public License v3.0
133 stars 30 forks source link

make fails with an error: identifier "nullptr" is undefined #26

Closed crypdick closed 7 years ago

crypdick commented 7 years ago

I tried re-cloning, ran autogen, configure --with-cuda=..., and finally make

richard@pingote-server:~/Apps/ccminer-cryptonight$ make
make  all-recursive
make[1]: Entering directory '/zeepool/Apps/ccminer-cryptonight'
Making all in compat
make[2]: Entering directory '/zeepool/Apps/ccminer-cryptonight/compat'
Making all in jansson
make[3]: Entering directory '/zeepool/Apps/ccminer-cryptonight/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 error.o -MD -MP -MF .deps/error.Tpo -c -o error.o error.c
mv -f .deps/error.Tpo .deps/error.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 memory.o -MD -MP -MF .deps/memory.Tpo -c -o memory.o memory.c
mv -f .deps/memory.Tpo .deps/memory.Po
gcc -DHAVE_CONFIG_H -I. -I../..     -g -O2 -MT pack_unpack.o -MD -MP -MF .deps/pack_unpack.Tpo -c -o pack_unpack.o pack_unpack.c
mv -f .deps/pack_unpack.Tpo .deps/pack_unpack.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 error.o hashtable.o load.o memory.o pack_unpack.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 '/zeepool/Apps/ccminer-cryptonight/compat/jansson'
make[3]: Entering directory '/zeepool/Apps/ccminer-cryptonight/compat'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/zeepool/Apps/ccminer-cryptonight/compat'
make[2]: Leaving directory '/zeepool/Apps/ccminer-cryptonight/compat'
make[2]: Entering directory '/zeepool/Apps/ccminer-cryptonight'
gcc -DHAVE_CONFIG_H -I.  -I/usr/local/cuda-8.0//include -msse2 -I/home/richard/Apps/anaconda3/include -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.  -I/usr/local/cuda-8.0//include -msse2 -I/home/richard/Apps/anaconda3/include -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.  -I/usr/local/cuda-8.0//include -msse2 -I/home/richard/Apps/anaconda3/include -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
/usr/local/cuda-8.0//bin/nvcc -g -O2 -I . -D_FORCE_INLINES -I/usr/local/cuda-8.0//include -gencode=arch=compute_20,code=sm_20 -gencode=arch=compute_20,code=sm_21 -gencode=arch=compute_30,code=sm_30 -gencode=arch=compute_35,code=sm_35 -gencode=arch=compute_37,code=sm_37 -gencode=arch=compute_50,code=sm_50  -gencode=arch=compute_52,code=sm_52 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_61,code=sm_61 --maxrregcount=128 --ptxas-options=-v -I./compat/jansson -o cryptonight/cryptonight.o -c cryptonight/cryptonight.cu
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
cryptonight/cryptonight.cu(217): **error: identifier "nullptr" is undefined**

1 error detected in the compilation of "/tmp/tmpxft_00005544_00000000-21_cryptonight.compute_61.cpp1.ii".
Makefile:1152: recipe for target 'cryptonight/cryptonight.o' failed
make[2]: *** [cryptonight/cryptonight.o] Error 2
make[2]: Leaving directory '/zeepool/Apps/ccminer-cryptonight'
Makefile:726: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/zeepool/Apps/ccminer-cryptonight'
Makefile:396: recipe for target 'all' failed
make: *** [all] Error 2

Here are the outputs from before I ran make:

richard@pingote-server:~/Apps$ rm -rf ccminer-cryptonight/  # starting fresh
richard@pingote-server:~/Apps$ which ccminer  # no ccminer in /usr/
richard@pingote-server:~/Apps$ git clone https://github.com/KlausT/ccminer-cryptonight.git
Cloning into 'ccminer-cryptonight'...
...
richard@pingote-server:~/Apps$ cd ccminer-cryptonight/
richard@pingote-server:~/Apps/ccminer-cryptonight$ ./autogen.sh 
richard@pingote-server:~/Apps/ccminer-cryptonight$ ./configure --with-cuda=/usr/local/cuda-8.0/
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/richard/Apps/ccminer-cryptonight/missing: Unknown `--is-lightweight' option
Try `/home/richard/Apps/ccminer-cryptonight/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... /home/richard/Apps/anaconda3/bin/curl-config
checking for the version of libcurl... 7.52.1
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
KlausT commented 7 years ago

Oops. I always forget the different behaviour of gcc and Visual Studio. Should be fixed now.