Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install SF in Ubuntu 16.04: Error "polygonize.o" failed #884

Closed
inder-tg opened this issue Nov 3, 2018 · 3 comments
Closed

Can't install SF in Ubuntu 16.04: Error "polygonize.o" failed #884

inder-tg opened this issue Nov 3, 2018 · 3 comments

Comments

@inder-tg
Copy link

inder-tg commented Nov 3, 2018

Hi, I'm trying to install sf in my computer that runs on an Ubuntu 16.04, R 3.4 version but I keep getting the following error message:

Installing package into ‘/home/inder/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/sf_0.7-1.tar.gz'
Content type 'application/x-gzip' length 8330564 bytes (7.9 MB)

downloaded 7.9 MB

  • installing source package ‘sf’ ...
    ** package ‘sf’ successfully unpacked and MD5 sums checked
    configure: CC: gcc -std=gnu99
    configure: CXX: g++ -std=gnu++11
    checking for gdal-config... /usr/bin/gdal-config
    checking gdal-config usability... yes
    configure: GDAL: 2.6.0
    checking GDAL version >= 2.0.0... yes
    checking for gcc... gcc -std=gnu99
    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 -std=gnu99 accepts -g... yes
    checking for gcc -std=gnu99 option to accept ISO C89... none needed
    checking how to run the C preprocessor... gcc -std=gnu99 -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 gdal.h usability... yes
    checking gdal.h presence... yes
    checking for gdal.h... yes
    checking GDAL: linking with --libs only... yes
    checking GDAL: /usr/share/gdal/2.6/pcs.csv readable... yes
    checking GDAL: checking whether PROJ is available for linking:... yes
    checking GDAL: checking whether PROJ is available fur running:... yes
    configure: pkg-config proj exists, will use it
    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: epsg found and readable... yes
    checking PROJ: conus found and readable... yes
    checking for geos-config... /usr/bin/geos-config
    checking geos-config usability... yes
    configure: GEOS: 3.5.0
    checking GEOS version >= 3.4.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 -L/usr/lib/x86_64-linux-gnu -lgeos-3.5.0... yes
    configure: Package CPP flags: -I/usr/include/gdal -I/usr/include
    configure: Package LIBS: -lproj -L/usr/lib/x86_64-linux-gnu -lgdal -L/usr/lib/x86_64-linux-gnu -lgeos_c -L/usr/lib/x86_64-linux-gnu -lgeos-3.5.0
    configure: creating ./config.status
    config.status: creating src/Makevars
    ** libs
    g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG -I/usr/include/gdal -I/usr/include -I"/home/inder/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c RcppExports.cpp -o RcppExports.o
    g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG -I/usr/include/gdal -I/usr/include -I"/home/inder/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c bbox.cpp -o bbox.o
    g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG -I/usr/include/gdal -I/usr/include -I"/home/inder/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c gdal.cpp -o gdal.o
    g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG -I/usr/include/gdal -I/usr/include -I"/home/inder/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c gdal_geom.cpp -o gdal_geom.o
    g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG -I/usr/include/gdal -I/usr/include -I"/home/inder/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c gdal_read.cpp -o gdal_read.o
    g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG -I/usr/include/gdal -I/usr/include -I"/home/inder/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c gdal_utils.cpp -o gdal_utils.o
    g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG -I/usr/include/gdal -I/usr/include -I"/home/inder/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c gdal_write.cpp -o gdal_write.o
    g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG -I/usr/include/gdal -I/usr/include -I"/home/inder/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c geos.cpp -o geos.o
    g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG -I/usr/include/gdal -I/usr/include -I"/home/inder/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c hex.cpp -o hex.o
    g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG -I/usr/include/gdal -I/usr/include -I"/home/inder/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c polygonize.cpp -o polygonize.o
    polygonize.cpp: In function ‘Rcpp::List CPL_polygonize(Rcpp::CharacterVector, Rcpp::CharacterVector, Rcpp::CharacterVector, Rcpp::CharacterVector, Rcpp::CharacterVector, Rcpp::CharacterVector, Rcpp::IntegerVector, Rcpp::CharacterVector, bool, bool)’:
    polygonize.cpp:113:75: error: ‘GDALContourGenerateEx’ was not declared in this scope
    create_options(contour_options).data(), NULL, NULL) != OGRERR_NONE)
    ^
    /usr/lib/R/etc/Makeconf:168: recipe for target 'polygonize.o' failed
    make: *** [polygonize.o] Error 1
    ERROR: compilation failed for package ‘sf’
  • removing ‘/home/inder/R/x86_64-pc-linux-gnu-library/3.4/sf’
    Warning in install.packages :
    installation of package ‘sf’ had non-zero exit status

Any help will be really appreciated.

@edzer
Copy link
Member

edzer commented Nov 3, 2018

Your configure sais:

configure: GDAL: 2.6.0

which is very odd, since the dev version of GDAL is currently 2.3.2. Something is wrong with your GDAL install (or gdal-config); the routine GDALContourGenerateEx requires gdal >= 2.4.x (dev github version), and has been tested to run against that.

@inder-tg
Copy link
Author

inder-tg commented Nov 5, 2018 via email

@edzer
Copy link
Member

edzer commented Nov 5, 2018

Please look here: https://github.com/OSGeo/gdal/blob/master/gdal/VERSION - I take that as authorative. Please use either ubuntugis-unstable, which will give you GDAL 2.2.3, or install from source, which will give you 2.4.0 with GDALContourGenerateEx in it.

Looks like nextgis is going its own way with assigning version numbers; I take OSGEO as the one deciding about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants