Discussion:
[igraph] igraph: Trouble upon install in Ubuntu 17.04
Cedric Bhihe
2017-09-20 22:42:48 UTC
Permalink
Hello,

I'm new to igraph and still green on R ('littler' version 0.3.2, with R
v3.4.0)  and Rstudio (Version 1.0.153).

I just installed R and Rstudio and am experiencing problems when
installing igraph on Ubuntu 17.04 (64bits).

The install error described below seems to be independent of the library
directory in which I try to install the package. I tried both:
[1] "/home/ckb/R/x86_64-pc-linux-gnu-library/3.4"
[2] "/usr/local/lib/R/site-library"
     ... by modifying the file /etc/R/Renviron.
The result is in each case:

=====================================
In file included from src/foreign-gml-parser.y:59:0:
igraph_hacks_internal.h:42:0: warning: "strdup" redefined
 #  define strdup igraph_i_strdup

In file included from /usr/include/string.h:630:0,
                 from src/foreign-gml-parser.y:54:
/usr/include/x86_64-linux-gnu/bits/string2.h:337:0: note: this is the
location of the previous definition
 #   define strdup(s) __strdup (s)

gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG     -DUSING_R -I.
-Iinclude -Ics -Iglpk -Iplfit -ICHOLMOD/Include -IAMD/Include
-ICOLAMD/Include -ISuiteSparse_config -g -O2
-fdebug-prefix-map=/build/r-base-X2xP8j/r-base-3.4.1=.
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
-D_FORTIFY_SOURCE=2 -g -DNDEBUG -DNPARTITION -DNTIMER -DNCAMD -DNPRINT
-DPACKAGE_VERSION=\"1.1.1\" -DINTERNAL_ARPACK -DIGRAPH_THREAD_LOCAL=/**/
-fpic  -g -O2 -fdebug-prefix-map=/build/r-base-X2xP8j/r-base-3.4.1=.
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
-D_FORTIFY_SOURCE=2 -g  -c foreign-graphml.c -o foreign-graphml.o
foreign-graphml.c: In function ‘igraph_write_graph_graphml’:
foreign-graphml.c:1408:46: error: expected ‘)’ before
‘GRAPHML_NAMESPACE_URI’
   ret=fprintf(outstream, "<graphml xmlns=\"" GRAPHML_NAMESPACE_URI
"\"\n");
^~~~~~~~~~~~~~~~~~~~~
foreign-graphml.c:1412:59: error: expected ‘)’ before
‘GRAPHML_NAMESPACE_URI’
   ret=fprintf(outstream, "         xsi:schemaLocation=\""
GRAPHML_NAMESPACE_URI "\n");
^~~~~~~~~~~~~~~~~~~~~
foreign-graphml.c:1414:38: error: expected ‘)’ before
‘GRAPHML_NAMESPACE_URI’
   ret=fprintf(outstream, "         " GRAPHML_NAMESPACE_URI
"/1.0/graphml.xsd\">\n");
                                      ^~~~~~~~~~~~~~~~~~~~~
/usr/lib/R/etc/Makeconf:159: recipe for target 'foreign-graphml.o' failed
make: *** [foreign-graphml.o] Error 1
ERROR: compilation failed for package ‘igraph’
* removing ‘/home/ckb/R/x86_64-pc-linux-gnu-library/3.4/igraph’
Warning in install.packages :
  installation of package ‘igraph’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/Rtmpli2vyo/downloaded_packages’
=====================================

Can anyone help with a fix so I can proceed with the install ?

Thanks.

Cedric

Loading...