From 52880ba9e95ec6532b76d530d2ed2c58130b94ef Mon Sep 17 00:00:00 2001 From: Andy Fingerhut Date: Tue, 29 Oct 2019 09:33:29 -0700 Subject: [PATCH] Reduce memory requirements for installing p4c by 'vagrant up' (#299) --- vm/user-bootstrap.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vm/user-bootstrap.sh b/vm/user-bootstrap.sh index 421cd1d..c2ac21d 100755 --- a/vm/user-bootstrap.sh +++ b/vm/user-bootstrap.sh @@ -102,7 +102,12 @@ git submodule update --init --recursive mkdir -p build cd build cmake .. -make -j${NUM_CORES} +# The command 'make -j${NUM_CORES}' works fine for the others, but +# with 2 GB of RAM for the VM, there are parts of the p4c build where +# running 2 simultaneous C++ compiler runs requires more than that +# much memory. Things work better by running at most one C++ compilation +# process at a time. +make -j1 sudo make install sudo ldconfig cd ../..