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

fails to compile on high sierra #16

Closed
Hendler opened this Issue Dec 19, 2017 · 20 comments

Comments

5 participants
@Hendler

Hendler commented Dec 19, 2017

Using cuda Mac oS 10.3.1

-- Boost version: 1.66.0
-- Found the following Boost libraries:
...
------------------------------------------------------------------------
--                  CMake Version                            3.10.1
-- CMAKE_BUILD_TYPE Build type                               Release
-- TARGET_PLATFORM  Target platform                          Darwin
-- BUNDLE           Build bundle                             cudaminer
--------------------------------------------------------------- features
--                  Chromium support                         1
--                  Hardware identification support          FALSE
--                  HTTP Request support                     TRUE
-- VMTRACE          VM execution tracing                     OFF
-- PROFILING        Profiling support                        OFF
-- FATDB            Full database exploring                  
-- JSONRPC          JSON-RPC support                         ON
-- OLYMPIC          Default to the Olympic network           OFF
------------------------------------------------------------- components
-- MINER            Build miner                              ON
-- GUI              Build GUI components                     OFF
-- ETHASHCL         Build OpenCL components                  ON
-- ETHASHCUDA       Build CUDA components                    ON
-- ETHSTRATUM       Build Stratum components                 ON
------------------------------------------------------------------------
...
[  8%] Built target BuildInfo.h
[ 10%] Linking CXX shared library libethash.dylib
[ 10%] Built target ethash
[ 12%] Generating OpenCL Kernel Byte Array
[ 14%] Building NVCC (Device) object libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o
nvcc fatal   : Unsupported gpu architecture 'compute_20'
CMake Error at ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o.Release.cmake:219 (message):
  Error generating
  /Users/hendler/Downloads/mining/Ethminer-for-macOS/build/libethash-cuda/CMakeFiles/ethash-cuda.dir//./ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o


make[2]: *** [libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o] Error 1
make[1]: *** [libethash-cuda/CMakeFiles/ethash-cuda.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Scanning dependencies of target ethash-cl
...

[ 57%] Building CXX object libdevcore/CMakeFiles/devcore.dir/TrieHash.cpp.o
/Users/[]/Downloads/mining/Ethminer-for-macOS/libdevcore/StructuredLogger.cpp:52:8: warning: 'FastWriter' is
      deprecated: Use StreamWriterBuilder instead [-Wdeprecated-declarations]
        Json::FastWriter fastWriter;
              ^
/usr/local/include/json/writer.h:159:7: note: 'FastWriter' has been explicitly marked deprecated here
class JSONCPP_DEPRECATED("Use StreamWriterBuilder instead") JSON_API FastWriter : public Writer {
      ^
/usr/local/include/json/config.h:124:58: note: expanded from macro 'JSONCPP_DEPRECATED'
#    define JSONCPP_DEPRECATED(message)  __attribute__ ((deprecated(message)))
                                                         ^
[ 59%] Building CXX object libdevcore/CMakeFiles/devcore.dir/Worker.cpp.o
1 warning generated.
[ 61%] Linking CXX shared library libdevcore.dylib
[ 61%] Built target devcore
make: *** [all] Error 2

screen shot 2017-12-19 at 2 41 44 am

@sergiorru

This comment has been minimized.

sergiorru commented Dec 26, 2017

Same issue here.

[ 10%] Built target ethash
[ 12%] Building NVCC (Device) object libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o
[ 18%] Built target ethash-cl
nvcc fatal : Unsupported gpu architecture 'compute_20'
CMake Error at ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o.Release.cmake:219 (message):
Error generating
/Users/so/Documents/_mining/Ethminer-for-macOS/build/libethash-cuda/CMakeFiles/ethash-cuda.dir//./ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o

make[2]: *** [libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o] Error 1
make[1]: *** [libethash-cuda/CMakeFiles/ethash-cuda.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 18%] Built target BuildInfo.h
[ 61%] Built target devcore
make: *** [all] Error 2

Any news ?

@ArtSabintsev

This comment has been minimized.

Owner

ArtSabintsev commented Dec 26, 2017

I will take a look as soon as I get a chance.

@sergiorru

This comment has been minimized.

sergiorru commented Dec 26, 2017

Thanks Arthur I appreciate any help.

Best Regards!

@ArtSabintsev

This comment has been minimized.

Owner

ArtSabintsev commented Dec 26, 2017

No problem. I'l try to get to it today/tonight.

@ArtSabintsev

This comment has been minimized.

Owner

ArtSabintsev commented Dec 27, 2017

Try downloading the latest build.

I fixed the FastWriter issue, however, I do not have an nvidia GPU, so I can't test it properly.

@ArtSabintsev

This comment has been minimized.

Owner

ArtSabintsev commented Dec 27, 2017

Can one of you fine folks test to make sure this works? Thanks!

@Hendler @sergiorru @abandin-stratio, @JosephDuffy

@neillt

This comment has been minimized.

neillt commented Dec 27, 2017

I was literally trying to compile right now. It's failing with the following:

[ 14%] Building NVCC (Device) object libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o
[ 14%] Generating OpenCL Kernel Byte Array
nvcc fatal : Unsupported gpu architecture 'compute_20'
CMake Error at ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o.Release.cmake:219 (message):
Error generating
/Users/neillt/etherium/Ethminer-for-macOS/build/libethash-cuda/CMakeFiles/ethash-cuda.dir//./ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o

make[2]: *** [libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o] Error 1
make[1]: *** [libethash-cuda/CMakeFiles/ethash-cuda.dir/all] Error 2

@ArtSabintsev

This comment has been minimized.

Owner

ArtSabintsev commented Dec 27, 2017

Unsupported gpu architecture 'compute_20'

This means you need to install the nvidia driver before running this script: https://developer.nvidia.com/cuda-downloads

@Hendler

This comment has been minimized.

Hendler commented Dec 28, 2017

during make -j8 I get the same error, I do have NVidia installed, but may be a compatibility issue

Files "/Users/hendler/eth/Ethminer-for-macOS/build/BuildInfo.h.tmp" to "/Users/hendler/eth/Ethminer-for-macOS/build/BuildInfo.h" are different.
[  8%] Built target BuildInfo.h
[ 10%] Linking CXX shared library libethash.dylib
[ 10%] Built target ethash
[ 14%] Generating OpenCL Kernel Byte Array
[ 14%] Building NVCC (Device) object libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o
nvcc fatal   : Unsupported gpu architecture 'compute_20'
CMake Error at ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o.Release.cmake:219 (message):
  Error generating
  /Users/hendler/eth/Ethminer-for-macOS/build/libethash-cuda/CMakeFiles/ethash-cuda.dir//./ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o


make[2]: *** [libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o] Error 1
make[1]: *** [libethash-cuda/CMakeFiles/ethash-cuda.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Scanning dependencies of target ethash-cl

screen shot 2017-12-27 at 7 23 46 pm

@Hendler

This comment has been minimized.

Hendler commented Dec 28, 2017

openCL produces the following:

In file included from /Users/hendler/eth/Ethminer-for-macOS/ethminer/main.cpp:39:
/Users/hendler/eth/Ethminer-for-macOS/ethminer/MinerAux.h:777:26: warning: variable 'completed' used in loop condition not modified in loop body
      [-Wfor-loop-analysis]
                        for (unsigned i = 0; !completed; ++i)
                                              ^~~~~~~~~
/Users/hendler/eth/Ethminer-for-macOS/ethminer/MinerAux.h:899:29: error: reference to 'chrono' is ambiguous
                                        this_thread::sleep_for(chrono::milliseconds(_recheckPeriod));
                                                               ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/chrono:881:11: note: candidate found by name lookup is
      'std::__1::chrono'
namespace chrono {
          ^
/usr/local/include/boost/asio/detail/chrono.hpp:28:11: note: candidate found by name lookup is 'boost::asio::chrono'
namespace chrono {
          ^
In file included from /Users/hendler/eth/Ethminer-for-macOS/ethminer/main.cpp:39:
/Users/hendler/eth/Ethminer-for-macOS/ethminer/MinerAux.h:861:27: warning: variable 'completed' used in loop condition not modified in loop body
      [-Wfor-loop-analysis]
                                for (unsigned i = 0; !completed; ++i)
                                                      ^~~~~~~~~
/Users/hendler/eth/Ethminer-for-macOS/ethminer/MinerAux.h:939:51: error: reference to 'chrono' is ambiguous
                                        for (auto i = 3; --i; this_thread::sleep_for(chrono::seconds(1)))
                                                                                     ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/chrono:881:11: note: candidate found by name lookup is
      'std::__1::chrono'
namespace chrono {
          ^
/usr/local/include/boost/asio/detail/chrono.hpp:28:11: note: candidate found by name lookup is 'boost::asio::chrono'
namespace chrono {
          ^
In file included from /Users/hendler/eth/Ethminer-for-macOS/ethminer/main.cpp:39:
/Users/hendler/eth/Ethminer-for-macOS/ethminer/MinerAux.h:1025:7: warning: add explicit braces to avoid dangling else [-Wdangling-else]
                                                minelog << "Waiting for work package...";
                                                ^
/Users/hendler/eth/Ethminer-for-macOS/ethminer/MinerAux.h:98:17: note: expanded from macro 'minelog'
#define minelog clog(MiningChannel)
                ^
/Users/hendler/eth/Ethminer-for-macOS/ethminer/../libdevcore/Log.h:268:34: note: expanded from macro 'clog'
#define clog(X) if (X::debug) {} else dev::LogOutputStream<X, true>()
                                 ^
In file included from /Users/hendler/eth/Ethminer-for-macOS/ethminer/main.cpp:39:
/Users/hendler/eth/Ethminer-for-macOS/ethminer/MinerAux.h:1027:28: error: reference to 'chrono' is ambiguous
                                this_thread::sleep_for(chrono::milliseconds(m_farmRecheckPeriod));
                                                       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/chrono:881:11: note: candidate found by name lookup is
      'std::__1::chrono'
namespace chrono {
          ^
/usr/local/include/boost/asio/detail/chrono.hpp:28:11: note: candidate found by name lookup is 'boost::asio::chrono'
namespace chrono {
          ^
In file included from /Users/hendler/eth/Ethminer-for-macOS/ethminer/main.cpp:39:
/Users/hendler/eth/Ethminer-for-macOS/ethminer/MinerAux.h:1060:7: warning: add explicit braces to avoid dangling else [-Wdangling-else]
                                                minelog << "Waiting for work package...";
                                                ^
/Users/hendler/eth/Ethminer-for-macOS/ethminer/MinerAux.h:98:17: note: expanded from macro 'minelog'
#define minelog clog(MiningChannel)
                ^
/Users/hendler/eth/Ethminer-for-macOS/ethminer/../libdevcore/Log.h:268:34: note: expanded from macro 'clog'
#define clog(X) if (X::debug) {} else dev::LogOutputStream<X, true>()
                                 ^
In file included from /Users/hendler/eth/Ethminer-for-macOS/ethminer/main.cpp:39:
/Users/hendler/eth/Ethminer-for-macOS/ethminer/MinerAux.h:1062:28: error: reference to 'chrono' is ambiguous
                                this_thread::sleep_for(chrono::milliseconds(m_farmRecheckPeriod));
                                                       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/chrono:881:11: note: candidate found by name lookup is
      'std::__1::chrono'
namespace chrono {
          ^
/usr/local/include/boost/asio/detail/chrono.hpp:28:11: note: candidate found by name lookup is 'boost::asio::chrono'
namespace chrono {
          ^
4 warnings and 6 errors generated.
make[2]: *** [ethminer/CMakeFiles/ethminer.dir/main.cpp.o] Error 1
make[1]: *** [ethminer/CMakeFiles/ethminer.dir/all] Error 2
make: *** [all] Error 2
@ArtSabintsev

This comment has been minimized.

Owner

ArtSabintsev commented Dec 28, 2017

Alright, will look into this issue as well when I get a chance. Seems like a namespacing issue.

Full disclosure: I do not code in C++ and my machine cannot mine ether, so I'm doing this for shits and giggles at this point in time.

@fcarreiro

This comment has been minimized.

fcarreiro commented Dec 30, 2017

I'm also getting the chrono error that @Hendler had. OSX 10.13.2, Intel Iris 1536 MB.

@ArtSabintsev

This comment has been minimized.

Owner

ArtSabintsev commented Dec 30, 2017

I was just looking into this. Here's the issue: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224094

Trying to see how to work it out, because the fix in there isn't working for me.

@fcarreiro

This comment has been minimized.

fcarreiro commented Dec 30, 2017

@ArtSabintsev Oh, by the way, I think I just fixed it. I'll test it a bit and write about the result (and may create a PR).

@ArtSabintsev

This comment has been minimized.

Owner

ArtSabintsev commented Dec 30, 2017

That'd be great - thanks!

@fcarreiro

This comment has been minimized.

fcarreiro commented Dec 30, 2017

Yes, the problem seems to be that the compiler doesn't know whatchrono:: means. I looked at the rest of the code, and chrono mostly means std::chrono therefore replacing all the non-std chronos for std::chrono made it compile. Steps:

  1. Find and replace all std::chrono:: to chrono::.
  2. Find and replace all chrono:: to std::chrono::.

That made it work for me. However, the DAG doesn't fit in the memory of my Intel card, doh! :)

@ArtSabintsev

This comment has been minimized.

Owner

ArtSabintsev commented Dec 30, 2017

Just fixed it. I was looking at the wrong file. I was looking at main.cpp and not MinerAux.h.

@ArtSabintsev

This comment has been minimized.

Owner

ArtSabintsev commented Dec 30, 2017

ok, awesome, you just wrote the same solution. Fantastic!

@ArtSabintsev

This comment has been minimized.

Owner

ArtSabintsev commented Dec 30, 2017

I'll push the fix at a moment.

Ya, I have the same issue. I can't mine Ether, nor do I have an nvidia card, nor do I know C++ well, so this library is a bit complicated to support at times.

@ArtSabintsev

This comment has been minimized.

Owner

ArtSabintsev commented Dec 30, 2017

Fixed, pushed, and tagged as 1.0.4.

Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment