Skip to content

Fix build issues on MSYS2

Nirbheek Chauhan requested to merge nirbheek/fontconfig:msys2-build into main
meson: Always use posix path, even on Windows

Fix build error when using MSYS2 and building inside C:\Users

FAILED: subprojects/fontconfig/test/test_bz89617.exe.p/test-bz89617.c.obj
"cc" [...] "-DSRCDIR=\"C:\\Users\\Administrator\\runner\\builds\\nirbheek\\gstreamer\\subprojects\\fontconfig\\test\"" [...] ../subprojects/fontconfig/test/test-bz89617.c
../subprojects/fontconfig/test/test-bz89617.c: In function 'main':
../subprojects/fontconfig/test/test-bz89617.c:33:76: error: incomplete universal character name \U
   33 |     if (!FcConfigAppFontAddFile (config, (const FcChar8 *)SRCDIR "/4x6.pcf") ||
      |                                                                            ^
../subprojects/fontconfig/test/test-bz89617.c:33:76: warning: unknown escape sequence: '\A'
../subprojects/fontconfig/test/test-bz89617.c:33:76: warning: unknown escape sequence: '\g'
../subprojects/fontconfig/test/test-bz89617.c:33:76: warning: unknown escape sequence: '\s'
meson: Always write utf-8 files with LF newlines

Otherwise, MSYS2 gperf chokes on the CRLF newlines translated by
`open()`, even though we explicitly write out `\n`

[1/48] Generating src/fcobjshash.h with a custom command
FAILED: src/fcobjshash.h
"C:\msys64\usr\bin\gperf.EXE" "--pic" "-m" "100" "src/fcobjshash.gperf" "--output-file" "src/fcobjshash.h"
src/fcobjshash.gperf:17: warning: junk after %% is ignored
src/fcobjshash.gperf:2: warning: junk after %} is ignored
src/fcobjshash.gperf:3: junk after declaration
ninja: build stopped: subcommand failed.
Edited by Nirbheek Chauhan

Merge request reports