SymbolixAU / colourvalues

R library for assigning colours to values
https://symbolixau.github.io/colourvalues/
46 stars 6 forks source link

dlopen(/usr/local/lib/R/3.5/site-library/colourvalues/libs/colourvalues.so, 6): Symbol not found: __ZNK5boost9gregorian10greg_month14as_long_stringEv #36

Closed robsalasco closed 5 years ago

robsalasco commented 6 years ago

Hi @SymbolixAU !

I'm having problems installing the lib. Do you have any idea of what's going on?

Thank you!

> devtools::install_github("SymbolixAU/colourvalues")
Downloading GitHub repo SymbolixAU/colourvalues@master
   checking for file ‘/private/var/folders/97/zcd8xrfd5bx569t_md9b37yr0000gn/T/R✔  checking for file ‘/private/var/folders/97/zcd8xrfd5bx569t_md9b37yr0000gn/T/RtmpZ7pVKX/remotesc38d253c0734/SymbolixAU-colourvalues-66d27d8/DESCRIPTION’ (338ms)
─  preparing ‘colourvalues’:
✔  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 ‘colourvalues_0.2.0.tar.gz’

Installing package into ‘/usr/local/lib/R/3.5/site-library’
(as ‘lib’ is unspecified)
* installing *source* package ‘colourvalues’ ...
** libs
clang++ -std=gnu++11 -I"/usr/local/Cellar/r/3.5.1/lib/R/include" -DNDEBUG -I../inst/include -I"/usr/local/lib/R/3.5/site-library/Rcpp/include" -I"/usr/local/lib/R/3.5/site-library/BH/include" -I/usr/local/opt/openblas/include -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/usr/local/opt/gsl/include/ -I/usr/local/opt/readline/include -I/usr/local/include   -fPIC  -I/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/include/darwin -c ColourValues_HEX.cpp -o ColourValues_HEX.o
clang++ -std=gnu++11 -I"/usr/local/Cellar/r/3.5.1/lib/R/include" -DNDEBUG -I../inst/include -I"/usr/local/lib/R/3.5/site-library/Rcpp/include" -I"/usr/local/lib/R/3.5/site-library/BH/include" -I/usr/local/opt/openblas/include -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/usr/local/opt/gsl/include/ -I/usr/local/opt/readline/include -I/usr/local/include   -fPIC  -I/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/include/darwin -c ColourValues_RGB.cpp -o ColourValues_RGB.o
clang++ -std=gnu++11 -I"/usr/local/Cellar/r/3.5.1/lib/R/include" -DNDEBUG -I../inst/include -I"/usr/local/lib/R/3.5/site-library/Rcpp/include" -I"/usr/local/lib/R/3.5/site-library/BH/include" -I/usr/local/opt/openblas/include -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/usr/local/opt/gsl/include/ -I/usr/local/opt/readline/include -I/usr/local/include   -fPIC  -I/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/include/darwin -c ConvertColours.cpp -o ConvertColours.o
clang++ -std=gnu++11 -I"/usr/local/Cellar/r/3.5.1/lib/R/include" -DNDEBUG -I../inst/include -I"/usr/local/lib/R/3.5/site-library/Rcpp/include" -I"/usr/local/lib/R/3.5/site-library/BH/include" -I/usr/local/opt/openblas/include -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/usr/local/opt/gsl/include/ -I/usr/local/opt/readline/include -I/usr/local/include   -fPIC  -I/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/include/darwin -c RcppExports.cpp -o RcppExports.o
clang++ -std=gnu++11 -I"/usr/local/Cellar/r/3.5.1/lib/R/include" -DNDEBUG -I../inst/include -I"/usr/local/lib/R/3.5/site-library/Rcpp/include" -I"/usr/local/lib/R/3.5/site-library/BH/include" -I/usr/local/opt/openblas/include -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -I/usr/local/opt/gsl/include/ -I/usr/local/opt/readline/include -I/usr/local/include   -fPIC  -I/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/include/darwin -c palettes.cpp -o palettes.o
clang++ -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/opt/openblas/lib -L/usr/local/opt/gsl/lib/ -L/usr/local/opt/gettext/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib, -L/usr/local/opt/readline/lib -L/usr/local/lib -L/usr/local/Cellar/r/3.5.1/lib/R/lib -L/usr/local/opt/openblas/lib -L/usr/local/opt/gsl/lib/ -L/usr/local/opt/gettext/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib, -L/usr/local/opt/readline/lib -L/usr/local/lib -o colourvalues.so ColourValues_HEX.o ColourValues_RGB.o ConvertColours.o RcppExports.o palettes.o -L/usr/local/opt/openblas/lib -L/opt/X11/lib -lcairo -L/usr/local/opt/gsl/lib/ -L/usr/local/opt/readline/lib -L/usr/local/lib -lgsl -lgslcblas -L/usr/local/Cellar/r/3.5.1/lib/R/lib -lR -lintl -Wl,-framework -Wl,CoreFoundation
installing to /usr/local/lib/R/3.5/site-library/colourvalues/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** testing if installed package can be loaded
Error: package or namespace load failed for ‘colourvalues’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/usr/local/lib/R/3.5/site-library/colourvalues/libs/colourvalues.so':
  dlopen(/usr/local/lib/R/3.5/site-library/colourvalues/libs/colourvalues.so, 6): Symbol not found: __ZNK5boost9gregorian10greg_month14as_long_stringEv
  Referenced from: /usr/local/lib/R/3.5/site-library/colourvalues/libs/colourvalues.so
  Expected in: flat namespace
 in /usr/local/lib/R/3.5/site-library/colourvalues/libs/colourvalues.so
Error: loading failed
Ejecución interrumpida
ERROR: loading failed
* removing ‘/usr/local/lib/R/3.5/site-library/colourvalues’
* restoring previous ‘/usr/local/lib/R/3.5/site-library/colourvalues’

I'm running macOS Sierra with boost 1.68.0 installed using brew

robsalasco commented 6 years ago

added -lboost_date_time-mt to my Makevars file and now works!!

SymbolixAU commented 6 years ago

Hi @robsalasco - Do you have a custom install of R, or did you download it the usual way through CRAN ?

robsalasco commented 6 years ago

yep I have a custom R install using brew (with openblas) nothing more. I tried building colourvalues from CRAN and github.

SymbolixAU commented 6 years ago

Ok thanks for reporting. I'll leave this open, but as you have a solution I'll put it low on my list of priorities.

MichaelChirico commented 5 years ago

Just encountered this as well building on our JupyterHub from CRAN:

sessionInfo():

``` R version 3.4.1 (2017-06-30) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 16.04.5 LTS Matrix products: default BLAS: /opt/conda/lib/R/lib/libRblas.so LAPACK: /opt/conda/lib/R/lib/libRlapack.so 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 loaded via a namespace (and not attached): [1] compiler_3.4.1 tools_3.4.1 ```

@robsalasco which Makevars file did you edit btw?

SymbolixAU commented 5 years ago

If you build this package from source I think (but haven't tested) you can add

PKG_LIBS= -L/usr/lib -lboost_date_time

To the /src/Makevars file.


Here's a somewhat related question I asked on stackoverflow

MichaelChirico commented 5 years ago

FWIW I think this was coming down to some botched crossed wires between a conda R installation and the standard GNU. Moral of the story is to never, ever go anywhere near conda R :sweat_smile:

SymbolixAU commented 5 years ago

I stay as far away from Anaconda as I can