nx10 / httpgd

Asynchronous http server graphics device for R.
https://nx10.github.io/httpgd
GNU General Public License v2.0
389 stars 19 forks source link

Build error on macOS #53

Closed renkun-ken closed 3 years ago

renkun-ken commented 3 years ago

I'm not able to build the latest master on macOS 11.2. Following is the error message:

✔  checking for file ‘/Users/ken/Workspaces/github/httpgd/DESCRIPTION’ ...
─  preparing ‘httpgd’: (665ms)
✔  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
   Removed empty directory ‘httpgd/inst/www/typings’
─  building ‘httpgd_1.0.1.tar.gz’

Running /Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL \
  /var/folders/8n/fdyp8ztd42gd2s61p6nzqrgh0000gn/T//Rtmp8lsXTS/httpgd_1.0.1.tar.gz \
  --install-tests 
* installing to library ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library’
* installing *source* package ‘httpgd’ ...
** using staged installation
** libs
clang++ -mmacosx-version-min=10.13 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -Ilib -DBOOST_NO_AUTO_PTR -DFMT_HEADER_ONLY -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/cpp11/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/later/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/systemfonts/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c AsyncLater.cpp -o AsyncLater.o
clang++ -mmacosx-version-min=10.13 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -Ilib -DBOOST_NO_AUTO_PTR -DFMT_HEADER_ONLY -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/cpp11/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/later/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/systemfonts/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c DrawData.cpp -o DrawData.o
In file included from DrawData.cpp:11:
./lib/svglite_utils.h:169:13: error: use of undeclared identifier 'get_font_family'
        if (get_font_family(font.file, font.index, family_name, MAX_FONT_FAMILY_LEN))
            ^
1 error generated.
make: *** [DrawData.o] Error 1
ERROR: compilation failed for package ‘httpgd’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/httpgd’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/httpgd’

Error: System command 'R' failed, exit status: 1, stdout & stderr were printed

 Stack trace:

 1. devtools::install(upgrade = "never")
 2. pkgbuild::with_build_tools(required = FALSE, callr::rcmd("INSTALL",  ...
 3. callr::rcmd("INSTALL", c(install_path, opts), echo = !quiet,  ...
 4. callr:::run_r(options)
 5. base:::with(options, with_envvar(env, do.call(processx::run,  ...
 6. base:::with.default(options, with_envvar(env, do.call(processx::run,  ...
 7. base:::eval(substitute(expr), data, enclos = parent.frame())
 8. base:::eval(substitute(expr), data, enclos = parent.frame())
 9. callr:::with_envvar(env, do.call(processx::run, c(list(bin, args = real_cmd ...
 10. base:::force(code)
 11. base:::do.call(processx::run, c(list(bin, args = real_cmdargs,  ...
 12. (function (command = NULL, args = character(), error_on_status = TRUE,  ...
 13. throw(new_process_error(res, call = sys.call(), echo = echo,  ...

 x System command 'R' failed, exit status: 1, stdout & stderr were printed 

Backtrace:
1: stop(cond)
2: throw(new_process_error(res, call = sys.call(), echo = echo, 
3: (function (command = NULL, args = character(), error_on_status = TRUE, 
4: do.call(processx::run, c(list(bin, args = real_cmdargs, stdout_line_callback = real_callback(stdout), 
5: force(code)
6: with_envvar(env, do.call(processx::run, c(list(bin, args = real_cmdargs, 
7: eval(substitute(expr), data, enclos = parent.frame())
8: eval(substitute(expr), data, enclos = parent.frame())
9: with.default(options, with_envvar(env, do.call(processx::run, 
10: with(options, with_envvar(env, do.call(processx::run, c(list(bin, 
11: run_r(options)
12: callr::rcmd("INSTALL", c(install_path, opts), echo = !quiet, 
13: pkgbuild::with_build_tools(required = FALSE, callr::rcmd("INSTALL", 
14: devtools::install(upgrade = "never")
Exiting on error
nx10 commented 3 years ago

Do you have the new version (1.0.0) of of systemfonts installed?

renkun-ken commented 3 years ago

Upgrading systemfonts to 1.0.0 solves the problem. Thanks!