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

Readr installing failed #919

Closed
tarmenic opened this issue Nov 22, 2018 · 17 comments
Closed

Readr installing failed #919

tarmenic opened this issue Nov 22, 2018 · 17 comments

Comments

@tarmenic
Copy link

@tarmenic tarmenic commented Nov 22, 2018

I cannot get readr to install, neither via R install.packages nor via github. While everything of the tidyverse (so far) seems to install fine, with readr I always get:

** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared object '/usr/local/lib/R/site-library/readr/libs/readr.so':
  /usr/local/lib/R/site-library/readr/libs/readr.so: undefined symbol: write_connection
Error: loading failed

My session info is:

R version 3.2.3 (2015-12-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.5 LTS

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

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

other attached packages:
[1] sessioninfo_1.1.1

loaded via a namespace (and not attached):
[1] assertthat_0.2.0 cli_1.0.1        tools_3.2.3      withr_2.1.2
[5] crayon_1.3.4

The system is completely newly set up. R is installed via apt (r-base and r-base-dev) and run with sudo. Google did not seem to know the specific "write_connection" error message. Any help would be appreciated.
Thanks.

@JeffreyRacine
Copy link

@JeffreyRacine JeffreyRacine commented Nov 22, 2018

Similar issue on macOS with current R version...

Error: package or namespace load failed for ‘readr’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Users/jracine/Library/R/readr/libs/x86_64/readr.so':
dlopen(/Users/jracine/Library/R/readr/libs/x86_64/readr.so, 6): Library not loaded: @loader_path/../rcon/librcon.so
Referenced from: /Users/jracine/Library/R/readr/libs/x86_64/readr.so
Reason: image not found
Error: loading failed
Execution halted
ERROR: loading failed

  • removing ‘/Users/jracine/Library/R/readr’
  • restoring previous ‘/Users/jracine/Library/R/readr’

sessionInfo()

R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin18.0.0/x86_64 (64-bit)
Running under: macOS 10.14.1

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8

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

loaded via a namespace (and not attached):
[1] compiler_3.5.1

@jennybc
Copy link
Member

@jennybc jennybc commented Nov 22, 2018

We are in that period between a new readr version being on CRAN but binaries are not yet available.

@JeffreyRacine I assume you saw something like this when installing?

  There is a binary version available but the source version is later:
      binary source needs_compilation
readr  1.1.1  1.2.1              TRUE

Do you want to install from sources the package which needs compilation? (Yes/no/cancel)

I am able to successfully install readr v1.2.1 from CRAN, with compilation.

Are you @JeffreyRacine generally set up to compile packages from source?

@JeffreyRacine
Copy link

@JeffreyRacine JeffreyRacine commented Nov 22, 2018

Greetings,

Installed from source... no issues with other packages...

update.packages(checkBuilt=TRUE,ask=FALSE,lib="/Users/jracine/Library/R",repos="https://cran.wu.ac.at")
trying URL 'https://cran.wu.ac.at/src/contrib/readr_1.2.1.tar.gz'
Content type 'application/x-gzip' length 358690 bytes (350 KB)
==================================================
downloaded 350 KB

  • installing source package ‘readr’ ...
    ** package ‘readr’ successfully unpacked and MD5 sums checked
    ** libs
    *** arch - x86_64
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c Collector.cpp -o Collector.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c CollectorGuess.cpp -o CollectorGuess.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c Iconv.cpp -o Iconv.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c LocaleInfo.cpp -o LocaleInfo.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c RcppExports.cpp -o RcppExports.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c Reader.cpp -o Reader.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c Source.cpp -o Source.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c Tokenizer.cpp -o Tokenizer.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c TokenizerDelim.cpp -o TokenizerDelim.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c TokenizerFwf.cpp -o TokenizerFwf.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c TokenizerWs.cpp -o TokenizerWs.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c connection.cpp -o connection.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c datetime.cpp -o datetime.o
    clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -fPIC -g -O2 -c grisu3.c -o grisu3.o
    clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -fPIC -g -O2 -c init.c -o init.o
    clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -fPIC -g -O2 -c localtime.c -o localtime.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c parse.cpp -o parse.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c read.cpp -o read.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c type_convert.cpp -o type_convert.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c write.cpp -o write.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c write_connection.cpp -o write_connection.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c write_delim.cpp -o write_delim.o
    clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -fPIC -g -O2 -c rcon/connection.c -o rcon/connection.o
    clang++ -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L"/Library/Frameworks/R.framework/Resources/lib/x86_64" -L/opt/local/lib -o ../inst/rcon/librcon.so rcon/connection.o -Wl,-install_name -Wl,@loader_path/../rcon/librcon.so
    clang++ -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib/x86_64 -L/opt/local/lib -o readr.so Collector.o CollectorGuess.o Iconv.o LocaleInfo.o RcppExports.o Reader.o Source.o Tokenizer.o TokenizerDelim.o TokenizerFwf.o TokenizerWs.o connection.o datetime.o grisu3.o init.o localtime.o parse.o read.o type_convert.o write.o write_connection.o write_delim.o -L. -lrcon -L../inst/rcon -Wl,-rpath,/Users/jracine/Library/R/readr/rcon -F/Library/Frameworks/R.framework/.. -framework R -lintl -Wl,-framework -Wl,CoreFoundation
    installing via 'install.libs.R' to /Users/jracine/Library/R/readr
    ** R
    ** inst
    ** byte-compile and prepare package for lazy loading
    ** help
    *** installing help indices
    *** copying figures
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded
    Error: package or namespace load failed for ‘readr’ in dyn.load(file, DLLpath = DLLpath, ...):
    unable to load shared object '/Users/jracine/Library/R/readr/libs/x86_64/readr.so':
    dlopen(/Users/jracine/Library/R/readr/libs/x86_64/readr.so, 6): Library not loaded: @loader_path/../rcon/librcon.so
    Referenced from: /Users/jracine/Library/R/readr/libs/x86_64/readr.so
    Reason: image not found
    Error: loading failed
    Execution halted
    ERROR: loading failed
  • removing ‘/Users/jracine/Library/R/readr’
  • restoring previous ‘/Users/jracine/Library/R/readr’

@tarmenic
Copy link
Author

@tarmenic tarmenic commented Nov 22, 2018

Not sure if this helps with my original problem, but at least FYI: @jennybc I saw that message on Windows earlier today. I have just installed the 1.1.1. on a Windows R 3.5.1 as binary and then updated with compiling from source to 1.2.1. That went fine.

> install.packages("readr",repos="http://cloud.r-project.org/", type="source")
[...]
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (readr)
In R CMD INSTALL

> library(readr)
> sessionInfo()

R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252    LC_MONETARY=German_Germany.1252 LC_NUMERIC=C                    LC_TIME=German_Germany.1252    

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

other attached packages:
[1] readr_1.2.1

loaded via a namespace (and not attached):
 [1] compiler_3.5.1  R6_2.3.0        hms_0.4.2       tools_3.5.1     pillar_1.3.0    tibble_1.4.2    Rcpp_1.0.0      crayon_1.3.4    pkgconfig_2.0.2 rlang_0.3.0.1  

@tarmenic
Copy link
Author

@tarmenic tarmenic commented Nov 23, 2018

...and I have now reproduced it again in this environment:

R version 3.2.3 (2015-12-10)
Platform: i686-pc-linux-gnu (32-bit)
Running under: Ubuntu 16.04.5 LTS

locale:
 [1] LC_CTYPE=de_DE.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=de_DE.UTF-8        LC_COLLATE=de_DE.UTF-8    
 [5] LC_MONETARY=de_DE.UTF-8    LC_MESSAGES=de_DE.UTF-8   
 [7] LC_PAPER=de_DE.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C       

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

loaded via a namespace (and not attached):
[1] tools_3.2.3 tcltk_3.2.3

@jimhester
Copy link
Member

@jimhester jimhester commented Nov 23, 2018

The 1.2.0 release inadvertantly broke support for R versions prior to 3.2.0, it will be fixed in the near future, however in the meantime I would suggest you update your version of R to something more current.

@jimhester jimhester closed this in d421144 Nov 23, 2018
@tarmenic
Copy link
Author

@tarmenic tarmenic commented Nov 23, 2018

You already closed it, but FWIW:
The issue is indeed gone after updating to R 3.5.1. (For other readers with my config: See https://cran.r-project.org/bin/linux/ubuntu/ and make sure to update the packages installed before as well w/ checkBuilt=TRUE)

Thanks for your help, @jimhester

@jennybc
Copy link
Member

@jennybc jennybc commented Nov 23, 2018

FWIW I note that @JeffreyRacine is on macOS and R 3.5.1.

@MichaelChirico
Copy link

@MichaelChirico MichaelChirico commented Dec 11, 2018

@jimhester you said

prior to 3.2.0

but I just encountered this on 3.2.3, FWIW

Pushing to update R...

@jimhester
Copy link
Member

@jimhester jimhester commented Dec 11, 2018

@MichaelChirico this should be fixed on readr 1.3.0, which was just uploaded to CRAN today.

@JeffreyRacine
Copy link

@JeffreyRacine JeffreyRacine commented Dec 12, 2018

Sorry, still failing to install on latest R and macOS versions...

sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin18.0.0/x86_64 (64-bit)
Running under: macOS 10.14.2

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8

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

loaded via a namespace (and not attached):
[1] compiler_3.5.1


update.packages(checkBuilt=TRUE,ask=FALSE,lib="/Users/jracine/Library/R",repos="https://cran.wu.ac.at")
trying URL 'https://cran.wu.ac.at/src/contrib/readr_1.3.0.tar.gz'
Content type 'application/x-gzip' length 267009 bytes (260 KB)
==================================================
downloaded 260 KB

  • installing source package ‘readr’ ...
    ** package ‘readr’ successfully unpacked and MD5 sums checked
    ** libs
    *** arch - x86_64
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c Collector.cpp -o Collector.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c CollectorGuess.cpp -o CollectorGuess.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c Iconv.cpp -o Iconv.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c LocaleInfo.cpp -o LocaleInfo.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c RcppExports.cpp -o RcppExports.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c Reader.cpp -o Reader.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c Source.cpp -o Source.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c Tokenizer.cpp -o Tokenizer.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c TokenizerDelim.cpp -o TokenizerDelim.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c TokenizerFwf.cpp -o TokenizerFwf.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c TokenizerWs.cpp -o TokenizerWs.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c connection.cpp -o connection.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c datetime.cpp -o datetime.o
    clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -fPIC -g -O2 -c grisu3.c -o grisu3.o
    clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -fPIC -g -O2 -c init.c -o init.o
    clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -fPIC -g -O2 -c localtime.c -o localtime.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c parse.cpp -o parse.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c read.cpp -o read.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c type_convert.cpp -o type_convert.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c write.cpp -o write.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c write_connection.cpp -o write_connection.o
    clang++ -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -I. -Ircon -fPIC -g -O2 -c write_delim.cpp -o write_delim.o
    clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -I"/Library/Frameworks/R.framework/Resources/include/x86_64" -DNDEBUG -I"/Users/jracine/Library/R/Rcpp/include" -I"/Users/jracine/Library/R/BH/include" -I/opt/local/include -fPIC -g -O2 -c rcon/connection.c -o rcon/connection.o
    mkdir -p ../inst/rcon/x86_64
    clang++ -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L"/Library/Frameworks/R.framework/Resources/lib/x86_64" -L/opt/local/lib -o ../inst/rcon/x86_64/librcon.so rcon/connection.o -Wl,-install_name,@loader_path/../rcon/librcon.so
    clang++ -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib/x86_64 -L/opt/local/lib -o readr.so Collector.o CollectorGuess.o Iconv.o LocaleInfo.o RcppExports.o Reader.o Source.o Tokenizer.o TokenizerDelim.o TokenizerFwf.o TokenizerWs.o connection.o datetime.o grisu3.o init.o localtime.o parse.o read.o type_convert.o write.o write_connection.o write_delim.o -L. -lrcon -L../inst/rcon/x86_64 -Wl,-rpath,$ORIGIN/../../rcon/x86_64 -F/Library/Frameworks/R.framework/.. -framework R -lintl -Wl,-framework -Wl,CoreFoundation
    installing via 'install.libs.R' to /Users/jracine/Library/R/readr
    ** R
    ** inst
    ** byte-compile and prepare package for lazy loading
    ** help
    *** installing help indices
    *** copying figures
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded
    Error: package or namespace load failed for ‘readr’ in dyn.load(file, DLLpath = DLLpath, ...):
    unable to load shared object '/Users/jracine/Library/R/readr/libs/x86_64/readr.so':
    dlopen(/Users/jracine/Library/R/readr/libs/x86_64/readr.so, 6): Library not loaded: @loader_path/../rcon/librcon.so
    Referenced from: /Users/jracine/Library/R/readr/libs/x86_64/readr.so
    Reason: image not found
    Error: loading failed
    Execution halted
    ERROR: loading failed
  • removing ‘/Users/jracine/Library/R/readr’
  • restoring previous ‘/Users/jracine/Library/R/readr’

The downloaded source packages are in
‘/private/var/folders/dy/sbjj5q2s0qng776bmmqpcgvc0000gn/T/RtmphRWWEi/downloaded_packages’
Warning message:
In install.packages(update[instlib == l, "Package"], l, contriburl = contriburl, :
installation of package ‘readr’ had non-zero exit status

@jimhester
Copy link
Member

@jimhester jimhester commented Dec 12, 2018

@JeffreyRacine why are you specifying -arch x86_64?

I would suggest you use the CRAN distributions of R, anything else is not likely to be tested by package authors.

@JeffreyRacine
Copy link

@JeffreyRacine JeffreyRacine commented Dec 12, 2018

Greetings Jim,

Thanks for the suggestion, however, I have used these settings for perhaps a decade or more... I don't want the extra 32 bit stuff hanging around, and the x86_64 architecture compile flags were suggested by members of the R core team for what that is worth... readr is the only package currently failing to compile, and I have hundreds of packages installed...

Jeff

jimhester added a commit that referenced this issue Dec 13, 2018
@jimhester
Copy link
Member

@jimhester jimhester commented Dec 13, 2018

The CRAN macOS binaries only install 64 bit versions of R, so there is no extra 32 bit stuff.

I would recommend you use them, particularly so you can use the CRAN package binaries and avoid needing to debug many package compilation issues (like this one) yourself.

Nonetheless your issue should be fixed by 75d9ff1

@JeffreyRacine
Copy link

@JeffreyRacine JeffreyRacine commented Dec 13, 2018

Thanks for the kind advice... I installed the dev version and it compiles, thanks!

@lock
Copy link

@lock lock bot commented Jun 11, 2019

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock
Copy link

@lock lock bot commented Dec 8, 2019

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Dec 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants