I've successfully built Zcash on OS X... Ask me anything!

Hey,
Complete newbie here... Is it worth it for me to buy a new MacBook Pro for mining Z? I'm not looking to be a pro miner, but would like to get some kind of return. I really don't want to miss out again. I tried to buy Bitcoin when it was 1bit/$1 and couldn't figure it out. I'm still liking myself to this day. This seems like a good currency, and I'd like to get in from the beginning. Any help would be greatly appreciated. Thanks in advance

1 Like

If you simply want to buy a computer for mining Zcash a MacBook pro would probably not be the best option. You would want something that you can expand/ add to easily and can take the abuse of running 100% 24/7.

1 Like

Any suggestions? I need a new one, so I was hoping to get one for this purpose.. And if it doesn't pan out, hopefully I'll still have a decent laptop

I don't like to give specific hardware advice but here are things to consider: Mining is very hard on hardware, a Laptop is likely to run hot and possibly overheat if it's mining 24/7. If in the future GPU mining becomes the best way to be profitable you won't have the option to add a graphics card.
If you want to use a MacBook as a computer for your everyday use then that is fine, but it may only be able to mine successfully for a very short period of time. As difficulty increases the likelihood of finding block greatly decreases with set hardware.

1 Like

Ok. Thanks for the advice.

I'm attempting to build zcash using macports gcc5 on OSX and ran into this issue http://pastebin.com/gDtfpFYB while attempting to build libsnark.

Has anyone else run into this?

edit: is this related to clang?

It depends.. Might be, find out what is your c++ in that build script scope.. e.g. $ which c++

MacBook-Pro:zcash mugatu $ which c++
/opt/local/bin/c++
MacBook-Pro:zcash mugatu$ c++ -v
Using built-in specs.
COLLECT_GCC=c++
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin15/5.4.0/lto-wrapper
Target: x86_64-apple-darwin15
Configured with: /opt/local/var/macports/build/_opt_mports_dports_lang_gcc5/gcc5/work/gcc-5.4.0/configure --prefix=/opt/local --build=x86_64-apple-darwin15 --enable-languages=c,c++,objc,obj-c++,lto,fortran,java --libdir=/opt/local/lib/gcc5 --includedir=/opt/local/include/gcc5 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-5 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-5 --with-gxx-include-dir=/opt/local/include/gcc5/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-isl=/opt/local --enable-stage1-checking --disable-multilib --enable-lto --enable-libstdcxx-time --with-build-config=bootstrap-debug --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --with-pkgversion='MacPorts gcc5 5.4.0_0'
Thread model: posix
gcc version 5.4.0 (MacPorts gcc5 5.4.0_0)

ok, I got further by removing '-march=native -mtune=native' from the libsnark Makefile, but now I'm running into the following:

src/common/profiling.cpp: In function 'long long int libsnark::get_nsec_cpu_time()':
src/common/profiling.cpp:41:10: error: '::clock_gettime' has not been declared
     if ( ::clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts) )
          ^~
compilation terminated due to -Wfatal-errors.
make[1]: *** [src/common/profiling.o] Error 1

Hello Adam

Please
you could write a step by step guide to build on osx ?
THX

Don't have enough time.. The principle is to build everything separately (so it isn't that messy) with GCC5. BUT you have to be absolutely sure that you've really used GCC not Clang.

I without a step by step guide are not able to compile
:frowning:

hey adam
i am totally clouless in zcash mining - do you know somere i can get instruction or consultent about it?
yoni9091@gmail.com

Don't use MacPorts, it's essentially a dead project and will make a mess with latest versions of OSX. Clean up your machine (major pain) then install Homebrew.

ok, I used macports for a few years a few years ago and was familiar with it, which is why I used it. I'll probably end up doing a fresh install in time for zcash

Could you please explain how you replaced clang with the brew gcc compiler? I presume that you can specify this using options with "make" and "configure", but there is no documentation, and it is not immediately obvious how to do this.

2 Likes

Using the brew version of gcc does not solve this problem (or if it does, it creates other problems...). See this issue on github.

This is the exact spot I am now stuck at trying to build with gcc 5 from homebrew :frowning:

If I can just get libsnark to build with Apple's clang, I think I've been able to get past all the other issues I've seen here or elsewhere with building with it. I'd REALLY like to know how the mythical clang build the libsnark README mentions was accomplished.

@mugatu and I both just got libsnark to build on OS X with gcc5 from brew, you have to install gnu binutils and use the version of ar that's in it by prepending "AR=gar" to your make command line. So a mac build/port is getting closer.

2 Likes