SymbolixAU / geojsonsf

Conversion between sf and geojson
Other
82 stars 7 forks source link

Error installing dev version #75

Closed jzadra closed 5 years ago

jzadra commented 5 years ago

Getting an error installing the dev version. OS X 14.6 R 3.6.0

> devtools::install_github("SymbolixAU/geojsonsf", force = TRUE)
Downloading GitHub repo SymbolixAU/geojsonsf@master
✔  checking for file ‘/private/var/folders/5_/l71sk6kn29z17n011g8kld5m0000gp/T/RtmpFxDIWJ/remotesa6016451b271/SymbolixAU-geojsonsf-8180d83/DESCRIPTION’ ...
─  preparing ‘geojsonsf’:
✔  checking DESCRIPTION meta-information ...
─  cleaning src
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  looking to see if a ‘data/datalist’ file should be added
─  building ‘geojsonsf_1.3.2.tar.gz’

* installing *source* package ‘geojsonsf’ ...
** using staged installation
** libs
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DSTRICT_R_HEADERS -DBOOST_NO_AUTO_PTR -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/jsonify/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rapidjsonr/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sfheaders/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -I../inst/include/ -fPIC  -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DSTRICT_R_HEADERS -DBOOST_NO_AUTO_PTR -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/jsonify/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rapidjsonr/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sfheaders/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -I../inst/include/ -fPIC  -Wall -g -O2  -c df_geojson.cpp -o df_geojson.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DSTRICT_R_HEADERS -DBOOST_NO_AUTO_PTR -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/jsonify/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rapidjsonr/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sfheaders/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -I../inst/include/ -fPIC  -Wall -g -O2  -c geojson_to_sf.cpp -o geojson_to_sf.o
In file included from geojson_to_sf.cpp:2:
In file included from ../inst/include/geojsonsf/geojson/geojson_to_sf.hpp:14:
In file included from ../inst/include/geojsonsf/sf/sfc/geojson_sfc.hpp:6:
../inst/include/geojsonsf/sf/sfc/utils/sfc_utils.hpp:30:10: error: non-const lvalue reference to type 'Rcpp::String' cannot bind to a value of unrelated type 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char> >')
                        epsg, proj, n_empty
                              ^~~~
/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sfheaders/include/sfheaders/sfc/sfc_attributes.hpp:119:21: note: passing argument to parameter 'proj4string' here
      Rcpp::String& proj4string,
                    ^
In file included from geojson_to_sf.cpp:2:
In file included from ../inst/include/geojsonsf/geojson/geojson_to_sf.hpp:14:
../inst/include/geojsonsf/sf/sfc/geojson_sfc.hpp:33:10: error: non-const lvalue reference to type 'Rcpp::String' cannot bind to a value of unrelated type 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char> >')
                        epsg, proj, nempty
                              ^~~~
/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sfheaders/include/sfheaders/sfc/sfc_attributes.hpp:119:21: note: passing argument to parameter 'proj4string' here
      Rcpp::String& proj4string,
                    ^
2 errors generated.
make: *** [geojson_to_sf.o] Error 1
ERROR: compilation failed for package ‘geojsonsf’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/geojsonsf’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/geojsonsf’
Error: Failed to install 'geojsonsf' from GitHub:
  (converted from warning) installation of package ‘/var/folders/5_/l71sk6kn29z17n011g8kld5m0000gp/T//RtmpFxDIWJ/filea6012f9a4c2b/geojsonsf_1.3.2.tar.gz’ had non-zero exit status
dcooley commented 5 years ago

please try it now

jzadra commented 5 years ago

Works now, thank you!

dcooley commented 5 years ago

thanks for reporting.

rtwillett commented 5 years ago

I am still getting the same error installing with the same command.

dcooley commented 5 years ago

can you post the command you're using, sessionInfo() and the error log?