# Xenoncat OSX Port

**URL:** <https://forum.zcashcommunity.com/t/xenoncat-osx-port/2909>\
**Category:** Mining\
**Created:** [October 20, 2016, 6:51pm UTC](https://forum.zcashcommunity.com/t/xenoncat-osx-port/2909 "2016-10-20T18:51:41Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![zeon-mac](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/zeon-mac/32/753_2.png) [@zeon-mac](https://forum.zcashcommunity.com/u/zeon-mac)\
**Post date:** [October 20, 2016, 6:51pm UTC](https://forum.zcashcommunity.com/t/xenoncat-osx-port/2909/1 "2016-10-20T18:51:41Z")

</div>

I managed to get Xenoncat’s solver working on OSX with some minor modifications, sharing this so Mac users don’t get left behind 😉 Let me know if this works for other mac users!

> **[equihash-xenon/OSX/demo at xenon-mac · vattay/equihash-xenon](https://github.com/vattay/equihash-xenon/tree/xenon-mac/OSX/demo)**
>
> xenon-mac/OSX/demo

---

<div class="post-metadata">

**Author:** ![Quent17](https://avatars.discourse-cdn.com/v4/letter/q/47e85d/32.png) [@Quent17](https://forum.zcashcommunity.com/u/Quent17)\
**Post date:** [October 20, 2016, 7:01pm UTC](https://forum.zcashcommunity.com/t/xenoncat-osx-port/2909/2 "2016-10-20T19:01:29Z")

</div>

Hey @zeon-mac, it works with my early 2011 mbp (i7 2,7 Ghz) ! Thank you for your work.

---

<div class="post-metadata">

**Author:** ![Zainblaze](https://avatars.discourse-cdn.com/v4/letter/z/e8c25b/32.png) [@Zainblaze](https://forum.zcashcommunity.com/u/Zainblaze)\
**Post date:** [October 20, 2016, 7:19pm UTC](https://forum.zcashcommunity.com/t/xenoncat-osx-port/2909/3 "2016-10-20T19:19:46Z")

</div>

Are xenocat solvers available for Linux?

---

<div class="post-metadata">

**Author:** ![Quent17](https://avatars.discourse-cdn.com/v4/letter/q/47e85d/32.png) [@Quent17](https://forum.zcashcommunity.com/u/Quent17)\
**Post date:** [October 20, 2016, 7:28pm UTC](https://forum.zcashcommunity.com/t/xenoncat-osx-port/2909/4 "2016-10-20T19:28:32Z")

</div>

It is, just look in the repo.

---

<div class="post-metadata">

**Author:** ![tromp](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/tromp/32/522_2.png) [@tromp](https://forum.zcashcommunity.com/u/tromp)\
**Post date:** [October 20, 2016, 7:31pm UTC](https://forum.zcashcommunity.com/t/xenoncat-osx-port/2909/5 "2016-10-20T19:31:59Z")

</div>

Please correct all mention of xenocat to xenoncat …

---

<div class="post-metadata">

**Author:** ![anon47418038](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@anon47418038](https://forum.zcashcommunity.com/u/anon47418038)\
**Post date:** [October 20, 2016, 7:47pm UTC](https://forum.zcashcommunity.com/t/xenoncat-osx-port/2909/6 "2016-10-20T19:47:51Z")

</div>

Have you gotten libsnark to build on OS X with clang from Xcode? That’s what’s holding up a Mac build of full zcash

---

<div class="post-metadata">

**Author:** ![zeon-mac](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/zeon-mac/32/753_2.png) [@zeon-mac](https://forum.zcashcommunity.com/u/zeon-mac)\
**Post date:** [October 21, 2016, 5:05am UTC](https://forum.zcashcommunity.com/t/xenoncat-osx-port/2909/7 "2016-10-21T05:05:56Z")

</div>

@anon47418038 I gave it a look. I’m stuck on a pretty confusing Clang template implementation issue. This simple multiplication statement fails to compile on Clang but not GCC.

test\_bilinearity.cpp:

```
G1<ppT> P = (Fr<ppT>::random_element()) * G1<ppT>::one();

```

```auto
src/algebra/curves/tests/test_bilinearity.cpp:26:45: fatal error: invalid operands to binary expression
      ('Fp_model<3L, edwards_modulus_r>' and 'libsnark::edwards_G2')

```

It appears to be due to a particular edge case of template matching implementation:  
edwards\_g1.hpp:

```auto
template<mp_size_t m, const bigint<m>& modulus_p>
edwards_G1 operator*(const Fp_model<m,modulus_p> &lhs, const edwards_G1 &rhs)
{
    return scalar_mul<edwards_G1, m>(rhs, lhs.as_bigint());
}

```

This Clang note right here is the source of the pain:

```auto
 src/algebra/curves/edwards/edwards_g2.hpp:89:12: note: candidate template ignored: substitution failure [with m = 3]: deduced non-type
 template argument does not have the same type as the its corresponding template parameter ('bigint<edwards_r_limbs>' vs 'const bigint<3L> &')

```

I think what is happening is that since the Fp\_model has a const (3L) as a parameter Clang’s template inference cannot match it. I saw a similar issue submitted as a clang bug here: [22738 – After r224456, clang++ fails to substitute some non-type template arguments](https://llvm.org/bugs/show_bug.cgi?id=22738)

---

<div class="post-metadata">

**Author:** ![anon47418038](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@anon47418038](https://forum.zcashcommunity.com/u/anon47418038)\
**Post date:** [October 21, 2016, 6:47am UTC](https://forum.zcashcommunity.com/t/xenoncat-osx-port/2909/8 "2016-10-21T06:47:15Z")

</div>

Yeah I get TONS of messed up template errors on Windows, too, but that’s with gcc!

Unfortunately I’ve spent my time since the 1980’s dodging C++, and now here I find myself working on a project written in it. I’ve been working on getting the dependency build tooling in shape for Windows, which is now in place, only to have differences between linux and windows gcc holding me up now.

Trying to build zcash on macOS with the brew distro of gcc is held up by the fact that libsnark wants to use GNU ar, but parts of the rest of it need to use Apple’s linker. ☹

---

<div class="post-metadata">

**Author:** ![dom](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@dom](https://forum.zcashcommunity.com/u/dom)\
**Post date:** [October 29, 2016, 6:15pm UTC](https://forum.zcashcommunity.com/t/xenoncat-osx-port/2909/9 "2016-10-29T18:15:22Z")

</div>

I am confused isn’t this software to mine? If you’re not able to run zcash on OS X, where will the mined coins go?

---

<div class="post-metadata">

**Author:** ![dom](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@dom](https://forum.zcashcommunity.com/u/dom)\
**Post date:** [October 30, 2016, 5:59am UTC](https://forum.zcashcommunity.com/t/xenoncat-osx-port/2909/10 "2016-10-30T05:59:39Z")

</div>

Can I use this to mine on a pool? How?  
Also, the guide suggests to disable ASLR but doesn’t give any info on how to do so, could you help?  
If I just `make` on my mac, I get a bogus executable crashing at the start.

---

<div class="post-metadata">

**Author:** ![subtly](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/subtly/32/1621_2.png) [@subtly](https://forum.zcashcommunity.com/u/subtly)\
**Post date:** [November 1, 2016, 8:44am UTC](https://forum.zcashcommunity.com/t/xenoncat-osx-port/2909/11 "2016-11-01T08:44:23Z")

</div>

@anon47418038 I got your repos working and get 8sol/sec on 2015mbp. Is xenoncat solver already integrated into upstream repos? Any chance that’s possible? (I can’t tell, as there are notes such as: “optimize xenoncat’s fixed memory layout”)

 ![](https://global.discourse-cdn.com/zcash/original/2X/c/c6ae3b34d841e7157ee225192b2df0cb79c481e6.png)

---

<div class="post-metadata">

**Author:** ![anon47418038](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@anon47418038](https://forum.zcashcommunity.com/u/anon47418038)\
**Post date:** [November 1, 2016, 8:48am UTC](https://forum.zcashcommunity.com/t/xenoncat-osx-port/2909/12 "2016-11-01T08:48:13Z")

</div>

Is that a native OS X build??? If so, I believe you are the first!!

If that’s the case, please push any changes needed to a fork of my repo and open a pull request against my branch you built on!

---

<div class="post-metadata">

**Author:** ![anon47418038](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@anon47418038](https://forum.zcashcommunity.com/u/anon47418038)\
**Post date:** [November 1, 2016, 8:50am UTC](https://forum.zcashcommunity.com/t/xenoncat-osx-port/2909/13 "2016-11-01T08:50:45Z")

</div>

All the mac branches in my fork are merges of the upstream zcash repo with the tweaks I’ve made in depends, configure.ac and my added zcutil/build-mac.sh…anything referencing xenoncat came from upstream

---

<div class="post-metadata">

**Author:** ![dom](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@dom](https://forum.zcashcommunity.com/u/dom)\
**Post date:** [November 1, 2016, 11:16am UTC](https://forum.zcashcommunity.com/t/xenoncat-osx-port/2909/14 "2016-11-01T11:16:26Z")

</div>

This! Please @subtly!
