R-ArcGIS / arcgisgeocode

Utilize public or private ArcGIS Geocoder Services from R. Provides reverse geocoding, candidate search, single address, and batch geocoding.
http://r.esri.com/arcgisgeocode/
Apache License 2.0
40 stars 6 forks source link

Installation issues when using R 4.3.2 on Ubuntu 22.04 #4

Closed jrosell closed 8 months ago

jrosell commented 8 months ago

$ rustc --version rustc 1.71.1 (eb26296b5 2023-08-03) $ cargo --version cargo 1.71.1 (7f1d04c00 2023-07-29)

> rlang::check_installed("arcgeocode",  action = \(pkg, ...) remotes::install_github("r-arcgis/arcgeocode"))
Downloading GitHub repo r-arcgis/arcgeocode@HEAD
── R CMD build ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✔  checking for file ‘/tmp/Rtmp5hjhG9/remotes815d76f56f5c/R-ArcGIS-arcgeocode-ecbf84f/DESCRIPTION’ (382ms)
─  preparing ‘arcgeocode’:
✔  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
─  building ‘arcgeocode_0.0.0.9000.tar.gz’

Installing package into ‘/home/jordi/R/x86_64-pc-linux-gnu-library/4.3’
(as ‘lib’ is unspecified)
* installing *source* package ‘arcgeocode’ ...
** using staged installation
** libs
using C compiler: ‘gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0’
rm -Rf arcgeocode.so ./rust/target/release/libarcgeocode.a entrypoint.o
gcc -I"/opt/R/4.3.2/lib/R/include" -DNDEBUG   -I/usr/local/include    -fpic  -g -O2  -c entrypoint.c -o entrypoint.o
# In some environments, ~/.cargo/bin might not be included in PATH, so we need
# to set it here to ensure cargo can be invoked. It is appended to PATH and
# therefore is only used if cargo is absent from the user's PATH.
if [ "" != "true" ]; then \
    export CARGO_HOME=/tmp/RtmpDhBVUT/R.INSTALL90ce183dcd68/arcgeocode/src/.cargo; \
