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

Problem building on OS X #201

Open
jason-tilley opened this issue Feb 11, 2018 · 35 comments
Open

Problem building on OS X #201

jason-tilley opened this issue Feb 11, 2018 · 35 comments
Labels

Comments

@jason-tilley
Copy link

I am trying to build this on OS X but it is throwing a couple errors. I tried setting the --no-cpu-verify option but that wasn't even an option in ./configure --help. Does anyone know what the problem is? I'm using the windows-master distribution as that is what is recommended for *nix systems on Cuda 8.

:info:build 2 warnings and 2 errors generated.
:info:build make[2]: *** [ccminer-api.o] Error 1
:info:build make[2]: *** Waiting for unfinished jobs....
:info:build In file included from ccminer.cpp:49:
:info:build ./miner.h:156:21: error: use of undeclared identifier 'bswap_32'
:info:build         return (((uint64_t)bswap_32((uint32_t)((x)& 0xffffffffu)) << 32) | (uint64_t)bswap_32((uint32_t)((x) >> 32)));
:info:build                            ^
:info:build ./miner.h:156:79: error: use of undeclared identifier 'bswap_32'
:info:build         return (((uint64_t)bswap_32((uint32_t)((x)& 0xffffffffu)) << 32) | (uint64_t)bswap_32((uint32_t)((x) >> 32)));
:info:build                                                                                      ^
:info:build ccminer.cpp:440:26: error: use of undeclared identifier 'GetCurrentProcess'
:info:build                 SetProcessAffinityMask(GetCurrentProcess(), mask);
:info:build                                        ^
:info:build ccminer.cpp:442:25: error: use of undeclared identifier 'GetCurrentThread'
:info:build                 SetThreadAffinityMask(GetCurrentThread(), mask);
:info:build                                       ^
:info:build ccminer.cpp:665:4: warning: add explicit braces to avoid dangling else [-Wdangling-else]
:info:build                         else
:info:build                         ^
:info:build ccminer.cpp:1288:74: warning: for loop has empty body [-Wempty-body]
:info:build                 for(i = 0; i < (int)sctx->xnonce2_size && !++sctx->job.xnonce2[i]; i++);
:info:build                                                                                        ^
:info:build ccminer.cpp:1288:74: note: put the semicolon on a separate line to silence this warning
:info:build 2 errors generated.
:info:build ccminer.cpp:1832:11: warning: 30 enumeration values not handled in switch: 'ALGO_INVALID', 'ALGO_BITCOIN', 'ALGO_BLAKE'... [-Wswitch]
:info:build                         switch(opt_algo)
:info:build                                ^
:info:build ccminer.cpp:1832:11: note: add missing switch cases
:info:build                         switch(opt_algo)
:info:build                                ^
:info:build make[2]: *** [ccminer-util.o] Error 1
:info:build 3 warnings and 4 errors generated.
:info:build make[2]: *** [ccminer-ccminer.o] Error 1
:info:build In file included from hashlog.cpp:13:
:info:build ./miner.h:156:21: error: use of undeclared identifier 'bswap_32'
:info:build         return (((uint64_t)bswap_32((uint32_t)((x)& 0xffffffffu)) << 32) | (uint64_t)bswap_32((uint32_t)((x) >> 32)));
:info:build                            ^
:info:build ./miner.h:156:79: error: use of undeclared identifier 'bswap_32'
:info:build         return (((uint64_t)bswap_32((uint32_t)((x)& 0xffffffffu)) << 32) | (uint64_t)bswap_32((uint32_t)((x) >> 32)));
:info:build                                                                                      ^
:info:build 2 errors generated.
@KlausT
Copy link
Owner

KlausT commented Feb 11, 2018

I think you are the first person trying to compile it under OSX.
I fixed the errors and warnings I see above (I think), but there's probably more stuff that doesn't work.

@KlausT KlausT added the bug label Feb 11, 2018
@jason-tilley
Copy link
Author

I appreciate you trying, but because this is not intended for OS X, I understand if you don't want to spend your time on this. In case you're interested, here are the new errors...

:info:build /usr/bin/clang++ -DHAVE_CONFIG_H -I.  -I/opt/local/include  -I/opt/local/include -pthread -fno-strict-aliasing  -I/usr/local/cuda/include -DUSE_WRAPNVML -DSCRYPT_KECCAK512 -DSCRYPT_CHACHA -DSCRYPT_CHOOSE_COMPILETIME -I/opt/local/include  -pipe -Os -stdlib=libc++ -arch x86_64 -MT ccminer-hashlog.o -MD -MP -MF .deps/ccminer-hashlog.Tpo -c -o ccminer-hashlog.o `test -f 'hashlog.cpp' || echo './'`hashlog.cpp
:info:build In file included from util.cpp:32:
:info:build ./miner.h:156:21: error: use of undeclared identifier 'swap_32'; did you mean 'swab32'?
:info:build         return (((uint64_t)swap_32((uint32_t)((x)& 0xffffffffu)) << 32) | (uint64_t)swap_32((uint32_t)((x) >> 32)));
:info:build                            ^~~~~~~
:info:build                            swab32
:info:build ./miner.h:135:24: note: 'swab32' declared here
:info:build static inline uint32_t swab32(uint32_t x)
:info:build                        ^
:info:build ./miner.h:156:78: error: use of undeclared identifier 'swap_32'; did you mean 'swab32'?
:info:build         return (((uint64_t)swap_32((uint32_t)((x)& 0xffffffffu)) << 32) | (uint64_t)swap_32((uint32_t)((x) >> 32)));
:info:build                                                                                     ^~~~~~~
:info:build                                                                                     swab32
:info:build ./miner.h:135:24: note: 'swab32' declared here
:info:build static inline uint32_t swab32(uint32_t x)
:info:build                        ^
:info:build In file included from api.cpp:33:
:info:build ./miner.h:156:21: error: use of undeclared identifier 'swap_32'; did you mean 'swab32'?
:info:build         return (((uint64_t)swap_32((uint32_t)((x)& 0xffffffffu)) << 32) | (uint64_t)swap_32((uint32_t)((x) >> 32)));
:info:build                            ^~~~~~~
:info:build                            swab32
:info:build ./miner.h:135:24: note: 'swab32' declared here
:info:build static inline uint32_t swab32(uint32_t x)
:info:build                        ^
:info:build ./miner.h:156:78: error: use of undeclared identifier 'swap_32'; did you mean 'swab32'?
:info:build         return (((uint64_t)swap_32((uint32_t)((x)& 0xffffffffu)) << 32) | (uint64_t)swap_32((uint32_t)((x) >> 32)));
:info:build                                                                                     ^~~~~~~
:info:build                                                                                     swab32
:info:build ./miner.h:135:24: note: 'swab32' declared here
:info:build static inline uint32_t swab32(uint32_t x)
:info:build                        ^
:info:build 2 errors generated.
:info:build make[2]: *** [ccminer-util.o] Error 1
:info:build make[2]: *** Waiting for unfinished jobs....
:info:build api.cpp:216:57: warning: 'strncpy' call operates on objects of type 'char' while the size is based on a different type 'char *' [-Wsizeof-pointer-memaccess]
:info:build                 strncpy(jobid, stratum.job.job_id, sizeof(stratum.job.job_id));
:info:build                                ~~~~~~~~~~~~~~~~~~         ~~~~~~~~~~~~^~~~~~
:info:build api.cpp:216:57: note: did you mean to provide an explicit length?
:info:build                 strncpy(jobid, stratum.job.job_id, sizeof(stratum.job.job_id));
:info:build                                                           ~~~~~~~~~~~~^~~~~~
:info:build api.cpp:889:35: warning: '&&' within '||' [-Wlogical-op-parentheses]
:info:build                                 if (opt_debug || opt_protocol && n > 0)
:info:build                                               ~~ ~~~~~~~~~~~~~^~~~~~~~
:info:build api.cpp:889:35: note: place parentheses around the '&&' expression to silence this warning
:info:build                                 if (opt_debug || opt_protocol && n > 0)
:info:build                                                               ^
:info:build                                                  (                    )
:info:build 2 warnings and 2 errors generated.
:info:build make[2]: *** [ccminer-api.o] Error 1
:info:build In file included from ccminer.cpp:49:
:info:build ./miner.h:156:21: error: use of undeclared identifier 'swap_32'; did you mean 'swab32'?
:info:build         return (((uint64_t)swap_32((uint32_t)((x)& 0xffffffffu)) << 32) | (uint64_t)swap_32((uint32_t)((x) >> 32)));
:info:build                            ^~~~~~~
:info:build                            swab32
:info:build ./miner.h:135:24: note: 'swab32' declared here
:info:build static inline uint32_t swab32(uint32_t x)
:info:build                        ^
:info:build ./miner.h:156:78: error: use of undeclared identifier 'swap_32'; did you mean 'swab32'?
:info:build         return (((uint64_t)swap_32((uint32_t)((x)& 0xffffffffu)) << 32) | (uint64_t)swap_32((uint32_t)((x) >> 32)));
:info:build                                                                                     ^~~~~~~
:info:build                                                                                     swab32
:info:build ./miner.h:135:24: note: 'swab32' declared here
:info:build static inline uint32_t swab32(uint32_t x)
:info:build                        ^
:info:build In file included from hashlog.cpp:13:
:info:build ./miner.h:156:21: error: use of undeclared identifier 'swap_32'; did you mean 'swab32'?
:info:build         return (((uint64_t)swap_32((uint32_t)((x)& 0xffffffffu)) << 32) | (uint64_t)swap_32((uint32_t)((x) >> 32)));
:info:build                            ^~~~~~~
:info:build                            swab32
:info:build ./miner.h:135:24: note: 'swab32' declared here
:info:build static inline uint32_t swab32(uint32_t x)
:info:build                        ^
:info:build ./miner.h:156:78: error: use of undeclared identifier 'swap_32'; did you mean 'swab32'?
:info:build         return (((uint64_t)swap_32((uint32_t)((x)& 0xffffffffu)) << 32) | (uint64_t)swap_32((uint32_t)((x) >> 32)));
:info:build                                                                                     ^~~~~~~
:info:build                                                                                     swab32
:info:build ./miner.h:135:24: note: 'swab32' declared here
:info:build static inline uint32_t swab32(uint32_t x)
:info:build                        ^
:info:build 2 errors generated.
:info:build make[2]: *** [ccminer-ccminer.o] Error 1
:info:build 2 errors generated.
:info:build make[2]: *** [ccminer-hashlog.o] Error 1
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_Users_hackintosh_ports_devel_ccminer/ccminer/work/ccminer-windows'
:info:build make[1]: *** [all-recursive] Error 1
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_Users_hackintosh_ports_devel_ccminer/ccminer/work/ccminer-windows'
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_Users_hackintosh_ports_devel_ccminer/ccminer/work/ccminer-windows'
:info:build Command failed:  cd "/opt/local/var/macports/build/_Users_hackintosh_ports_devel_ccminer/ccminer/work/ccminer-windows" && /usr/bin/make -j4 -w all 
:info:build Exit code: 2
:error:build Failed to build ccminer: command execution failed

@KlausT
Copy link
Owner

KlausT commented Feb 11, 2018

Oops, I fixed the typo with another typo. Lol.
By the way, I think clang is showing more warning messages than GCC.

@jason-tilley
Copy link
Author

I this fails, I'll try with gcc7.

@jason-tilley
Copy link
Author

So both clang and gcc fail similarly. Now they are complaining that they can't find nvcc. This is odd to me, because it is in my path. It seems to be looking for it in bin/sh for some reason. Is there a configure option to change this? I tried '--nvcc-prefix=/usr/local/cuda/bin/', but that was a no-go.

:info:build /bin/sh: nvcc: command not found
:info:build make[2]: *** [cuda_groestlcoin.o] Error 127
:info:build make[2]: *** Waiting for unfinished jobs....

@KlausT
Copy link
Owner

KlausT commented Feb 11, 2018

Maybe --with-cuda=/usr/local/cuda is the right option?
I have no clue about the whole configure stuff.
The build.sh script doesn't work for you, I guess?

@jason-tilley
Copy link
Author

That gets me past that issue. Now I'm dealing with an issue that still involves clang somehow. This may be a problem on my end that I will need to solve to get past. I am executing the configure/build with gcc, but it still gives me this message.

:info:build nvcc fatal : The version ('90000') of the host compiler ('Apple clang') is not supported

My build argument is

/usr/bin/make -j4 -w all CC=/opt/local/bin/gcc CXX=/opt/local/bin/g++ CPP=/opt/local/bin/g++

I wonder if nvcc is compiled by clang and I'm just out of luck.

@KlausT
Copy link
Owner

KlausT commented Feb 11, 2018

I think the CUDA 8 Toolkit doesn't work with this version.
Maybe CUDA 9.1 would work there.
http://docs.nvidia.com/cuda/cuda-installation-guide-mac-os-x/index.html

@jason-tilley
Copy link
Author

