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

[cairo] Build error on mingw-w64 #43178

Open
Gnefeij opened this issue Jan 9, 2025 · 2 comments
Open

[cairo] Build error on mingw-w64 #43178

Gnefeij opened this issue Jan 9, 2025 · 2 comments
Labels
category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team.

Comments

@Gnefeij
Copy link

Gnefeij commented Jan 9, 2025

FAILED: src/libcairo-2.dll.p/win32_cairo-dwrite-font.cpp.obj
"C:/Tools/MSYS2/mingw32/bin/i686-w64-mingw32-g++.exe" "-O3" "-DNDEBUG" "-Isrc\libcairo-2.dll.p" "-Isrc" "-I..\src\1.18.2-b56ba9649b.clean\src" "-I." "-I..\src\1.18.2-b56ba9649b.clean" "-ID:/Development/Project/JLibBuild/installed/dynamic-windows-x86/include" "-ID:/Development/Project/JLibBuild/installed/dynamic-windows-x86/include/libpng16" "-ID:/Development/Project/JLibBuild/installed/dynamic-windows-x86/include/pixman-1" "-fvisibility=hidden" "-fdiagnostics-color=always" "-D_GLIBCXX_ASSERTIONS=1" "-D_FILE_OFFSET_BITS=64" "-Wall" "-Winvalid-pch" "-Wextra" "-DWIN32_LEAN_AND_MEAN" "-DNOMINMAX" "-DWINVER=_WIN32_WINNT_WIN10" "-D_WIN32_WINNT=_WIN32_WINNT_WIN10" "-DNTDDI_VERSION=NTDDI_WIN10_RS3" "-O3" "-DNDEBUG" "-Wno-attributes" "-Wno-unused-but-set-variable" "-Wno-missing-field-initializers" "-Wno-unused-parameter" "-Wno-long-long" "-D_REENTRANT" "-DCAIRO_COMPILATION" -MD -MQ src/libcairo-2.dll.p/win32_cairo-dwrite-font.cpp.obj -MF "src\libcairo-2.dll.p\win32_cairo-dwrite-font.cpp.obj.d" -o src/libcairo-2.dll.p/win32_cairo-dwrite-font.cpp.obj "-c" ../src/1.18.2-b56ba9649b.clean/src/win32/cairo-dwrite-font.cpp
In file included from C:/Tools/MSYS2/mingw32/include/minwindef.h:163,
from C:/Tools/MSYS2/mingw32/include/windef.h:9,
from C:/Tools/MSYS2/mingw32/include/windows.h:69,
from ..\src\1.18.2-b56ba9649b.clean\src/cairo-atomic-private.h:334,
from ..\src\1.18.2-b56ba9649b.clean\src/cairo-reference-count-private.h:40,
from ..\src\1.18.2-b56ba9649b.clean\src/cairo-types-private.h:45,
from ..\src\1.18.2-b56ba9649b.clean\src/cairo-error-private.h:43,
from ..\src\1.18.2-b56ba9649b.clean\src/cairoint.h:69,
from ../src/1.18.2-b56ba9649b.clean/src/win32/cairo-dwrite-font.cpp:37:
../src/1.18.2-b56ba9649b.clean/src/win32/dw-extra.h:26:1: error: redefinition of 'constexpr DWRITE_GLYPH_IMAGE_FORMATS operator~(DWRITE_GLYPH_IMAGE_FORMATS)'
26 | DEFINE_ENUM_FLAG_OPERATORS(DWRITE_GLYPH_IMAGE_FORMATS);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:/Tools/MSYS2/mingw32/include/dcommon.h:59:1: note: 'constexpr DWRITE_GLYPH_IMAGE_FORMATS operator~(DWRITE_GLYPH_IMAGE_FORMATS)' previously defined here
59 | DEFINE_ENUM_FLAG_OPERATORS(DWRITE_GLYPH_IMAGE_FORMATS)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
../src/1.18.2-b56ba9649b.clean/src/win32/dw-extra.h:26:1: error: redefinition of 'constexpr DWRITE_GLYPH_IMAGE_FORMATS operator|(DWRITE_GLYPH_IMAGE_FORMATS, DWRITE_GLYPH_IMAGE_FORMATS)'
26 | DEFINE_ENUM_FLAG_OPERATORS(DWRITE_GLYPH_IMAGE_FORMATS);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:/Tools/MSYS2/mingw32/include/dcommon.h:59:1: note: 'constexpr DWRITE_GLYPH_IMAGE_FORMATS operator|(DWRITE_GLYPH_IMAGE_FORMATS, DWRITE_GLYPH_IMAGE_FORMATS)' previously defined here
59 | DEFINE_ENUM_FLAG_OPERATORS(DWRITE_GLYPH_IMAGE_FORMATS)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
../src/1.18.2-b56ba9649b.clean/src/win32/dw-extra.h:26:1: error: redefinition of 'constexpr DWRITE_GLYPH_IMAGE_FORMATS operator&(DWRITE_GLYPH_IMAGE_FORMATS, DWRITE_GLYPH_IMAGE_FORMATS)'
26 | DEFINE_ENUM_FLAG_OPERATORS(DWRITE_GLYPH_IMAGE_FORMATS);

@Gnefeij
Copy link
Author

Gnefeij commented Jan 9, 2025

It seems that need to update the code to fix this issue
https://lists.cairographics.org/archives/cairo-commit/2024-October/013676.html

@jimwang118 jimwang118 added the category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team. label Jan 9, 2025
@Gnefeij
Copy link
Author

Gnefeij commented Jan 9, 2025

dw-extra.patch

Currently, adding
list (APPEND EXTRA-PATCHES dw-extra. patch)
in ports/cairo/porfile.cmake has passed the compilation process

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team.
Projects
None yet
Development

No branches or pull requests

2 participants