Skip to content

error: 'FT_Done_MM_Var' was not declared in this scope during CentOS7 install #155

@SSSJe

Description

@SSSJe

When attempting to install the systemfonts package via pak::pak('r-lib/systemfonts'), I encountered compilation errors related to Freetype functions/constants. Below are the detailed error logs, along with my current Freetype version info and relevant context:

1. Compilation Error Logs

ft_cache.cpp: In function 'std::string enc_to_string(FT_Encoding_)':
ft_cache.cpp:221:10: error: 'FT_ENCODING_PRC' was not declared in this scope; did you mean 'FT_ENCODING_SJIS'?
221 | case FT_ENCODING_PRC: return "prc";
| ^~~~~~~~~~~~~~~
| FT_ENCODING_SJIS
ft_cache.cpp: In member function 'FontFaceInfo FreetypeCache::font_info()':
ft_cache.cpp:257:24: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'FT_Int' {aka 'int'} [-Wsign-compare]
257 | for (size_t i = 0; i < face->num_charmaps; ++i) {
| ~~^~~~~~~~~~~~~~~~~~~~
ft_cache.cpp:292:7: error: 'FT_Done_MM_Var' was not declared in this scope; did you mean 'FT_Get_MM_Var'?
292 | FT_Done_MM_Var(library, variations);
| ^~~~~~~~~~~~~~
| FT_Get_MM_Var
ft_cache.cpp: In member function 'std::vector FreetypeCache::cur_axes()':
ft_cache.cpp:456:3: error: 'FT_Done_MM_Var' was not declared in this scope; did you mean 'FT_Get_MM_Var'?
456 | FT_Done_MM_Var(library, variations);
| ^~~~~~~~~~~~~~
| FT_Get_MM_Var
ft_cache.cpp: In member function 'void FreetypeCache::has_axes(bool&, bool&, bool&)':
ft_cache.cpp:476:5: error: 'FT_Done_MM_Var' was not declared in this scope; did you mean 'FT_Get_MM_Var'?
476 | FT_Done_MM_Var(library, variations);
| ^~~~~~~~~~~~~~
| FT_Get_MM_Var
ft_cache.cpp: In member function 'int FreetypeCache::n_axes()':
ft_cache.cpp:489:5: error: 'FT_Done_MM_Var' was not declared in this scope; did you mean 'FT_Get_MM_Var'?
489 | FT_Done_MM_Var(library, variations);
| ^~~~~~~~~~~~~~
| FT_Get_MM_Var
ft_cache.cpp: In member function 'bool FreetypeCache::is_variable()':
ft_cache.cpp:500:5: error: 'FT_Done_MM_Var' was not declared in this scope; did you mean 'FT_Get_MM_Var'?
500 | FT_Done_MM_Var(library, variations);
| ^~~~~~~~~~~~~~
| FT_Get_MM_Var
ft_cache.cpp: In member function 'void FreetypeCache::set_axes(const int*, const int*, size_t)':
ft_cache.cpp:545:3: error: 'FT_Done_MM_Var' was not declared in this scope; did you mean 'FT_Get_MM_Var'?
545 | FT_Done_MM_Var(library, variations);
| ^~~~~~~~~~~~~~
| FT_Get_MM_Var
make: *** [/data1/workspace/wind/miniconda3/envs/seurat4/lib/R/etc/Makeconf:200: ft_cache.o] Error 1
ERROR: compilation failed for package ‘systemfonts’

Current Freetype Version in My Environment

Image Image

Some suggestions mentioned updating Freetype, but I want to confirm:

  • Whether updating Freetype is the definitive fix for these errors?

  • If so, what minimum Freetype version is required?

  • Are there alternative workarounds (e.g., compiling flags, package versions) if updating Freetype is not feasible in my environment?

This issue matches #149 exactly, but none of the suggested fixes (e.g., Freetype update) have worked—I still get the FT_ENCODING_PRC/FT_Done_MM_Var undefined errors. Any other workarounds or compatible versions to try?
Looking for reply. : )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions