hyperrogue icon indicating copy to clipboard operation
hyperrogue copied to clipboard

make fails if fontconfig is enabled

Open aur-r opened this issue 1 year ago • 0 comments

Enabling FONTCONFIG generates this error:

g++ -O2 -std=c++17 -DLINUX -DFHS -DCAP_SDL2=1 -I/usr/include/SDL2 -fPIC -W -Wall -Wextra -pedantic -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-maybe-uninitialized -Wno-invalid-offsetof -DFONTCONFIG -DCAP_GLEW=1 -DCAP_PNG=1 -DCAP_ROGUEVIZ=1 -DCAP_TEXTURE=1 -O2 -g -pipe -Wformat -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -m64 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection=full -c hyper.cpp -o hyper.o In file included from hyper.cpp:92: basegraph.cpp: In function 'TTF_Font* hr::findfont(int)': basegraph.cpp:273:30: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*' 273 | return TTF_OpenFont(cfont->filename, siz); | ~~~~~~~^~~~~~~~ | | | std::string {aka std::__cxx11::basic_string<char>} In file included from sysconfig.h:396, from hyper.h:19, from hyper.cpp:23: /usr/include/SDL2/SDL_ttf.h:205:61: note: initializing argument 1 of 'TTF_Font* TTF_OpenFont(const char*, int)' 205 | extern DECLSPEC TTF_Font * SDLCALL TTF_OpenFont(const char *file, int ptsize); | ~~~~~~~~~~~~^~~~ basegraph.cpp: In function 'void hr::loadfont(int)': basegraph.cpp:285:12: error: 'find_font_using_fontconfig' was not declared in this scope 285 | cf = find_font_using_fontconfig(siz); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ make: *** [Makefile:159: hyper.o] Error 1

6bbd57ec seems to introduce this behavior in my case. Using gcc14 and sdl2-ttf 2.22.0.

aur-r avatar Oct 13 '24 22:10 aur-r