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
How to build and run this on Mac OS X? #124
Comments
Here is what I did to compile successfully:
|
Hi, does skipping step 4 result in an error or a warning? |
Correct.. May be you can fix it in the code. |
@fireice-uk Can you also explain the implication of -DMICROHTTPD_REQUIRED=OFF -DOpenSSL_REQUIRED=OFF Does that result in an unsecure mining that someone can hack? |
You shouldn't need to disable OpenSSL - I was able to compile with homebrew OpenSSL on mac. I believe these were the steps, assuming you have the fix in #142 as well:
Note that I was not able to get large pages support working on mac. From searching around it looks like it can be tricky to get large pages working at all with mac memory management. |
@inder123 Nobody can "hack" mining, encryption enables you to hide the fact you are mining (at least at the general packet inspection level, for complete privacy you would need to TORify the traffic), and the amount that you mined from your ISP. |
I followed the steps described by @rsanheim and still got this two errors
|
@ismaproco You can always disable openssl via |
@ismaproco What version of OSX are you using? Apple doesn't include openssl headers any more and I see it's looking at headers in /usr/include. I think they have other crypto libraries they want developers to use. I know on Sierra, openssl is still some version of 0.9.8. I'm pretty sure the headers are absent in El Capitan as well. It looks like it isn't using the headers from the version brew installed. I've only run this on El Capitan or Sierra myself and I usually compile with gcc. |
@rsanheim Granted, I have 16 gigs of memory, but I've never had issues getting large pages to work on my macs. If I get an error allocating the large pages, I have to restart. Have you tried a restart? Do you have a low amount of memory or automatically open a lot of apps on login? Now, the aeon port is another story. I got large pages allocation errors on that across 4 different machines on a clean boot. But good old upstream xmr-stak-cpu started right up afterwards without issue. |
@ac0rnsoup I'm not sure I follow you - are you saying large page support is working for you in xmr-stak-cpu, or in general with other programs? On every mac I've tried xmr-stak-cpu, the large page support doesn't work, as you can see in the logs in startup:
This is across different mac models with different OS's, including Sierra and El Capitan. Granted, I'm definitely not a c / memory management expert 😄 - so my efforts to debug this have been minimal. |
Updating my mac build instructions here, which requires #154 until it gets merged. hwloc was merged in #108) which requires an additional dependency. This is on Mac OS Sierra 10.2.5, assumes you have homebrew installed. Using AppleClang 8.1.0.8020042 as the c compiler.
|
@rsanheim Sorry for the slow response. I wanted to test latest dev branch as I was using older code. I just compiled myself a new xmr-stak-cpu Large pages are definitely still working for me on a macbook pro 2015 w dual core i7. It failed the first time with mmap errors like yours, and I got a hashrate of about 78h/s. I quit every application to make sure they didn't open on reboot, rebooted, the mmap memory went away and I get 120-126 h/s. FYI, this hardware gets the largest improvement I've seen. On the imacs I have, the improvement was less drastic but still very noticeable. I do however get an error with the new hwloc stuff: I use gcc6 to compile. I have had large pages working on 8 macs, every one I tried, Sierra and El Capitan, although I only actively mine on 4 of them these days. I don't mine on the 2 macbook pros or 2 minis any more due to heat concerns, I don't care as much about the 4 imacs. Maybe try gcc instead of clang? gcc just gives a warning, not failure, on the issue fixed with patch, so I don't patch it. I don't know what hwloc is, haven't looked into that. |
The first response of @inder123 worked straight forward on my Mac running Sierra |
Guys, can you please look here https://travis-ci.org/fireice-uk/xmr-stak-cpu/jobs/243759866 for the error? Thank you... |
@ruzickap Yup, @fireice-uk needs to merge #154, which should fix that issue. |
I follow instructions and compile successfully on MAC . [2017-06-26 10:49:53] : WARNING on MacOS thread affinity is only advisory. |
@ac0rnsoup How can you tell if large pages are working? EDIT: like others said before, after a reboot no nmap errors, but still no explaination for this odd behaviour |
here i get:
BR |
@CybotDNA i just executed those successfully... |
The commands above worked for me, but up until
xmrstak/backend/amd/amd_gpu/gpu.hpp:37:14: error: implicit instantiation of undefined template 'std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> >'
std::string name;
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/iosfwd:193:32: note: template is declared here
class _LIBCPP_TEMPLATE_VIS basic_string;
^
1 error generated.
make[2]: *** [CMakeFiles/xmrstak_opencl_backend.dir/xmrstak/backend/amd/minethd.cpp.o] Error 1
make[1]: *** [CMakeFiles/xmrstak_opencl_backend.dir/all] Error 2
make: *** [all] Error 2 |
@fabulouspanda binaries work for me, though Maybe I need |
@LucasArruda have you tried https://github.com/fireice-uk/xmr-stak ? I haven't had time but I'll check it out when I do, that seems to be what's recommended now |
@fabulouspanda to tell you the truth I'm kinda new in this mining world. I checked that but found no binaries for Mac, just Linux and Windows. Though on the source apparently there are bin compatibles with a Mac. I'll try it. |
Adding the dev branch worked for me. |
I hit this issue as well and got them all compiled after hell and back :) if you want the final bins I posted them for safe keeping this time lol: https://github.com/killswitch-GUI/xmr-stak-osx |
Using the latest xmr-stak code (https://github.com/fireice-uk/xmr-stak) all I had to do was:
|
Can we please add this to the documentation? Finally found this! |
agreed, @evanjmg |
Made a PR fireice-uk/xmr-stak#948 |
No description provided.
The text was updated successfully, but these errors were encountered: