g++ error on compiling package raster for tmap install


#1

I'm trying to use tmap and, after initially getting an error with install.packages('tmap'), I installed the GitHub version of lwgeom as indicated in this post.

However, I still get a failure due to a g++ error on the compilation of the raster (or RasterModule.o) object. Here is a snippet showing the call and error message:

* installing *source* package ‘raster’ ...
** package ‘raster’ successfully unpacked and MD5 sums checked
** libs
g++ -std=gnu++11 -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG  -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I/usr/local/include   -fpic  -g -O2 -c RasterModule.cpp -o RasterModule.o
g++: internal compiler error: Killed (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: *** [RasterModule.o] Error 4
ERROR: compilation failed for package ‘raster’
* removing ‘/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/raster

Everything following then fails, since raster is not available. The almost full results of

devtools::install_github("r-spatial/lwgeom", force = TRUE)
install.packages('tmap')

are below. I snipped some of the successful lwgeom results to meet the character limit.

Any help is appreciated!
Dave

Downloading GitHub repo r-spatial/lwgeom@master
✔  checking for file ‘/tmp/Rtmp0iK6Df/remotes7c628f9b7b4/r-spatial-lwgeom-1cd8e1b/DESCRIPTION’ ...
─  preparing ‘lwgeom’:
✔  checking DESCRIPTION meta-information ...
─  cleaning src
─  running ‘cleanup’
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘lwgeom_0.1-6.tar.gz’
   
Installing package into ‘/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
* installing *source* package ‘lwgeom’ ...
configure: CC: gcc
configure: CXX: g++
configure: pkg-config proj exists, will use it
checking for gcc... gcc
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 gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -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 proj_api.h usability... yes
checking proj_api.h presence... yes
checking for proj_api.h... yes
configure: PROJ: 4.9.2
checking for pj_init_plus in -lproj... yes
checking PROJ.4: epsg found and readable... yes
checking PROJ.4: conus found and readable... yes
checking for geos-config... /usr/bin/geos-config
checking geos-config usability... yes
configure: GEOS: 3.5.1
checking GEOS version >= 3.3.0... yes
checking geos_c.h usability... yes
checking geos_c.h presence... yes
checking for geos_c.h... yes
checking geos: linking with -L/usr/lib/x86_64-linux-gnu -lgeos_c... yes
checking for GEOS_init_r in -lgeos_c... yes
configure: Package CPP flags:   -I/usr/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H
configure: Package LIBS:  -lproj  -lgeos_c
configure: creating ./config.status
config.status: creating src/Makevars
** libs
g++ -std=gnu++11 -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG -I/usr/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/sf/include" -I/usr/local/include   -fpic  -g -O2 -c geodetic.cpp -o geodetic.o
.
.
.
<SNIP/>
.
.
.
gcc -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG -I/usr/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/sf/include" -I/usr/local/include   -fpic  -g -O2  -c liblwgeom/lwmsurface.c -o liblwgeom/lwmsurface.o
gcc -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG -I/usr/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/sf/include" -I/usr/local/include   -fpic  -g -O2  -c liblwgeom/lwout_encoded_polyline.c -o liblwgeom/lwout_encoded_polyline.o
gcc -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG -I/usr/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/sf/include" -I/usr/local/include   -fpic  -g -O2  -c liblwgeom/lwout_geojson.c -o liblwgeom/lwout_geojson.o
gcc -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG -I/usr/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/sf/include" -I/usr/local/include   -fpic  -g -O2  -c liblwgeom/lwout_gml.c -o liblwgeom/lwout_gml.o
gcc -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG -I/usr/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/sf/include" -I/usr/local/include   -fpic  -g -O2  -c liblwgeom/lwout_kml.c -o liblwgeom/lwout_kml.o
gcc -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG -I/usr/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/sf/include" -I/usr/local/include   -fpic  -g -O2  -c liblwgeom/lwout_svg.c -o liblwgeom/lwout_svg.o
gcc -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG -I/usr/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/sf/include" -I/usr/local/include   -fpic  -g -O2  -c liblwgeom/lwout_twkb.c -o liblwgeom/lwout_twkb.o
gcc -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG -I/usr/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/sf/include" -I/usr/local/include   -fpic  -g -O2  -c liblwgeom/lwout_wkb.c -o liblwgeom/lwout_wkb.o
gcc -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG -I/usr/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/sf/include" -I/usr/local/include   -fpic  -g -O2  -c liblwgeom/lwout_x3d.c -o liblwgeom/lwout_x3d.o
gcc -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG -I/usr/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/sf/include" -I/usr/local/include   -fpic  -g -O2  -c liblwgeom/lwpoint.c -o liblwgeom/lwpoint.o
gcc -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG -I/usr/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/sf/include" -I/usr/local/include   -fpic  -g -O2  -c liblwgeom/lwpoly.c -o liblwgeom/lwpoly.o
gcc -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG -I/usr/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/sf/include" -I/usr/local/include   -fpic  -g -O2  -c liblwgeom/lwprint.c -o liblwgeom/lwprint.o
gcc -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG -I/usr/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/sf/include" -I/usr/local/include   -fpic  -g -O2  -c liblwgeom/lwpsurface.c -o liblwgeom/lwpsurface.o
gcc -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG -I/usr/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/sf/include" -I/usr/local/include   -fpic  -g -O2  -c liblwgeom/lwspheroid.c -o liblwgeom/lwspheroid.o
gcc -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG -I/usr/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/sf/include" -I/usr/local/include   -fpic  -g -O2  -c liblwgeom/lwstroke.c -o liblwgeom/lwstroke.o
gcc -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG -I/usr/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/sf/include" -I/usr/local/include   -fpic  -g -O2  -c liblwgeom/lwtin.c -o liblwgeom/lwtin.o
gcc -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG -I/usr/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/sf/include" -I/usr/local/include   -fpic  -g -O2  -c liblwgeom/lwtree.c -o liblwgeom/lwtree.o
gcc -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG -I/usr/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/sf/include" -I/usr/local/include   -fpic  -g -O2  -c liblwgeom/lwtriangle.c -o liblwgeom/lwtriangle.o
gcc -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG -I/usr/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/sf/include" -I/usr/local/include   -fpic  -g -O2  -c liblwgeom/lwunionfind.c -o liblwgeom/lwunionfind.o
gcc -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG -I/usr/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/sf/include" -I/usr/local/include   -fpic  -g -O2  -c liblwgeom/lwutil.c -o liblwgeom/lwutil.o
gcc -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG -I/usr/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/sf/include" -I/usr/local/include   -fpic  -g -O2  -c liblwgeom/measures3d.c -o liblwgeom/measures3d.o
gcc -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG -I/usr/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/sf/include" -I/usr/local/include   -fpic  -g -O2  -c liblwgeom/measures.c -o liblwgeom/measures.o
gcc -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG -I/usr/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/sf/include" -I/usr/local/include   -fpic  -g -O2  -c liblwgeom/ptarray.c -o liblwgeom/ptarray.o
gcc -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG -I/usr/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/sf/include" -I/usr/local/include   -fpic  -g -O2  -c liblwgeom/stringbuffer.c -o liblwgeom/stringbuffer.o
gcc -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG -I/usr/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/sf/include" -I/usr/local/include   -fpic  -g -O2  -c liblwgeom/varint.c -o liblwgeom/varint.o
gcc -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG -I/usr/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/sf/include" -I/usr/local/include   -fpic  -g -O2  -c liblwgeom/lwin_wkt_parse.c -o liblwgeom/lwin_wkt_parse.o
gcc -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG -I/usr/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/sf/include" -I/usr/local/include   -fpic  -g -O2  -c liblwgeom/lwin_wkt_lex.c -o liblwgeom/lwin_wkt_lex.o
gcc -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG -I/usr/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/sf/include" -I/usr/local/include   -fpic  -g -O2  -c liblwgeom/lwout_wkt.c -o liblwgeom/lwout_wkt.o
gcc -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG -I/usr/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/sf/include" -I/usr/local/include   -fpic  -g -O2  -c liblwgeom/lwin_wkt.c -o liblwgeom/lwin_wkt.o
g++ -std=gnu++11 -shared -L/opt/R/3.5.2/lib/R/lib -L/usr/local/lib -o lwgeom.so geodetic.o lwgeom.o RcppExports.o proj.o geos.o io.o sub.o liblwgeom/box2d.o liblwgeom/bytebuffer.o liblwgeom/effectivearea.o liblwgeom/g_box.o liblwgeom/g_serialized.o liblwgeom/g_util.o liblwgeom/kmeans.o liblwgeom/lwalgorithm.o liblwgeom/lwboundingcircle.o liblwgeom/lwcircstring.o liblwgeom/lwcollection.o liblwgeom/lwcompound.o liblwgeom/lwcurvepoly.o liblwgeom/lwgeodetic.o liblwgeom/lwgeodetic_tree.o liblwgeom/lwgeom_api.o liblwgeom/lwgeom.o liblwgeom/lwgeom_debug.o liblwgeom/lwgeom_geos.o liblwgeom/lwgeom_geos_clean.o liblwgeom/lwgeom_geos_cluster.o liblwgeom/lwgeom_geos_node.o liblwgeom/lwgeom_geos_split.o liblwgeom/lwgeom_median.o liblwgeom/lwgeom_topo.o liblwgeom/lwgeom_transform.o liblwgeom/lwgeom_wrapx.o liblwgeom/lwhomogenize.o liblwgeom/lwin_encoded_polyline.o liblwgeom/lwin_geojson.o liblwgeom/lwin_twkb.o liblwgeom/lwin_wkb.o liblwgeom/lwiterator.o liblwgeom/lwkmeans.o liblwgeom/lwlinearreferencing.o liblwgeom/lwline.o liblwgeom/lwmcurve.o liblwgeom/lwmline.o liblwgeom/lwmpoint.o liblwgeom/lwmpoly.o liblwgeom/lwmsurface.o liblwgeom/lwout_encoded_polyline.o liblwgeom/lwout_geojson.o liblwgeom/lwout_gml.o liblwgeom/lwout_kml.o liblwgeom/lwout_svg.o liblwgeom/lwout_twkb.o liblwgeom/lwout_wkb.o liblwgeom/lwout_x3d.o liblwgeom/lwpoint.o liblwgeom/lwpoly.o liblwgeom/lwprint.o liblwgeom/lwpsurface.o liblwgeom/lwspheroid.o liblwgeom/lwstroke.o liblwgeom/lwtin.o liblwgeom/lwtree.o liblwgeom/lwtriangle.o liblwgeom/lwunionfind.o liblwgeom/lwutil.o liblwgeom/measures3d.o liblwgeom/measures.o liblwgeom/ptarray.o liblwgeom/stringbuffer.o liblwgeom/varint.o liblwgeom/lwin_wkt_parse.o liblwgeom/lwin_wkt_lex.o liblwgeom/lwout_wkt.o liblwgeom/lwin_wkt.o -lproj -lgeos_c -L/opt/R/3.5.2/lib/R/lib -lR
installing to /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/lwgeom/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (lwgeom)
Installing package into ‘/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
also installing the dependencies ‘satellite’, ‘tmaptools’, ‘raster’, ‘leaflet’, ‘mapview’

trying URL 'http://package-proxy/src/contrib/satellite_1.0.1.tar.gz'
Content type 'application/x-gzip' length 2315162 bytes (2.2 MB)
==================================================
downloaded 2.2 MB

trying URL 'http://package-proxy/src/contrib/tmaptools_2.0-1.tar.gz'
Content type 'application/x-gzip' length 84761 bytes (82 KB)
==================================================
downloaded 82 KB

trying URL 'http://package-proxy/src/contrib/raster_2.8-19.tar.gz'
Content type 'application/x-gzip' length 1134572 bytes (1.1 MB)
==================================================
downloaded 1.1 MB

trying URL 'http://package-proxy/src/contrib/leaflet_2.0.2.tar.gz'
Content type 'application/x-gzip' length 2056701 bytes (2.0 MB)
==================================================
downloaded 2.0 MB

trying URL 'http://package-proxy/src/contrib/mapview_2.6.3.tar.gz'
Content type 'application/x-gzip' length 2018806 bytes (1.9 MB)
==================================================
downloaded 1.9 MB

trying URL 'http://package-proxy/src/contrib/tmap_2.2.tar.gz'
Content type 'application/x-gzip' length 2894035 bytes (2.8 MB)
==================================================
downloaded 2.8 MB

* installing *source* package ‘raster’ ...
** package ‘raster’ successfully unpacked and MD5 sums checked
** libs
g++ -std=gnu++11 -I"/opt/R/3.5.2/lib/R/include" -DNDEBUG  -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I/usr/local/include   -fpic  -g -O2 -c RasterModule.cpp -o RasterModule.o
g++: internal compiler error: Killed (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: *** [RasterModule.o] Error 4
ERROR: compilation failed for package ‘raster’
* removing ‘/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/raster’
/opt/R/3.5.2/lib/R/etc/Makeconf:171: recipe for target 'RasterModule.o' failed
Warning in install.packages :
  installation of package ‘raster’ had non-zero exit status
ERROR: dependency ‘raster’ is not available for package ‘satellite’
* removing ‘/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/satellite’
Warning in install.packages :
  installation of package ‘satellite’ had non-zero exit status
ERROR: dependency ‘raster’ is not available for package ‘tmaptools’
* removing ‘/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/tmaptools’
Warning in install.packages :
  installation of package ‘tmaptools’ had non-zero exit status
ERROR: dependency ‘raster’ is not available for package ‘leaflet’
* removing ‘/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/leaflet’
Warning in install.packages :
  installation of package ‘leaflet’ had non-zero exit status
ERROR: dependencies ‘leaflet’, ‘raster’, ‘satellite’ are not available for package ‘mapview’
* removing ‘/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/mapview’
Warning in install.packages :
  installation of package ‘mapview’ had non-zero exit status
ERROR: dependencies ‘tmaptools’, ‘raster’, ‘leaflet’, ‘mapview’ are not available for package ‘tmap’
* removing ‘/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/tmap’
Warning in install.packages :
  installation of package ‘tmap’ had non-zero exit status

The downloaded source packages are in
	‘/tmp/Rtmp0iK6Df/downloaded_packages’

#2

In a new project I was able to run

devtools::install_github("r-spatial/lwgeom", force = TRUE)
install.packages('tmap')

successfully. Could you try a new project and let me know if you see the same?


#3

Hmm, yes, that worked. I created a new project, created a new R Notebook file, and executed

install.packages('devtools')
devtools::install_github("r-spatial/lwgeom", force = TRUE)
install.packages('tmap')

That all worked fine. Is there a way to "purge" all the loaded/compiled libraries in my existing project and have another go at it?

In addition to tmap, I am using: tidyverse, tidycensus, sf, and jsonlite. I initially loaded them in the order

# Load necessary packages, set global options
library(tidycensus)
library(tidyverse)
#library(tmap)
library(sf)
library(jsonlite)

Any suggestions?


#4

Hi Josh,

Well, I tried a different version of an existing project, and ran things in this order:

# Load necessary packages, set global options
library(tidycensus)
library(tidyverse)
library(sf)
library(jsonlite)
options(tigris_use_cache = TRUE)

install.packages('devtools')
devtools::install_github("r-spatial/lwgeom", force = TRUE)
install.packages('tmap')
library(tmap)

I got the same error from g++ on the attempted compilation for RasterModule.o. I am now running all of those in a completely new project, creating an R Notebook file, replacing the default R-snippet with the above code and saving that file. I'm then prompted to install the missing libraries, which include tmap. I have said yes. When that finishes, if tmap install fails, then I'll run the github version of lwgeom and try to install tamp again.

Hopefully it will either work, or give a reproducible error.

Thanks for the help,
Dave


#5

Well, the initial tmap install by the RStudio Cloud process failed, but after installing the dev version of lwgeom, the tmap install then worked.

I will just copy and paste all my code from the old project into this new one. There isn't that much yet, so that will get me running.

Here are a couple things to consider: my initial project was one of those created between Feb 1 & Feb 4 which then got stuck during the loading process. The one I tried recently was perhaps a copy of that project, although I thought it was a cut & paste copy of the original text, not a copy of a project.

In any case, I'm curious about being able to get rid of all the libraries in a project. Is there a way I, a user, can do that?

Thanks for all the help,
Dave


#6

Go to the packages pane and hit X on all the User Libraries.

Or navigate to ~/R/x86_64-pc-linux-gnu-library/3.5 and rm -rf *. Then refresh the packages pane. Be careful with that one though.


#7

!!! I'm not too sure about that rm -rf *, LOL Been there, done that!

But thanks, I'll see if that clears things up. In the meantime, I'm making great progress with the new copy.

Thanks for the great product and support!
Dave


#8

Right? I tested it, but wanted to give warning based on your comfort level. :slight_smile:
Glad the new copy is doing what you want, thanks for the compliments!