Building v1.0.6 requires > 6GB of ram

I am not able to build 1.0.6. I get out of memory errors and top shows I am actually out of memory. If I switch back to 1.0.5 everything builds fine and does not even get low on mem. Watching the build in top seems to show 1.0.6 creating many many more threads than 1.0.5...

are you building with zcutil/build.sh -j<some number> which does a parallel make, or just zcutil/build.sh ???

If the latter, you can always add swap, which I know is Not A Good Thing, but will get you there

1 Like

Are you still having memory issues? What about when building on a fresh reboot?

I've filed a ticket about this just in case something has changed in the build script which causes more memory usage: https://github.com/zcash/zcash/issues/2154

Yes, I am still having this issue. I am building in a virtual ubuntu machine (vbox) with 7GB of memory allocated (6GB free after boot). I've restarted many times adjusting my memory allocated to the vm. I've built (I think) all the previous version of zcash without issue with total system memory of just 5GB. I am just using 1 CPU in the vm. I'll try 1.0.7 as soon as its out and maybe things will just work again.

1.0.7 is tagged in the repo, so you can build from source now

Just tried building tag v1.0.7 and I have the same high memory usage issue as with v1.0.6. It seems to just keep creating new cpp threads until memory fills up... The previous versions don't seem to behave like this? Can someone else just check their memory usage when you build? My build exceeds 4GB probably within 3-4 mins of the build.

what exact command line are you typing when you compile it?

See the below command line, I have tried with and without a make clean. I just started and terminated the build below before the memory fail error.

rd@rd-VirtualBox:~/git/zcash$ ls
aclocal.m4 config.log COPYING libzcashconsensus.pc qa
autogen.sh config.status depends libzcashconsensus.pc.in README.md
autom4te.cache configure doc Makefile share
build-aux configure.ac INSTALL Makefile.am src
code_of_conduct.md contrib libtool Makefile.in zcutil
rd@rd-VirtualBox:~/git/zcash$ git remote show origin
* remote origin
Fetch URL: https://github.com/zcash/zcash.git
Push URL: https://github.com/zcash/zcash.git
HEAD branch: master
Remote branches:
1597.fix-test-race-condition tracked
auto tracked
daira-equihash-benchmark-50-iterations tracked
daira-link-readme-to-protocol-spec tracked
daira-update-CoC-email tracked
master tracked
try tracked
Local branch configured for 'git pull':
master merges with remote master
Local ref configured for 'git push':
master pushes to master (local out of date)
rd@rd-VirtualBox:~/git/zcash$ git checkout v1.0.7
HEAD is now at d9bfce7... Update debian changelog for 1.0.7 release process
rd@rd-VirtualBox:~/git/zcash$ ./zcutil/build.sh -j$1
+++ readlink -f ./zcutil/build.sh
++ dirname /home/rd/git/zcash/zcutil/build.sh
+ cd /home/rd/git/zcash/zcutil/..
+ LCOV_ARG=
+ HARDENING_ARG=--enable-hardening
+ TEST_ARG=
+ '[' x-j = x--enable-lcov ']'
+ '[' x-j = x--disable-tests ']'
+ MINING_ARG=
+ '[' x-j = x--disable-mining ']'
++ pwd
+ PREFIX=/home/rd/git/zcash/depends/x86_64-unknown-linux-gnu/
+ HOST=x86_64-unknown-linux-gnu
+ BUILD=x86_64-unknown-linux-gnu
+ make -j -C ./depends/ V=1 NO_QT=1
make: Entering directory '/home/rd/git/zcash/depends'
^CMakefile:142: recipe for target 'check-sources' failed
make: *** [check-sources] Interrupt

rd@rd-VirtualBox:~/git/zcash$

Try it with just ./zcutil/build.sh
to compile

1 Like

Hey, wow that was it. Weird I wouldn't have expected that behavior to change. Does the -j flag still work if you have more than one processor?