Unable to compile graph-tool even after creating swap file - makefile

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.

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.

Related

Cygwin,lib: command not found while building Unix based library

I am trying to install the tblis library on my Cygwin installation and I am encountering in the following error:
$ make
make all-recursive
make[1]: Entering directory '/home/indiano/Test/tblis'
Making all in src/external/tci
make[2]: Entering directory '/home/indiano/Test/tblis/src/external/tci'
CXXLD lib/libtci.la
./libtool: line 1741: lib: command not found
make[2]: *** [Makefile:531: lib/libtci.la] Error 127
make[2]: Leaving directory '/home/indiano/Test/tblis/src/external/tci'
make[1]: *** [Makefile:2581: all-recursive] Error 1
make[1]: Leaving directory '/home/indiano/Test/tblis'
make: *** [Makefile:1203: all] Error 2
I don´t have a lot of experience with building big projects and even less in cross-compiling, can somebody land an hand or at least point me in some direction?
My suspect is that something is missing in the base installation of Cygwin, but I can not identify which package should be.
Also seams that there is nothing to be found on the internet.

Make error when compiling GMP on Windows

I'm attempting to compile GMP 5.1.3 with MinGW on a 64 bit Windows 7 machine as a prerequisite to setting up pycrypto. To configure GMP I used ./configure --prefix=C:/Python27/Lib/site-packages/gmp-5.1.3. When I enter the make command, I get the error:
../libtool: line 1109: lib: command not found
make[2]: *** [libmpn.la] Error 127
make[2]: Leaving director '/c/Python27/Lib/site-packages/gmp-5.1.3/mpn'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/c/Python27/Lib/site-packages/gmp-5.1.3'
make: *** [all] Error 2
I've been fishing around Google and reviewing the instructions for GMP to no avail. Found lots of maybe similar problems, but nothing that directly relates. Though I have the sneaking suspicion that the problem is right in front of me and I've just been staring at the screen too long.

Error installing glib

