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

Build failing in MacOS #93

Closed
dmurdoch opened this issue Jan 17, 2018 · 3 comments
Closed

Build failing in MacOS #93

dmurdoch opened this issue Jan 17, 2018 · 3 comments

Comments

@dmurdoch
Copy link
Contributor

dmurdoch commented Jan 17, 2018

I'm trying to build htmltools on MacOS, but the build fails with these messages:

** testing if installed package can be loaded
Error: package or namespace load failed for ‘htmltools’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Library/Frameworks/R.framework/Versions/3.4/Resources/library/htmltools/libs/htmltools.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/htmltools/libs/htmltools.so, 6): Symbol not found: _htmltools_template_dfa
  Referenced from: /Library/Frameworks/R.framework/Versions/3.4/Resources/library/htmltools/libs/htmltools.so
  Expected in: flat namespace in /Library/Frameworks/R.framework/Versions/3.4/Resources/library/htmltools/libs/htmltools.so
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/htmltools’

The missing symbol is one produced automatically by Rcpp, so I've tried updating Rcpp, deleting the automatically generated files and regenerating them, etc., all with no improvement. Is this a problem in htmltools, or on my system (which I've recently updated)?

@wch
Copy link
Collaborator

wch commented Jan 17, 2018

What command are you using to build it? For example, this works for me:

> install.packages('htmltools', type='source')
Installing package into ‘/Users/winston/R/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/htmltools_0.3.6.tar.gz'
Content type 'application/x-gzip' length 45408 bytes (44 KB)
==================================================
downloaded 44 KB

* installing *source* package ‘htmltools’ ...
** package ‘htmltools’ successfully unpacked and MD5 sums checked
** libs
clang++  -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I"/Users/winston/R/3.4/Rcpp/include" -I/usr/local/include   -fPIC  -Wall -g -O2  -g -O0 -Wall -c RcppExports.cpp -o RcppExports.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I"/Users/winston/R/3.4/Rcpp/include" -I/usr/local/include   -fPIC  -Wall -g -O2  -g -O0 -Wall -c init.c -o init.o
clang++  -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I"/Users/winston/R/3.4/Rcpp/include" -I/usr/local/include   -fPIC  -Wall -g -O2  -g -O0 -Wall -c template.cpp -o template.o
clang++ -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o htmltools.so RcppExports.o init.o template.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Users/winston/R/3.4/htmltools/libs
** R
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (htmltools)

The downloaded source packages are in
	‘/private/var/folders/vd/0_g4hj6d7kq_fw5gd_r0ml5w0000gn/T/Rtmpogg4mz/downloaded_packages’
> sessioninfo::session_info()
─ Session info ───────────────────────────────────────────────────────────────
 setting  value                       
 version  R version 3.4.3 (2017-11-30)
 os       macOS High Sierra 10.13.2   
 system   x86_64, darwin15.6.0        
 ui       X11                         
 language (EN)                        
 collate  en_US.UTF-8                 
 tz       America/Chicago             
 date     2018-01-17                  

─ Packages ───────────────────────────────────────────────────────────────────
 package     * version date       source        
 clisymbols    1.2.0   2017-05-21 CRAN (R 3.4.0)
 sessioninfo   1.0.0   2017-06-21 CRAN (R 3.4.1)
 withr         2.1.1   2017-12-19 CRAN (R 3.4.3)

@wch wch closed this as completed in cf3c67d Jan 17, 2018
@wch
Copy link
Collaborator

wch commented Jan 17, 2018

I'm guessing you're using devtools::install() or devtools::install_github(). I've pushed a fix.

@dmurdoch
Copy link
Contributor Author

I was using Install and Restart in RStudio, which uses devtools::install(). Your change fixes it. Thanks!

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