Thanks. This is very helpful. I guess it's time I upgrade to High Sierra so I can get CUDA 9.1. Once I do that I'll report back.

@jason-tilley
Copy link
Author

Well a new OS, and a new set of problems. It won't go pas the configure phase now. Now I'm getting

configure.ac:103: error: possibly undefined macro: AC_MSG_ERROR
If this token and others are legitimate, please use m4_pattern_allow.

A bit of Googling suggests this is often caused by not having pkgconfig installed, but I do. This is probably specific to my system, so I'm going to do some more digging.

@jason-tilley
Copy link
Author

OK, it was a curl dependency issue. Now it reaches the build phase. I'm now getting some errors related to swab32.

:info:build ptxas info    : Used 63 registers, 344 bytes cmem[0], 8 bytes cmem[2]
:info:build ./cuda_helper.h(978): error: identifier "cuda_swab32" is undefined
:info:build ./cuda_helper.h(983): error: identifier "cuda_swab32" is undefined
:info:build ./cuda_helper.h(990): error: identifier "cuda_swab32" is undefined
:info:build cuda_groestlcoin.cu(36): error: identifier "cuda_swab32" is undefined
:info:build 4 errors detected in the compilation of "/opt/local/var/macports/build/_Users_hackintosh_ports_devel_ccminer/ccminer/work/.tmp/tmpxft_0000735f_00000000-4_cuda_groestlcoin.cpp4.ii".
:info:build make[2]: *** [cuda_groestlcoin.o] Error 2

@KlausT
Copy link
Owner

KlausT commented Feb 11, 2018

That's wierd.
There are 4 definitions of cuda_swab32, one of those should apply.
Line 166 for CUDA,
Line 175 for GCC,
Line 179 for Windows,
Line 181 for "other"

@KlausT
Copy link
Owner

KlausT commented Feb 11, 2018

Oh, I see.
If GCC is older than 4.3 then it's undefined.
Maybe clang pretends to be 4.2 or something, I don't know.
Thw error should be fixed now.

@jason-tilley
Copy link
Author

jason-tilley commented Feb 11, 2018

That is strange, because it did that even when compiling with gcc7. It seems to be getting much further, but I have a new error now:

:info:build /usr/local/cuda/bin/nvcc -gencode=arch=compute_61,code=sm_61 -gencode=arch=compute_52,code=sm_52 -gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_37,code=sm_37 -gencode=arch=compute_35,code=sm_35 -gencode=arch=compute_30,code=sm_30 -I/usr/local/cuda/include -I.  --ptxas-options="-v" --maxrregcount=128 -o Algo256/keccak256.o -c Algo256/keccak256.cu
:info:build ptxas info    : 0 bytes gmem
:info:build ptxas info    : Compiling entry function '_Z20skein256_gpu_hash_32jjPy' for 'sm_30'
:info:build ptxas info    : Function properties for _Z20skein256_gpu_hash_32jjPy
:info:build     16 bytes stack frame, 12 bytes spill stores, 12 bytes spill loads
:info:build ptxas info    : Used 63 registers, 336 bytes cmem[0], 8 bytes cmem[2]
:info:build Algo256/keccak256.cu(39): error: thread-local variable cannot be dynamically initialized
:info:build 1 error detected in the compilation of "/opt/local/var/macports/build/_Users_hackintosh_ports_devel_ccminer/ccminer/work/.tmp/tmpxft_00000c0b_00000000-11_keccak256.compute_30.cpp1.ii".
:info:build make[2]: *** [Algo256/keccak256.o] Error 1

@rooi
Copy link

rooi commented Feb 11, 2018

I’ve successfully compiled tpruvot’s version of ccminer on macos with cuda 9.1. Perhaps you can compare cu files and find a diff causing the error.

https://github.com/rooi/ccminer_macos

@KlausT
Copy link
Owner

KlausT commented Feb 11, 2018

Looks like there are modified configure.ac and Makefile.am

I think C++11 is probably not enabled if you get the error "thread-local variable cannot be dynamically initialized" because then GCC thinks nullptr is a variable.
The Linux people don't have a problem with this.

@KlausT
Copy link
Owner

KlausT commented Feb 11, 2018

Please try it again with clang

@jason-tilley
Copy link
Author

Still fails... here is the code. I will also make sure I am using the correct C++ library.

:info:build /usr/bin/clang++ -DHAVE_CONFIG_H -I.  -I/opt/local/include  -I/opt/local/include  -fno-strict-aliasing  -I/usr/local/cuda/include -DUSE_WRAPNVML -DSCRYPT_KECCAK512 -DSCRYPT_CHACHA -DSCRYPT_CHOOSE_COMPILETIME -I/usr/local/llvm/lib/clang/4.0.0/include -I/opt/local/include  -pipe -Os -stdlib=libc++ -arch x86_64 -MT ccminer-myriadgroestl.o -MD -MP -MF .deps/ccminer-myriadgroestl.Tpo -c -o ccminer-myriadgroestl.o `test -f 'myriadgroestl.cpp' || echo './'`myriadgroestl.cpp
:info:build groestlcoin.cppmyriadgroestl.cpp::55:40:36: error: initializer for thread-local variable must be a constant expression
:info:build         static THREAD uint32_t *h_found = nullptr;
:info:build                                           ^~~~~~~
:info:build 40: error: initializer for thread-local variable must be a constant expression
:info:build /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__nullptr:49:17: note: expanded from macro 'nullptr'
:info:build #define nullptr _VSTD::__get_nullptr_t()
:info:build                 ^~~~~~~~~~~~~~~~~~~~~~~~
:info:build         static THREAD uint32_t *foundNounce = nullptr;
:info:build                                               ^~~~~~~
:info:build /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__config:392:15: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__nullptrnote: expanded from macro '_VSTD'
:info:build #define _VSTD std::_LIBCPP_NAMESPACE
:info:build               ^
:info:build :49:17: note: expanded from macro 'nullptr'
:info:build #define nullptr _VSTD::__get_nullptr_t()
:info:build                 ^~~~~~~~~~~~~~~~~~~~~~~~
:info:build /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__config:392:15: note: expanded from macro '_VSTD'
:info:build #define _VSTD std::_LIBCPP_NAMESPACE
:info:build               ^
:info:build 1 error generated.
:info:build 1 error generated.
:info:build make[2]: *** [ccminer-myriadgroestl.o] Error 1
:info:build make[2]: *** Waiting for unfinished jobs....
:info:build make[2]: *** [ccminer-groestlcoin.o] Error 1

@jason-tilley
Copy link
Author

Look like I am using libc++, which supports C++11 if I am not mistaken.

@KlausT
Copy link
Owner

KlausT commented Feb 12, 2018

I think you need the -std=c++11 option

@jason-tilley
Copy link
Author

When I set with -std=c++11 I get a similar error. To be clear, should I still have -stdlib=libc++ set as a cxx flag?

:info:build /usr/local/cuda/bin/nvcc -gencode=arch=compute_61,code=sm_61 -gencode=arch=compute_52,code=sm_52 -gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_37,code=sm_37 -gencode=arch=compute_35,code=sm_35 -gencode=arch=compute_30,code=sm_30 -I/usr/local/cuda/include -I.  --ptxas-options="-v" --maxrregcount=128 -o Algo256/keccak256.o -c Algo256/keccak256.cu
:info:build Algo256/keccak256.cu(39): error: thread-local variable cannot be dynamically initialized
:info:build 1 error detected in the compilation of "/opt/local/var/macports/build/_Users_hackintosh_ports_devel_ccminer/ccminer/work/.tmp/tmpxft_0000100b_00000000-11_keccak256.compute_30.cpp1.ii".
:info:build make[2]: *** [Algo256/keccak256.o] Error 1

@KlausT
Copy link
Owner

KlausT commented Feb 13, 2018

Try -std=c++11 as a nvcc option.
I don't know if the -stdlib=libc++ is needed

@jason-tilley
Copy link
Author

Thanks. Sorry, I know little about this stuff. How do I add that as an nvcc option?

@KlausT
Copy link
Owner

KlausT commented Feb 13, 2018

Did you try the build.sh script?

@jason-tilley
Copy link
Author

I did not. I will look that over tomorrow. Thanks.

@jason-tilley
Copy link
Author

I did not see any cuda options in build.sh, but I saw some cuda configuration options in configure.sh. I added -std=c++11 after Xcompiler, but it still isn't putting it in nvcc's build commands. Do you know the proper way to set this? Or do I need to manually edit build.sh or the Makefile somehow.

CUDA_CFLAGS="-O3 -std=c++11 -Xcompiler -std=c++11,-fno-strict-aliasing,-Wall -D_FORCE_INLINES" ./configure CXXFLAGS="-O3 $extracflags" --with-cuda=/usr/local/cuda --with-nvml=libnvidia-ml.so