I am trying to install the glib-2.38.0 and upon executing the MAKE file and getting the following error:
make[5]: Leaving directory `/root/glib-2.38.0/glib/update-pcre'
make[4]: Leaving directory `/root/glib-2.38.0/glib/update-pcre'
Making install in .
make[4]: Entering directory `/root/glib-2.38.0/glib'
CCLD libglib-2.0.la
libtool: link: `glib_probes.lo' is not a valid libtool object
make[4]: *** [libglib-2.0.la] Error 1
make[4]: Leaving directory `/root/glib-2.38.0/glib'
make[3]: *** [install-recursive] Error 1
make[3]: Leaving directory `/root/glib-2.38.0/glib'
make[2]: *** [install] Error 2
make[2]: Leaving directory `/root/glib-2.38.0/glib'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/root/glib-2.38.0'
make: *** [install] Error 2
How can I troubleshoot this? How can I overcome this issue?
After hitting this same error on Solaris 10 01/13 and not needing dtrace support, I solved this in configure by adding --disable-dtrace.
I had the exact same problem, and located your posting after
giving the error message to a search engine. Alas, no one
had answered you, so I had no choice but to troubleshoot the
problem myself.
In my case, the problem was an old version of dtrace. I updated
the package containing /usr/bin/dtrace (which, in my case, was
systemtap-sdt-devel) and then dtrace created a proper glib_probes.lo
file.
Having solved the problem for myself, it then became my duty to
tell you how I had done so, and answer your unanswered question.
This I have now done.

unable to infer compiler target triple for clang

I have modified the clang. It was working properly. But then I had some git related issues so I cleaned the git and checked out again. Now when I try to run make clean in clang I am getting the following error. How can I fix this?
#A set of warnings here
make[5]: Entering directory `/home/test/llvm/projects/compiler-rt'
make/platform/clang_linux.mk:16: *** "unable to infer compiler target triple for clang". Stop.
make[5]: Leaving directory `/home/test/llvm/projects/compiler-rt'
make[4]: *** [CleanRuntimeLibraries] Error 2
make[4]: Leaving directory `/home/test/llvm/tools/clang/runtime/compiler-rt'
make[3]: *** [compiler-rt/.makeclean] Error 2
make[3]: Leaving directory `/home/test/llvm/tools/clang/runtime'
make[2]: *** [clean] Error 1
make[2]: Leaving directory `/home/test/llvm/tools/clang'
make[1]: *** [clang/.makeclean] Error 2
make[1]: Leaving directory `/home/test/llvm/tools'
make: *** [clean] Error 1
I had this problem, and solved it. My problem was the link for clang failed (error 9) because I didn't have enough memory. It needs about 4 gig of memory to link, and I only had 3.5 total real memory and swap available.
Look just before these errors and possibly, you'll see that the link for clang failed.
ls the clang executable at {your build directory}/Debug+Asserts/bin/clang mine was zero bytes (because of link failure).
It then generated the "unable to infer compiler target triple" because it didn't have a clang to execute.
My solution was to create a swap file (because I didn't have any space to expand my swap partition) following the instructions at geek swap definition
I solved this error by setting the LD_LIBRARY_PATH environment variable correctly. At first, I set it without the lib64.
I installed llvm on my $HOME/local so, the correct LD_LIBRARY_PATH would be.
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH”:$HOME/local/lib:$HOME/local/lib64

Problem in building gcc 4.5 : error in tools.zip

I tryied to build gcc 4.5.0 on Linux version 2.6.18-164.6.1.el5, and found the following problems that I couldn't find an answer on Google. I used the following command.
../gcc-4.3.5/configure --prefix=/usr --prefix=/apps --with-gmp=/apps --with-mpc=/apps --with-mpfr=/apps --enable-shared --enable-threads=posix
make -j 8
Here is the part when it complained about the error
...
cp: preserving ACL for `./asm/org/objectweb/asm/ClassAdapter.class': Operation not supported
cp: preserving permissions for `./asm/org/objectweb/asm': Operation not supported
cp: preserving permissions for `./asm/org/objectweb': Operation not supported
cp: preserving permissions for `./asm/org': Operation not supported
cp: preserving permissions for `./asm': Operation not supported
make[6]: *** [tools.zip] Error 1
make[6]: Leaving directory `/home/gl/gcc4.3obj/x86_64-unknown-linux-gnu/32/libjava/classpath/tools'
make[6]: Entering directory `/home/gl/gcc4.3obj/x86_64-unknown-linux-gnu/32/libjava/classpath'
true DO=all multi-do # make
make[6]: Leaving directory `/home/gl/gcc4.3obj/x86_64-unknown-linux-gnu/32/libjava/classpath'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/home/gl/gcc4.3obj/x86_64-unknown-linux-gnu/32/libjava/classpath'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/gl/gcc4.3obj/x86_64-unknown-linux-gnu/32/libjava'
make[3]: *** [multi-do] Error 1
make[3]: Leaving directory `/home/gl/gcc4.3obj/x86_64-unknown-linux-gnu/libjava'
make[2]: *** [all-multi] Error 2
make[2]: Leaving directory `/home/gl/gcc4.3obj/x86_64-unknown-linux-gnu/libjava'
make[1]: *** [all-target-libjava] Error 2
make[1]: Leaving directory `/home/gl/gcc4.3obj'
make: *** [all] Error 2
Any clarification and help will be highly appreciated. Thank you.
You say you're building gcc 4.5.0 but your error messages and ./configure line suggest that you are instead building gcc 4.3.5. I point this out because it's possible you have tripped over a bug in gcc 4.3.x's build scripts.
Second, the error messages you quoted make me think that you are doing your build on a weird file system, or else you have a buggy cp (unlikely but not impossible). What sort of file system is /home? You can find out with the mount command -- type it with no arguments, look for the /home line, see what it says next to "type". I have this:
/dev/sda3 on /home type ext4 (rw)
ext2, ext3, ext4, btrfs, xfs, and jfs should not be troublesome; anything else might well be for this use.
By the way, the precise version of your kernel ("Linux version 2.6.18-164.6.1.el5") is very unlikely to be relevant; for this sort of problem it would be much more useful to know which distribution you are using, and the version of that.
I had a similar problem building a different package (LAMMPS). The Makfile included a -p flag in a cp statement. I removed it and the error disappeared. It may be worth a try...

Resources