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

Install error: face_feature.cpp:46:23: error: ‘hb_ft_face_create_referenced’ was not declared in this scope #46

Closed
ShuqingL opened this issue Aug 9, 2024 · 2 comments

Comments

@ShuqingL
Copy link

ShuqingL commented Aug 9, 2024

In R-3.6.1 run install.packages("textshaping").
I got the following error message.

trying URL 'https://mirrors.sustech.edu.cn/CRAN/src/contrib/textshaping_0.4.0.tar.gz'
Content type 'application/octet-stream' length 37960 bytes (37 KB)
==================================================
downloaded 37 KB

* installing *source* package ‘textshaping’ ...
** package ‘textshaping’ successfully unpacked and MD5 sums checked
** using staged installation
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/fribidi
Using PKG_LIBS=-lharfbuzz -lfreetype -lfribidi
** libs
rm -f textshaping.so cpp11.o face_feature.o hb_shaper.o init.o string_bidi.o string_metrics.o string_shape.o
g++ -std=gnu++11 -I"/share/Software/R-3.6.1/lib/R/include" -DNDEBUG -DNDEBUG -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/fribidi   -I"/share/Software/R-3.6.1/library/cpp11/include" -I"/share/Software/R-3.6.1/library/systemfonts/include" -I/usr/local/include  -fpic  -g -O2  -c cpp11.cpp -o cpp11.o
g++ -std=gnu++11 -I"/share/Software/R-3.6.1/lib/R/include" -DNDEBUG -DNDEBUG -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/fribidi   -I"/share/Software/R-3.6.1/library/cpp11/include" -I"/share/Software/R-3.6.1/library/systemfonts/include" -I/usr/local/include  -fpic  -g -O2  -c face_feature.cpp -o face_feature.o
face_feature.cpp: In function ‘cpp11::writable::list get_face_features_c(cpp11::strings, cpp11::integers)’:
face_feature.cpp:46:23: error: ‘hb_ft_face_create_referenced’ was not declared in this scope
     hb_face_t *face = hb_ft_face_create_referenced(ft_face);
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
face_feature.cpp:46:23: note: suggested alternative: ‘hb_ft_face_create_cached’
     hb_face_t *face = hb_ft_face_create_referenced(ft_face);
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                       hb_ft_face_create_cached
make: *** [face_feature.o] Error 1
ERROR: compilation failed for package ‘textshaping’
* removing ‘/share/Software/R-3.6.1/library/textshaping’

The downloaded source packages are in
        ‘/tmp/RtmprHQtB7/downloaded_packages’
Warning message:
In install.packages("textshaping") :
  installation of package ‘textshaping’ had non-zero exit status

I try to re-install the system library lharfbuzz, lfreetype and lfribidi, the problem still exists.
At present, I do not know where this face_feature.cpp is located or how to solve this problem.

@thomasp85
Copy link
Member

My best guess is that you have compiled Harfbuzz without freetype support?

@thomasp85
Copy link
Member

Feel free to reopen if it persist

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