But build command is:

:info:build /usr/local/cuda/bin/nvcc -gencode=arch=compute_61,code=sm_61 -gencode=arch=compute_52,code=sm_52 -gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_37,code=sm_37 -gencode=arch=compute_35,code=sm_35 -gencode=arch=compute_30,code=sm_30 -I/usr/local/cuda/include -I. --maxrregcount=128 -o Algo256/keccak256.o -c Algo256/keccak256.cu

@jason-tilley
Copy link
Author

jason-tilley commented Feb 13, 2018

Although I'm looking at this, and I'm noticing it is looking for libnvidia-ml.so, which as far as I know doesn't come with the Mac CUDA drivers. I believe the proper library is libcuda.dylib on a Mac, but I'll need to do more research.

@KlausT
Copy link
Owner

KlausT commented Feb 14, 2018

Under Linux the build.sh script is working as it is, no need to add -std=c++11 there

@jason-tilley
Copy link
Author

jason-tilley commented Feb 14, 2018

OK, so I managed to get -std=c++11 into nvcc by editing Makefile.am like here:

nvcc_FLAGS = $(nvcc_ARCH) @CUDA_INCLUDES@ -I. @CUDA_CFLAGS@ -std=c++11

Now it is complaining it can't find libomp, which is strange because I have it installed, so I will figure out what's going on there and let you know. And I also thought I'd let you know that you are the most dedicated maintainer that I have ever come across. We are at 28 comments at this point, and you have been very patient with someone that knows very little about C++, CUDA, and Automake. You may be at Saint-like status at this point. Thanks.

@jason-tilley
Copy link
Author

I had to hack in my noncompliant openmp directory into Makefile.am as:

ccminer_LDFLAGS += -L/usr/local/llvm/lib -I/opt/local/include/libomp -L/opt/local/lib/libomp

but it built! There are a few rpath issues I'm gonna have to fix, but I think we can call this solved. I'm gonna fork this, and hopefully never have to worry about it again. And again, I can't thank you enough. Thanks for all your help.

@jason-tilley
Copy link
Author

jason-tilley commented Feb 14, 2018

At the risk of embarrassing myself, would the following message mean that the GTX 650 😬 isn't supported? Or is something not right with my install?

GPU #0: this GPU is not supported

@KlausT
Copy link
Owner

KlausT commented Feb 14, 2018

I think neoscrypt is broken for these kind of old cards, but when you want to test it you could make two small changes:
In this line:

if(cc <= 30)

remove the =
and in this line:
$(NVCC) -gencode=arch=compute_61,code=sm_61 @CUDA_INCLUDES@ -I. $(JANSSON_INCLUDES) @CUDA_CFLAGS@ -o $@ -c $<

add -gencode=arch=compute_30,code=sm_30

@jason-tilley
Copy link
Author

Great! I'll give it a shot. If not, no big deal. I was planning on upgrading soon anyway.

@jason-tilley
Copy link
Author

jason-tilley commented Feb 14, 2018

Unfortunately, it won't build with these changes. Thanks anyway.

:info:build ptxas /opt/local/var/macports/build/_Users_hackintosh_ports_devel_ccminer/ccminer/work/.tmp/tmpxft_000050de_00000000-5_cuda_neoscrypt_tpruvot.compute_30.ptx, line 17823; error   : Instruction 'shf.r' requires .target sm_32 or higher
:info:build ptxas /opt/local/var/macports/build/_Users_hackintosh_ports_devel_ccminer/ccminer/work/.tmp/tmpxft_000050de_00000000-5_cuda_neoscrypt_tpruvot.compute_30.ptx, line 17834; error   : Instruction 'shf.r' requires .target sm_32 or higher
:info:build ptxas /opt/local/var/macports/build/_Users_hackintosh_ports_devel_ccminer/ccminer/work/.tmp/tmpxft_000050de_00000000-5_cuda_neoscrypt_tpruvot.compute_30.ptx, line 20136; error   : Instruction 'shf.r' requires .target sm_32 or higher
:info:build ptxas fatal   : Ptx assembly aborted due to errors
:info:build make[2]: *** [neoscrypt/cuda_neoscrypt_tpruvot.o] Error 255

@jason-tilley
Copy link
Author

Just as an update, your changes let me run ccminer when I used a newer video card (GTX1070).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants