Search code examples
makefilegraph-toolswapfile

Unable to compile graph-tool even after creating swap file


I am trying to install graph-tool on my laptop with 4GB RAM. I realized that the RAM is not sufficient and so I created a swap file of size 4GB using the instructions given here. However, I still keep getting the following error after sudo make:

virtual memory exhausted: Cannot allocate memory
make[4]: *** [graph_blockmodel_covariates.lo] Error 1
make[4]: Leaving directory `/home/snehal/Packages/graph-tool-2.13/src/graph/community'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/snehal/Packages/graph-tool-2.13/src/graph'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/snehal/Packages/graph-tool-2.13/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/snehal/Packages/graph-tool-2.13'
make: *** [all] Error 2

I am unable to understand the issue. Is there any particular way which I need to tell to system to use memory in the swap file?

Thanks in advance.


Solution

  • this sounds very surprising; can you look at your RAM using your system monitor to confirm? I've never seen graph-tool take that much memory. And anyway your system should almost freeze if the RAM was really exhausted.

    Please post details about your OS and what you used to compile graph-tool. Also check on that you have indeed satisfied all the requirements.

    EDIT: the accepted procedure on debian or ubuntu to install graph-tool is to add Tiago's repository in your sources, then install the precompiled package using apt-get install python-graph-tool or through synaptic. Note that it will not be the bleeding-edge release, though.