fi && \
    export PATH="/home/jordi/.cargo/bin:/home/jordi/.local/bin:/home/jordi/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/opt/quarto/bin:/usr/lib/rstudio/resources/app/bin/postback:/home/jordi/.cargo/bin" && \
    cargo build --lib --release --manifest-path=./rust/Cargo.toml --target-dir ./rust/target
    Updating crates.io index
    Updating git repository `https://github.com/JosiahParry/serde_esri`
 Downloading crates ...
  Downloaded csv-core v0.1.11
  Downloaded autocfg v1.1.0
  Downloaded cfg-if v1.0.0
  Downloaded tower-service v0.3.2
  Downloaded darling_core v0.20.8
  Downloaded foreign-types v0.3.2
  Downloaded equivalent v1.0.1
  Downloaded darling_macro v0.20.8
  Downloaded futures-sink v0.3.30
  Downloaded foreign-types-shared v0.1.1
  Downloaded openssl-probe v0.1.5
  Downloaded is-terminal v0.4.12
  Downloaded want v0.3.1
  Downloaded try-lock v0.2.5
  Downloaded extendr-macros v0.6.0
  Downloaded tracing-core v0.1.32
  Downloaded dirs-sys-next v0.1.2
  Downloaded futures-core v0.3.30
  Downloaded unicode-width v0.1.11
  Downloaded bitflags v2.5.0
  Downloaded ident_case v1.0.1
  Downloaded fnv v1.0.7
  Downloaded deranged v0.3.11
  Downloaded num-conv v0.1.0
  Downloaded sync_wrapper v0.1.2
  Downloaded tinyvec_macros v0.1.1
  Downloaded time-core v0.1.2
  Downloaded unicode-ident v1.0.12
  Downloaded tracing v0.1.40
  Downloaded form_urlencoded v1.2.1
  Downloaded futures-task v0.3.30
  Downloaded phf_macros v0.11.2
  Downloaded httpdate v1.0.3
  Downloaded http-body v0.4.6
  Downloaded pin-utils v0.1.0
  Downloaded powerfmt v0.2.0
  Downloaded unicode-bidi v0.3.15
  Downloaded hex v0.4.3
  Downloaded dirs-next v2.0.0
  Downloaded url v2.5.0
  Downloaded openssl-macros v0.1.1
  Downloaded hyper-tls v0.5.0
  Downloaded tokio-util v0.7.10
  Downloaded phf_shared v0.11.2
  Downloaded phf_generator v0.11.2
  Downloaded paste v1.0.14
  Downloaded unicode-normalization v0.1.23
  Downloaded siphasher v0.3.11
  Downloaded slab v0.4.9
  Downloaded itoa v1.0.10
  Downloaded time-macros v0.2.17
  Downloaded num_cpus v1.16.0
  Downloaded rand_core v0.6.4
  Downloaded futures-channel v0.3.30
  Downloaded pkg-config v0.3.30
  Downloaded phf v0.11.2
  Downloaded lazy_static v1.4.0
  Downloaded percent-encoding v2.3.1
  Downloaded mime v0.3.17
  Downloaded tokio-macros v2.2.0
  Downloaded serde_urlencoded v0.7.1
  Downloaded tokio-native-tls v0.3.1
  Downloaded rustls-pemfile v1.0.4
  Downloaded vcpkg v0.2.15
  Downloaded strsim v0.10.0
  Downloaded quote v1.0.35
  Downloaded prettytable-rs v0.10.0
  Downloaded term v0.7.0
  Downloaded pin-project-lite v0.2.13
  Downloaded encode_unicode v1.0.0
  Downloaded native-tls v0.2.11
  Downloaded ipnet v2.9.0
  Downloaded darling v0.20.8
  Downloaded log v0.4.21
  Downloaded httparse v1.8.0
  Downloaded iana-time-zone v0.1.60
  Downloaded once_cell v1.19.0
  Downloaded tinyvec v1.6.0
  Downloaded proc-macro2 v1.0.79
  Downloaded cc v1.0.90
  Downloaded socket2 v0.5.6
  Downloaded tokio v1.36.0
  Downloaded serde_derive v1.0.197
  Downloaded openssl-sys v0.9.101
  Downloaded indexmap v1.9.3
  Downloaded ryu v1.0.17
  Downloaded num-traits v0.2.18
  Downloaded base64 v0.21.7
  Downloaded serde_with_macros v3.7.0
  Downloaded bytes v1.5.0
  Downloaded indexmap v2.2.5
  Downloaded memchr v2.7.1
  Downloaded serde v1.0.197
  Downloaded http v0.2.12
  Downloaded rand v0.8.5
  Downloaded mio v0.8.11
  Downloaded hashbrown v0.12.3
  Downloaded hashbrown v0.14.3
  Downloaded extendr-api v0.6.0
  Downloaded time v0.3.34
  Downloaded serde_json v1.0.114
  Downloaded serde_with v3.7.0
  Downloaded h2 v0.3.25
  Downloaded futures-util v0.3.30
  Downloaded reqwest v0.11.27
  Downloaded hyper v0.14.28
  Downloaded chrono v0.4.35
  Downloaded rust_iso3166 v0.1.12
  Downloaded syn v2.0.53
  Downloaded idna v0.5.0
  Downloaded openssl v0.10.64
  Downloaded libR-sys v0.6.0
  Downloaded libc v0.2.153
  Downloaded csv v1.3.0
  Downloaded encoding_rs v0.8.33
   Compiling proc-macro2 v1.0.79
   Compiling unicode-ident v1.0.12
   Compiling libc v0.2.153
   Compiling itoa v1.0.10
   Compiling serde v1.0.197
   Compiling once_cell v1.19.0
   Compiling vcpkg v0.2.15
   Compiling pin-project-lite v0.2.13
   Compiling cfg-if v1.0.0
   Compiling pkg-config v0.3.30
   Compiling cc v1.0.90
   Compiling bytes v1.5.0
   Compiling ryu v1.0.17
   Compiling autocfg v1.1.0
   Compiling futures-core v0.3.30
   Compiling openssl v0.10.64
   Compiling fnv v1.0.7
   Compiling strsim v0.10.0
   Compiling ident_case v1.0.1
   Compiling foreign-types-shared v0.1.1
   Compiling bitflags v2.5.0
   Compiling hashbrown v0.14.3
   Compiling native-tls v0.2.11
   Compiling serde_json v1.0.114
   Compiling foreign-types v0.3.2
   Compiling httparse v1.8.0
   Compiling siphasher v0.3.11
   Compiling rand_core v0.6.4
   Compiling futures-task v0.3.30
   Compiling tracing-core v0.1.32
   Compiling tinyvec_macros v0.1.1
   Compiling pin-utils v0.1.0
   Compiling equivalent v1.0.1
   Compiling futures-sink v0.3.30
   Compiling futures-util v0.3.30
   Compiling tinyvec v1.6.0
   Compiling phf_shared v0.11.2
   Compiling rand v0.8.5
   Compiling openssl-probe v0.1.5
   Compiling percent-encoding v2.3.1
   Compiling libR-sys v0.6.0
   Compiling memchr v2.7.1
   Compiling try-lock v0.2.5
   Compiling log v0.4.21
   Compiling slab v0.4.9
   Compiling want v0.3.1
   Compiling http v0.2.12
   Compiling form_urlencoded v1.2.1
   Compiling tracing v0.1.40
   Compiling futures-channel v0.3.30
   Compiling httpdate v1.0.3
   Compiling indexmap v2.2.5
   Compiling quote v1.0.35
   Compiling unicode-bidi v0.3.15
   Compiling phf_generator v0.11.2
   Compiling syn v2.0.53
   Compiling csv-core v0.1.11
   Compiling paste v1.0.14
   Compiling tower-service v0.3.2
   Compiling unicode-width v0.1.11
   Compiling encode_unicode v1.0.0
   Compiling socket2 v0.5.6
   Compiling mio v0.8.11
   Compiling num_cpus v1.16.0
   Compiling dirs-sys-next v0.1.2
   Compiling http-body v0.4.6
   Compiling dirs-next v2.0.0
   Compiling term v0.7.0
   Compiling unicode-normalization v0.1.23
   Compiling is-terminal v0.4.12
   Compiling extendr-api v0.6.0
   Compiling base64 v0.21.7
   Compiling lazy_static v1.4.0
   Compiling encoding_rs v0.8.33
   Compiling sync_wrapper v0.1.2
   Compiling ipnet v2.9.0
   Compiling openssl-sys v0.9.101
   Compiling rustls-pemfile v1.0.4
   Compiling mime v0.3.17
   Compiling idna v0.5.0
   Compiling url v2.5.0
   Compiling darling_core v0.20.8
   Compiling serde_derive v1.0.197
   Compiling tokio-macros v2.2.0
   Compiling openssl-macros v0.1.1
   Compiling phf_macros v0.11.2
   Compiling extendr-macros v0.6.0
   Compiling tokio v1.36.0
   Compiling phf v0.11.2
   Compiling darling_macro v0.20.8
   Compiling darling v0.20.8
   Compiling serde_with_macros v3.7.0
   Compiling tokio-util v0.7.10
   Compiling tokio-native-tls v0.3.1
   Compiling h2 v0.3.25
   Compiling csv v1.3.0
   Compiling serde_urlencoded v0.7.1
   Compiling prettytable-rs v0.10.0
   Compiling serde_with v3.7.0
   Compiling rust_iso3166 v0.1.12
   Compiling hyper v0.14.28
   Compiling serde_esri v0.1.0 (https://github.com/JosiahParry/serde_esri#4138f0bb)
   Compiling hyper-tls v0.5.0
   Compiling reqwest v0.11.27
   Compiling arcgeocode v0.1.0 (/tmp/RtmpDhBVUT/R.INSTALL90ce183dcd68/arcgeocode/src/rust)
    Finished release [optimized] target(s) in 1m 09s
if [ "" != "true" ]; then \
    rm -Rf /tmp/RtmpDhBVUT/R.INSTALL90ce183dcd68/arcgeocode/src/.cargo && \
    rm -Rf ./rust/target/release/build; \
fi
gcc -shared -L/opt/R/4.3.2/lib/R/lib -L/usr/local/lib -o arcgeocode.so entrypoint.o -L./rust/target/release -larcgeocode -L/opt/R/4.3.2/lib/R/lib -lR
installing to /home/jordi/R/x86_64-pc-linux-gnu-library/4.3/00LOCK-arcgeocode/00new/arcgeocode/libs
** R
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘arcgeocode’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/jordi/R/x86_64-pc-linux-gnu-library/4.3/00LOCK-arcgeocode/00new/arcgeocode/libs/arcgeocode.so':
  /home/jordi/R/x86_64-pc-linux-gnu-library/4.3/00LOCK-arcgeocode/00new/arcgeocode/libs/arcgeocode.so: undefined symbol: PKCS5_PBKDF2_HMAC
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/jordi/R/x86_64-pc-linux-gnu-library/4.3/arcgeocode’
Warning message:
In i.p(...) :
  installation of package ‘/tmp/Rtmp5hjhG9/file815d2d13a31a/arcgeocode_0.0.0.9000.tar.gz’ had non-zero exit status
> sessionInfo()
R version 4.3.2 (2023-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.3 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so;  LAPACK version 3.10.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=es_ES.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=es_ES.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=es_ES.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=es_ES.UTF-8 LC_IDENTIFICATION=C       

time zone: Europe/Madrid
tzcode source: system (glibc)

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] vctrs_0.6.5            knitr_1.45             cli_3.6.2              xfun_0.42              rlang_1.1.3            processx_3.8.3        
 [7] stringi_1.8.3          DBI_1.2.2              KernSmooth_2.23-22     purrr_1.0.2            rextendr_0.3.1.9000    generics_0.1.3        
[13] sf_1.0-16              glue_1.7.0             e1071_1.7-14           arcgisutils_0.2.0.9000 ps_1.7.6               pkgbuild_1.4.3        
[19] pak_0.7.1.9000         fansi_1.0.6            grid_4.3.2             classInt_0.4-10        tibble_3.2.1           lifecycle_1.0.4       
[25] compiler_4.3.2         dplyr_1.1.4            Rcpp_1.0.12            pkgconfig_2.0.3        rstudioapi_0.15.0      R6_2.5.1              
[31] class_7.3-22           tidyselect_1.2.1       utf8_1.2.4             curl_5.2.1             pillar_1.9.0           callr_3.7.5           
[37] magrittr_2.0.3         tools_4.3.2            proxy_0.4-27           desc_1.4.3             units_0.8-5            remotes_2.4.2.1    
jrosell commented 8 months ago

It works now https://github.com/R-ArcGIS/arcgeocode/commit/742c31c3f08a644a1f8dcfb930a39e35a60aade5

JosiahParry commented 8 months ago

Thank you for your help tracking this one down, @jrosell