-
Notifications
You must be signed in to change notification settings - Fork 64
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
Can't build with cmake? #17
Comments
It seems your MinGW install is missing headers required by Skia. I would guess you're using the MinGW.org variant, which unfortunately is missing quite a lot of the more modern Windows API. Please try with a MinGW-w64 toolchain, e.g. the one you can install through MSYS2. |
Hello! Ruben, I have installed the MinGW-w64 toolchain using this Msys2 but the issue exists. |
I cannot reproduce your build issue with my local MSYS2 install. I don't think you're using the MSYS2 MinGW-w64 compilers. The output you show points to Please ensure you're pointing CMake to the correct compiler when generating (automatic if you're running cmake from the MSYS2 MinGW-w64 shell), and that your MSYS2 is than up to date. The current GCC version through MSYS2 is 10.2.0, not 8.2.0. |
I reinstall and fixed the environment path for mingw64 but now I get this error. D:\skui-build>cmake ../skui -G Ninja D:\skui-build>cmake --build . D:\skui-build> |
Yes I get that too. It seems the Skia version that is currently used uses functionality not available in the current MinGW-w64 headers. I'll see if I can correct that. In the meantime, you'll need to use a different platform/toolchain. The community edition of VS2019 will also work, or anything on Linux. Skia comes from Chrome (and is used in e.g. Firefox and Openoffice too), and they tend to use various "fancy features" not always immediately in MinGW-w64. But I can try to correct this omission, as I did a previous one like this before. |
Everything works fine until now I am facing this error.
D:>cd ../skui-build
D:\skui-build>cmake ../skui -G Ninja
-- The C compiler identification is GNU 8.2.0
-- The CXX compiler identification is GNU 8.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/MinGW/bin/gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/MinGW/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenGL: opengl32
-- Configuring done
-- Generating done
-- Build files have been written to: D:/skui-build
D:\skui-build>cmake --build .
[42/1007] Building CXX object 3rdparty/skia/CMakeFiles/skia.dir/src/codec/SkBmpRLECodec.cpp.obj
FAILED: 3rdparty/skia/CMakeFiles/skia.dir/src/codec/SkBmpRLECodec.cpp.obj
C:\MinGW\bin\c++.exe -DNOMINMAX -DSKIA_IMPLEMENTATION=1 -DSK_HAS_PNG_LIBRARY -DWIN32_LEAN_AND_MEAN -ID:/skui/3rdparty/libpng -ID:/skui/3rdparty/zlib -ID:/skui/3rdparty/libexpat -ID:/skui/3rdparty/giflib -ID:/skui/3rdparty/libjpeg-turbo -isystem D:/skui/3rdparty/skia/include/third_party/skcms -isystem D:/skui/3rdparty/skia/. -pedantic-errors -Wextra -Wconversion -Winit-self -Wmissing-include-dirs -Wstrict-aliasing -Werror -ffunction-sections -fdata-sections -Wno-conversion -Wno-pedantic -Wno-missing-field-initializers -Wno-sign-compare -Wno-unused-parameter -Wno-deprecated-declarations -Wno-narrowing -Wimplicit-fallthrough=0 -Wformat=0 -Wno-format-extra-args -Wno-int-in-bool-context -Wno-strict-aliasing -Wno-unused -Wno-ignored-attributes -Wno-unknown-pragmas -Wno-sizeof-pointer-memaccess -Wno-class-memaccess -Wno-stringop-overflow -Wno-array-bounds -Wno-restrict -Wno-stringop-truncation -Wno-cast-function-type -Wno-maybe-uninitialized -std=c++17 -MD -MT 3rdparty/skia/CMakeFiles/skia.dir/src/codec/SkBmpRLECodec.cpp.obj -MF 3rdparty\skia\CMakeFiles\skia.dir\src\codec\SkBmpRLECodec.cpp.obj.d -o 3rdparty/skia/CMakeFiles/skia.dir/src/codec/SkBmpRLECodec.cpp.obj -c D:/skui/3rdparty/skia/src/codec/SkBmpRLECodec.cpp
In file included from d:\skui\3rdparty\skia\include\core\skrefcnt.h:11,
from d:\skui\3rdparty\skia\include\core\skdata.h:13,
from d:\skui\3rdparty\skia\include\core\skstream.h:11,
from D:/skui/3rdparty/skia/src/codec/SkBmpRLECodec.cpp:8:
d:\skui\3rdparty\skia\include\core\sktypes.h:340:14: fatal error: crtdbg.h: No such file or directory
#include <crtdbg.h>
^~~~~~~~~~
compilation terminated.
[44/1007] Building CXX object 3rdparty/skia/CMakeFiles/skia.dir/src/codec/SkBmpStandardCodec.cpp.obj
FAILED: 3rdparty/skia/CMakeFiles/skia.dir/src/codec/SkBmpStandardCodec.cpp.obj
C:\MinGW\bin\c++.exe -DNOMINMAX -DSKIA_IMPLEMENTATION=1 -DSK_HAS_PNG_LIBRARY -DWIN32_LEAN_AND_MEAN -ID:/skui/3rdparty/libpng -ID:/skui/3rdparty/zlib -ID:/skui/3rdparty/libexpat -ID:/skui/3rdparty/giflib -ID:/skui/3rdparty/libjpeg-turbo -isystem D:/skui/3rdparty/skia/include/third_party/skcms -isystem D:/skui/3rdparty/skia/. -pedantic-errors -Wextra -Wconversion -Winit-self -Wmissing-include-dirs -Wstrict-aliasing -Werror -ffunction-sections -fdata-sections -Wno-conversion -Wno-pedantic -Wno-missing-field-initializers -Wno-sign-compare -Wno-unused-parameter -Wno-deprecated-declarations -Wno-narrowing -Wimplicit-fallthrough=0 -Wformat=0 -Wno-format-extra-args -Wno-int-in-bool-context -Wno-strict-aliasing -Wno-unused -Wno-ignored-attributes -Wno-unknown-pragmas -Wno-sizeof-pointer-memaccess -Wno-class-memaccess -Wno-stringop-overflow -Wno-array-bounds -Wno-restrict -Wno-stringop-truncation -Wno-cast-function-type -Wno-maybe-uninitialized -std=c++17 -MD -MT 3rdparty/skia/CMakeFiles/skia.dir/src/codec/SkBmpStandardCodec.cpp.obj -MF 3rdparty\skia\CMakeFiles\skia.dir\src\codec\SkBmpStandardCodec.cpp.obj.d -o 3rdparty/skia/CMakeFiles/skia.dir/src/codec/SkBmpStandardCodec.cpp.obj -c D:/skui/3rdparty/skia/src/codec/SkBmpStandardCodec.cpp
In file included from d:\skui\3rdparty\skia\include\core\skrefcnt.h:11,
from d:\skui\3rdparty\skia\include\core\skdata.h:13,
from d:\skui\3rdparty\skia\include\core\skstream.h:11,
from D:/skui/3rdparty/skia/src/codec/SkBmpStandardCodec.cpp:8:
d:\skui\3rdparty\skia\include\core\sktypes.h:340:14: fatal error: crtdbg.h: No such file or directory
#include <crtdbg.h>
^~~~~~~~~~
compilation terminated.
[45/1007] Building CXX object 3rdparty/skia/CMakeFiles/skia.dir/src/codec/SkBmpBaseCodec.cpp.obj
FAILED: 3rdparty/skia/CMakeFiles/skia.dir/src/codec/SkBmpBaseCodec.cpp.obj
C:\MinGW\bin\c++.exe -DNOMINMAX -DSKIA_IMPLEMENTATION=1 -DSK_HAS_PNG_LIBRARY -DWIN32_LEAN_AND_MEAN -ID:/skui/3rdparty/libpng -ID:/skui/3rdparty/zlib -ID:/skui/3rdparty/libexpat -ID:/skui/3rdparty/giflib -ID:/skui/3rdparty/libjpeg-turbo -isystem D:/skui/3rdparty/skia/include/third_party/skcms -isystem D:/skui/3rdparty/skia/. -pedantic-errors -Wextra -Wconversion -Winit-self -Wmissing-include-dirs -Wstrict-aliasing -Werror -ffunction-sections -fdata-sections -Wno-conversion -Wno-pedantic -Wno-missing-field-initializers -Wno-sign-compare -Wno-unused-parameter -Wno-deprecated-declarations -Wno-narrowing -Wimplicit-fallthrough=0 -Wformat=0 -Wno-format-extra-args -Wno-int-in-bool-context -Wno-strict-aliasing -Wno-unused -Wno-ignored-attributes -Wno-unknown-pragmas -Wno-sizeof-pointer-memaccess -Wno-class-memaccess -Wno-stringop-overflow -Wno-array-bounds -Wno-restrict -Wno-stringop-truncation -Wno-cast-function-type -Wno-maybe-uninitialized -std=c++17 -MD -MT 3rdparty/skia/CMakeFiles/skia.dir/src/codec/SkBmpBaseCodec.cpp.obj -MF 3rdparty\skia\CMakeFiles\skia.dir\src\codec\SkBmpBaseCodec.cpp.obj.d -o 3rdparty/skia/CMakeFiles/skia.dir/src/codec/SkBmpBaseCodec.cpp.obj -c D:/skui/3rdparty/skia/src/codec/SkBmpBaseCodec.cpp
In file included from d:\skui\3rdparty\skia\include\private\skmalloc.h:14,
from D:/skui/3rdparty/skia/src/codec/SkBmpBaseCodec.cpp:7:
d:\skui\3rdparty\skia\include\core\sktypes.h:340:14: fatal error: crtdbg.h: No such file or directory
#include <crtdbg.h>
^~~~~~~~~~
compilation terminated.
[46/1007] Building CXX object 3rdparty/skia/CMakeFiles/skia.dir/src/codec/SkBmpMaskCodec.cpp.obj
FAILED: 3rdparty/skia/CMakeFiles/skia.dir/src/codec/SkBmpMaskCodec.cpp.obj
C:\MinGW\bin\c++.exe -DNOMINMAX -DSKIA_IMPLEMENTATION=1 -DSK_HAS_PNG_LIBRARY -DWIN32_LEAN_AND_MEAN -ID:/skui/3rdparty/libpng -ID:/skui/3rdparty/zlib -ID:/skui/3rdparty/libexpat -ID:/skui/3rdparty/giflib -ID:/skui/3rdparty/libjpeg-turbo -isystem D:/skui/3rdparty/skia/include/third_party/skcms -isystem D:/skui/3rdparty/skia/. -pedantic-errors -Wextra -Wconversion -Winit-self -Wmissing-include-dirs -Wstrict-aliasing -Werror -ffunction-sections -fdata-sections -Wno-conversion -Wno-pedantic -Wno-missing-field-initializers -Wno-sign-compare -Wno-unused-parameter -Wno-deprecated-declarations -Wno-narrowing -Wimplicit-fallthrough=0 -Wformat=0 -Wno-format-extra-args -Wno-int-in-bool-context -Wno-strict-aliasing -Wno-unused -Wno-ignored-attributes -Wno-unknown-pragmas -Wno-sizeof-pointer-memaccess -Wno-class-memaccess -Wno-stringop-overflow -Wno-array-bounds -Wno-restrict -Wno-stringop-truncation -Wno-cast-function-type -Wno-maybe-uninitialized -std=c++17 -MD -MT 3rdparty/skia/CMakeFiles/skia.dir/src/codec/SkBmpMaskCodec.cpp.obj -MF 3rdparty\skia\CMakeFiles\skia.dir\src\codec\SkBmpMaskCodec.cpp.obj.d -o 3rdparty/skia/CMakeFiles/skia.dir/src/codec/SkBmpMaskCodec.cpp.obj -c D:/skui/3rdparty/skia/src/codec/SkBmpMaskCodec.cpp
In file included from d:\skui\3rdparty\skia\include\core\skrefcnt.h:11,
from d:\skui\3rdparty\skia\include\core\skcolorspace.h:11,
from d:\skui\3rdparty\skia\include\core\skimageinfo.h:11,
from d:\skui\3rdparty\skia\include\core\skcolor.h:11,
from d:\skui\3rdparty\skia\include\private\skcolordata.h:11,
from D:/skui/3rdparty/skia/src/codec/SkBmpMaskCodec.cpp:8:
d:\skui\3rdparty\skia\include\core\sktypes.h:340:14: fatal error: crtdbg.h: No such file or directory
#include <crtdbg.h>
^~~~~~~~~~
compilation terminated.
[47/1007] Building C object 3rdparty/CMakeFiles/jpeg-turbo.dir/libjpeg-turbo/jidctint.c.obj
ninja: build stopped: subcommand failed.
The text was updated successfully, but these errors were encountered: