Installation under Ubuntu 14

Hi,

I'm trying to install graph-tool under Ubuntu 14. I didn't found gcc5 in the list of synaptic packages but
I did installed clang3.4. But when I run ./configure, it doesn't find clang3.4 (and probably detects pre-installed gcc 4.8.2 instead).
How can I tell ./configure to use clang3.4 rather than gcc4.8.2 ?

Thanks in advance

Yannis

I'm trying to install graph-tool under Ubuntu 14. I didn't found gcc5
in the list of synaptic packages but I did installed clang3.4.

Clang 3.4 is too old to compile graph-tool.

Please read the installation instructions carefully, in particular the
note about Ubuntu 14:

    Download - graph-tool: Efficent network analysis with python

which says:

    When using Ubuntu 14.04 LTS (Trusty Tahr) or 15.04 (Vivid Vervet),
    it is necessary need to install the following PPA repository, which
    contains a newer GCC version and associated libraries:

    add-apt-repository ppa:ubuntu-toolchain-r/test

This will give you GCC 5.

Also, please use the pre-compiled packages for Ubuntu, instead of
trying compiling it yourself.

But when I run ./configure, it doesn't find clang3.4 (and probably
detects pre-installed gcc 4.8.2 instead). How can I tell ./configure
to use clang3.4 rather than gcc4.8.2 ?

To select a particular compiler, e.g. GCC 5, you have to call

    ./configure CXX="gcc-5"

But please try to install the pre-compiled packages first, since it is
far easier.

Best,
Tiago

Thanks for the advice. I added the repository and installed gcc-5 via
Synaptics.
I asked for ./configure CXX="gcc-5" as you said, but I still get the error
message

checking whether gcc-5 supports C++14 features by default... no
checking whether gcc-5 supports C++14 features with -std=gnu++14... no
checking whether gcc-5 supports C++14 features with -std=gnu++0x... no
configure: error: *** A compiler with support for C++14 language features
is required.

My version of gcc-5 is
gcc version 5.3.0 20151204 (Ubuntu 5.3.0-3ubuntu1~14.04)

What am I doing wrong?

2016-04-13 18:08 GMT+02:00 Tiago de Paula Peixoto <tiago(a)skewed.de>:

attachment.html (2.88 KB)

Please post the _entire_ output of the ./configure script, together with
the config.log file.

I solved the problem by also installing g++-5 and setting CC variable to
gcc-5 and CXX variable to g++-5. But now I have a new problem: although I
have installed packages sparsehash 1.10-1ubuntu1 and libsparsehash-dev
1.10-1ubuntu1, the configure script does not see them

Here is the output, I attach the config.log file

root(a)ubuntu:/home/user/Téléchargements/graph-tool-2.14# ./configurechecking
build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for style of include used by make... GNU
checking for gcc... /usr/bin/gcc-5
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/bin/gcc-5 accepts -g... yes
checking for /usr/bin/gcc-5 option to accept ISO C89... none needed
checking whether /usr/bin/gcc-5 understands -c and -o together... yes
checking dependency style of /usr/bin/gcc-5... gcc3
checking for library containing strerror... none required
checking how to run the C preprocessor... /usr/bin/gcc-5 -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether we are using the GNU C++ compiler... yes
checking whether /usr/bin/g++-5 accepts -g... yes
checking dependency style of /usr/bin/g++-5... gcc3
checking for /usr/bin/gcc-5 option to accept ISO C99... unsupported
checking for /usr/bin/gcc-5 option to accept ISO C89... (cached) none needed
checking for /usr/bin/gcc-5 option to accept ISO Standard C... (cached)
none needed
checking how to run the C++ preprocessor... /usr/bin/g++-5 -E
checking for ANSI C header files... (cached) yes
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by /usr/bin/gcc-5... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-unknown-linux-gnu file names to
x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain
format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from /usr/bin/gcc-5
object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if /usr/bin/gcc-5 supports -fno-rtti -fno-exceptions... no
checking for /usr/bin/gcc-5 option to produce PIC... -fPIC -DPIC
checking if /usr/bin/gcc-5 PIC flag -fPIC -DPIC works... yes
checking if /usr/bin/gcc-5 static flag -static works... yes
checking if /usr/bin/gcc-5 supports -c -o file.o... yes
checking if /usr/bin/gcc-5 supports -c -o file.o... (cached) yes
checking whether the /usr/bin/gcc-5 linker (/usr/bin/ld -m elf_x86_64)
supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking how to run the C++ preprocessor... /usr/bin/g++-5 -E
checking for ld used by /usr/bin/g++-5... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the /usr/bin/g++-5 linker (/usr/bin/ld -m elf_x86_64)
supports shared libraries... yes
checking for /usr/bin/g++-5 option to produce PIC... -fPIC -DPIC
checking if /usr/bin/g++-5 PIC flag -fPIC -DPIC works... yes
checking if /usr/bin/g++-5 static flag -static works... yes
checking if /usr/bin/g++-5 supports -c -o file.o... yes
checking if /usr/bin/g++-5 supports -c -o file.o... (cached) yes
checking whether the /usr/bin/g++-5 linker (/usr/bin/ld -m elf_x86_64)
supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking whether /usr/bin/g++-5 supports C++14 features by default... no
checking whether /usr/bin/g++-5 supports C++14 features with
-std=gnu++14... yes
checking whether to enable debug info... no
checking whether to enable function inlining...... yes
checking whether to enable optimizations... yes
checking whether to enable symbol visibility manipulation... yes
checking whether to enable parallel algorithms with openmp... no
checking whether to enable cairo drawing... yes
checking for main in -lm... yes
checking for main in -lbz2... no
checking for main in -lexpat... yes

