# Zcashd 2.0.1 on Gentoo

**URL:** <https://forum.zcashcommunity.com/t/zcashd-2-0-1-on-gentoo/31603>\
**Category:** zcashd client\
**Created:** [October 17, 2018, 8:45am UTC](https://forum.zcashcommunity.com/t/zcashd-2-0-1-on-gentoo/31603 "2018-10-17T08:45:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![l0sec](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/l0sec/32/9779_2.png) [@l0sec](https://forum.zcashcommunity.com/u/l0sec)\
**Post date:** [October 17, 2018, 8:45am UTC](https://forum.zcashcommunity.com/t/zcashd-2-0-1-on-gentoo/31603/1 "2018-10-17T08:45:30Z")

</div>

Hi,

This is not the request for support but rather description of problems and solutions for building zcashd on **Gentoo** LInux distribution. I hope someone might find it useful and easier to find here, as I had to do some digging before solving these.

First of all, boost will not build out of the box on Gentoo, after git cloning zcashd repo apply the following changes:

```
diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk
index caf726132..4bd615171 100644
--- a/depends/packages/boost.mk
+++ b/depends/packages/boost.mk
@@ -33,9 +33,9 @@ define $(package)_config_cmds
 endef
 
 define $(package)_build_cmds
- ./b2 -d2 -j2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) stage
+ ./b2 --ignore-site-config -d2 -j2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) stage
 endef
 
 define $(package)_stage_cmds
- ./b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) install
+ ./b2 --ignore-site-config -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) install
 endef

```

Second thing is related to upgrade to 2.0.1. long long has been migrated to int64\_t and if you do not make sure old build files are completely removed you will get reference errors like:

```
zcash/src/./snark/libsnark/gadgetlib1/gadgets/basic_gadgets.tcc:69: undefined reference to `libsnark::div_ceil(long, long)'

/zcash/src/./snark/libsnark/gadgetlib1/gadgets/basic_gadgets.tcc:157: undefined reference to `libsnark::div_ceil(long, long)'

zcash/src/./zcash/circuit/gadget.tcc:331: undefined reference to `libsnark::div_ceil(long, long)' 

```

Therefore before runing ./zcutil/build.sh make sure you do:

```
git branch -vv
 (HEAD detached at v2.0.1) e8f5e592b Auto merge of #3602 - bitcartel:release-v2.0.1, r=ebfull
  master 02dd675a2 [origin/master: behind 1315] Auto merge of #2585 - str4d:release-v1.0.11, r=str4d

git reset --hard e8f5e592b
git clean -fdx

```

This will clear all your previous build files. Now just remember to patch boost.mk and it should build fine.

Regards  
l0sec

---

<div class="post-metadata">

**Author:** ![Kahooli](https://avatars.discourse-cdn.com/v4/letter/k/e79b87/32.png) [@Kahooli](https://forum.zcashcommunity.com/u/Kahooli)\
**Post date:** [October 17, 2018, 4:38pm UTC](https://forum.zcashcommunity.com/t/zcashd-2-0-1-on-gentoo/31603/2 "2018-10-17T16:38:03Z")

</div>

I had some similar issues on ubuntu as well. Thanks for posting this

---

<div class="post-metadata">

**Author:** ![paige](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/paige/32/31152_2.png) [@paige](https://forum.zcashcommunity.com/u/paige)\
**Post date:** [November 12, 2018, 7:22pm UTC](https://forum.zcashcommunity.com/t/zcashd-2-0-1-on-gentoo/31603/3 "2018-11-12T19:22:19Z")

</div>

Looks like this is on the backlog of the dev infrastructure team: [building on Gentoo · Issue #755 · zcash/zcash · GitHub](https://github.com/zcash/zcash/issues/755)
