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

BUG: invalid permissions to run system_fonts() #110

Closed
jamesjiadazhan opened this issue Jan 20, 2024 · 3 comments
Closed

BUG: invalid permissions to run system_fonts() #110

jamesjiadazhan opened this issue Jan 20, 2024 · 3 comments

Comments

@jamesjiadazhan
Copy link

r$> devtools::install_github('r-lib/systemfonts')
Downloading GitHub repo r-lib/systemfonts@HEAD
── R CMD build ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✔  checking for file ‘/private/var/folders/r7/g81tj9ds70bdmgdbnp49ddn80000gn/T/RtmpnCujBE/remotes42da6d209055/r-lib-systemfonts-757a0c1/DESCRIPTION’ ...
─  preparing ‘systemfonts’:
✔  checking DESCRIPTION meta-information ...
─  cleaning src
─  running ‘cleanup’
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  looking to see if a ‘data/datalist’ file should be added
─  building ‘systemfonts_1.0.5.9000.tar.gz’
   
* installing *source* package ‘systemfonts’ ...
** using staged installation
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16
Using PKG_LIBS=-L/opt/homebrew/opt/freetype/lib -L/opt/homebrew/opt/libpng/lib -lfreetype -lbz2 -lpng16 -lz
** libs
using C++ compiler: ‘Apple clang version 14.0.3 (clang-1403.0.22.14.1)’
using SDK: ‘MacOSX13.3.sdk’
rm -f systemfonts.so caches.o cpp11.o dev_metrics.o font_matching.o font_registry.o ft_cache.o string_shape.o font_metrics.o font_fallback.o string_metrics.o emoji.o cache_store.o init.o mac/FontManagerMac.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16 -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/cpp11/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c caches.cpp -o caches.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16 -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/cpp11/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c cpp11.cpp -o cpp11.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16 -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/cpp11/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c dev_metrics.cpp -o dev_metrics.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16 -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/cpp11/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c font_matching.cpp -o font_matching.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16 -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/cpp11/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c font_registry.cpp -o font_registry.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16 -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/cpp11/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c ft_cache.cpp -o ft_cache.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16 -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/cpp11/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c string_shape.cpp -o string_shape.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16 -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/cpp11/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c font_metrics.cpp -o font_metrics.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16 -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/cpp11/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c font_fallback.cpp -o font_fallback.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16 -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/cpp11/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c string_metrics.cpp -o string_metrics.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16 -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/cpp11/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c emoji.cpp -o emoji.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16 -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/cpp11/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c cache_store.cpp -o cache_store.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16 -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/cpp11/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c init.cpp -o init.o
clang++ -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16 -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/cpp11/include' -I/opt/R/arm64/include   -fobjc-arc -fPIC   -c mac/FontManagerMac.mm -o mac/FontManagerMac.o
clang++ -arch arm64 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o systemfonts.so caches.o cpp11.o dev_metrics.o font_matching.o font_registry.o ft_cache.o string_shape.o font_metrics.o font_fallback.o string_metrics.o emoji.o cache_store.o init.o mac/FontManagerMac.o -L/opt/homebrew/opt/freetype/lib -L/opt/homebrew/opt/libpng/lib -lfreetype -lbz2 -lpng16 -lz -framework CoreText -framework Foundation -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/00LOCK-systemfonts/00new/systemfonts/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (systemfonts)

r$> library(systemfonts)
    system_fonts()

 *** caught segfault ***
address 0x0, cause 'invalid permissions'

Traceback:
 1: system_fonts_c()
 2: system_fonts()

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace

r$> sessionInfo()
R version 4.3.2 (2023-10-31)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Ventura 13.3.1

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0

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

time zone: America/New_York
tzcode source: internal

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

other attached packages:
[1] systemfonts_1.0.5.9000

loaded via a namespace (and not attached):
[1] compiler_4.3.2 cli_3.6.2 jsonlite_1.8.8 rlang_1.1.3

@jamesjiadazhan
Copy link
Author

I am using icloud on Mac studio:

Model Name: Mac Studio
Chip: Apple M1 Ultra
Total Number of Cores: 20 (16 performance and 4 efficiency)
Memory: 64 GB

@thomasp85
Copy link
Member

What do you mean with using iCloud? Are you compiling it in the cloud somehow?

I cannot reproduce this, nor have any other reported such a grave issue, so something weird with your system must exist (I believe). Do you get the same issue with the binary on CRAN?

@jamesjiadazhan
Copy link
Author

Sorry. This was resolved after my mac system update. I guessed it was a bug from Apple at that moment.

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