attachment.html (11.3 KB)

config.log (103 KB)

In Ubuntu, you have also to pass the option:

    --with-sparsehash-prefix=google

to ./configure.

OK, I passed the configure stage, but now I can't pass the make stage:

root(a)ubuntu:/home/user/Téléchargements/graph-tool-2.14# make
make all-recursive
make[1]: entrant dans le répertoire «
/home/user/Téléchargements/graph-tool-2.14 »
Making all in src
make[2]: entrant dans le répertoire «
/home/user/Téléchargements/graph-tool-2.14/src »
Making all in graph
make[3]: entrant dans le répertoire «
/home/user/Téléchargements/graph-tool-2.14/src/graph »
Making all in centrality
make[4]: entrant dans le répertoire «
/home/user/Téléchargements/graph-tool-2.14/src/graph/centrality »
  CXX graph_closeness.lo

*g++-5: internal compiler error: Processus arrêté (program cc1plus)*Please
submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
make[4]: *** [graph_closeness.lo] Erreur 1
make[4]: quittant le répertoire «
/home/user/Téléchargements/graph-tool-2.14/src/graph/centrality »
make[3]: *** [all-recursive] Erreur 1
make[3]: quittant le répertoire «
/home/user/Téléchargements/graph-tool-2.14/src/graph »
make[2]: *** [all-recursive] Erreur 1
make[2]: quittant le répertoire «
/home/user/Téléchargements/graph-tool-2.14/src »
make[1]: *** [all-recursive] Erreur 1
make[1]: quittant le répertoire «
/home/user/Téléchargements/graph-tool-2.14 »
make: *** [all] Erreur 2

2016-04-13 18:45 GMT+02:00 Tiago de Paula Peixoto <tiago(a)skewed.de>:

attachment.html (2.77 KB)

An internal compiler error is always a compiler bug, it is not
graph-tool's fault.

I haven't observed a compiler error with Ubuntu 14 using GCC 5; and I
managed to compile graph-tool just fine. So I don't know why you are
encountering this.

As I said before, I recommend you simply install the available binary
package for Ubuntu 14.

Best,
Tiago

I was able to compile graph-tool using conda on Ubuntu 14.04 (
https://anaconda.org/ostrokach/graph-tool), but it was hacky in that I had
to use system gcc-5 to compile and libgcc-5 from salford_systems as a
runtime dependency.
If you don't have admin rights on your computer, you can try installing

attachment.html (2 KB)

An internal compiler error is always a compiler bug, it is not
graph-tool's fault.

It was a memory problem, by allowing 2 GB of RAM I had much more *.lo files compiled, but still got the internal error.
With 3072 MB I got the ones in centrality, clustering, community_old, correlations, draw, flow, generation, inference
but not any further (and it took hours!)
Is there some way to compile those .lo file groups separately?

https://graph-tool.skewed.de/download#debian

You have the habit of asking questions which are plainly answered in the
documentation.

If you read

    https://graph-tool.skewed.de/download

you will see that you need at least 4GB of RAM to compile graph-tool
(there is even a plot showing memory usage over time). In that same page
you find the instructions on how to install the Ubuntu packages.