revery-ui / revery

:zap: Native, high-performance, cross-platform desktop apps - built with Reason!
https://www.outrunlabs.com/revery/
MIT License
8.07k stars 197 forks source link

Build revery with esy on mac failed #1091

Closed blithefeng closed 3 years ago

blithefeng commented 3 years ago

Operation System: macOS Big Sur Esy version: 0.6.11

[1219/1220] compile ../../src/ports/SkFontHost_mac.cpp
    FAILED: obj/src/ports/libskia.SkFontHost_mac.o
    clang++ -MMD -MF obj/src/ports/libskia.SkFontHost_mac.o.d -DNDEBUG -DSK_GAMMA_APPLY_TO_A8 -DSK_ENABLE_DISCRETE_GPU -DGR_TEST_UTILS=1 -DSKIA_IMPLEMENTATION=1 -DSK_HAS_JPEG_LIBRARY -DSK_SUPPORT_PDF -DSK_PDF_USE_SFNTLY -DSK_HAS_PNG_LIBRARY -DSK_CODEC_DECODES_RAW -DSK_USE_SKCMS -DSK_HAS_WEBP_LIBRARY -DSK_XML -DESY_SKIA_SVG -I../../include/android -I../../include/c -I../../include/codec -I../../include/config -I../../include/core -I../../include/effects -I../../include/encode -I../../include/gpu -I../../include/atlastext -I../../include/pathops -I../../include/ports -I../../include/svg -I../../include/utils -I../../include/utils/mac -I../../include/private -I../../src/c -I../../src/codec -I../../src/core -I../../src/effects -I../../src/fonts -I../../src/image -I../../src/images -I../../src/lazy -I../../src/opts -I../../src/pathops -I../../src/pdf -I../../src/ports -I../../src/sfnt -I../../src/shaders -I../../src/shaders/gradients -I../../src/sksl -I../../src/utils -I../../src/utils/win -I../../src/xml -I../../third_party/gif -I../../experimental/svg/model -I../../src/gpu -fstrict-aliasing -fPIC -fvisibility=hidden -O3 -fdata-sections -ffunction-sections -g -Werror -Wall -Wextra -Winit-self -Wpointer-arith -Wsign-compare -Wvla -Wno-deprecated-declarations -Wno-maybe-uninitialized -Wno-extra-semi-stmt -Weverything -Wno-unknown-warning-option -Wno-anon-enum-enum-conversion -Wno-sizeof-array-div -Wno-psabi -Wno-suggest-destructor-override -Wno-suggest-override -Wno-uninitialized-const-reference -Wno-poison-system-directories -Wno-nonportable-include-path -Wno-nonportable-system-include-path -Wno-cast-align -Wno-cast-qual -Wno-conversion -Wno-disabled-macro-expansion -Wno-documentation -Wno-documentation-unknown-command -Wno-double-promotion -Wno-exit-time-destructors -Wno-float-equal -Wno-format-nonliteral -Wno-global-constructors -Wno-missing-prototypes -Wno-missing-variable-declarations -Wno-pedantic -Wno-reserved-id-macro -Wno-shadow -Wno-shift-sign-overflow -Wno-signed-enum-bitfield -Wno-switch-enum -Wno-undef -Wno-unreachable-code -Wno-unreachable-code-break -Wno-unreachable-code-return -Wno-unused-macros -Wno-unused-member-function -Wno-unused-template -Wno-zero-as-null-pointer-constant -Wno-bad-function-cast -Wno-covered-switch-default -Wno-deprecated -Wno-missing-noreturn -Wno-old-style-cast -Wno-padded -Wno-newline-eof -Wno-implicit-fallthrough -Wno-unused-parameter -I/Users/blithe/.esy/3_________________________________________________________________/i/esy_libjpeg_turbo-dc3b4679/include -std=c++11 -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -Wnon-virtual-dtor -Wno-noexcept-type -Wno-abstract-vbase-init -Wno-weak-vtables -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-undefined-func-template -c ../../src/ports/SkFontHost_mac.cpp -o obj/src/ports/libskia.SkFontHost_mac.o
    ../../src/ports/SkFontHost_mac.cpp:1721:29: error: multi-character character constant [-Werror,-Wfour-char-constants]
        if (!this->getTableSize('glyf') || !this->getTableSize('loca')) {
                                ^
    ../../src/ports/SkFontHost_mac.cpp:1721:60: error: multi-character character constant [-Werror,-Wfour-char-constants]
        if (!this->getTableSize('glyf') || !this->getTableSize('loca')) {
                                                               ^
    2 errors generated.
    ninja: build stopped: subcommand failed.
    error: command failed: 'bash' './esy/build.sh' 'darwin' '/Users/blithe/.esy/3_________________________________________________________________/i/esy_libjpeg_turbo-dc3b4679' (exited with 255)
    esy-build-package: exiting with errors above...

  building esy-skia@github:revery-ui/esy-skia#1c81aac
Et7f3 commented 3 years ago

To unlock this issue you can try to disable this warning https://github.com/revery-ui/esy-skia/commit/91c98f63fbb6365fba96b4141faa2d135c818dd9#diff-933aa78c9e01ab7dd2b1157984ff8758bf86fe1de581a8df999effb612518726 and consume your own resolution (see in package.json)

blithefeng commented 3 years ago

revery-ui/esy-skia@91c98f6

Sorry, I don't know how to apply it.

glennsl commented 3 years ago

@blithefeng I'm afraid I don't have an up-to-date macOS to test this with, but try to clone this. See if it builds. If it does, let me know then I'll merge it and you can then add a resolution to that. If it doesn't, and it's another warning that fails, take the warning name, add no- in front of it, then add it to gn/BUILD.gn as shown in the PR above, and try to build again.

Also, can you show me what clang --version prints?

roger-sato commented 3 years ago

@glennsl I have had the same trouble, but I can solved it with fixing package.json as below.

-    "esy-skia": "revery-ui/esy-skia#1c81aac",
+    "esy-skia": "glennsl/esy-skia#fix\/clang-warns",

thanks!

glennsl commented 3 years ago

Yeah, that should do it. Could you give me the result of running clang --version so that I can get this merged, then you can point to a commit on master and not have to worry about the branch going away.

roger-sato commented 3 years ago

@glennsl OK. clang --version is as follows.

Apple clang version 13.0.0 (clang-1300.0.29.3)
Target: x86_64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
glennsl commented 3 years ago

Thanks! I've merged the fix to esy-skia, but am not able to fix reveryitself because of some deeper dependency issues on master. But if you have a project that uses a version of revery without these issues, adding this to package.json should at least fix the issue with èsy-skia`:

  "resolutions": {
    "esy-skia": "revery-ui/esy-skia#b8aff12"
  }
blithefeng commented 3 years ago

Thansk a lot. I'll try

glennsl commented 3 years ago

No problem. I don't think this is resolved and should be closed though. Revery itself is still broken. This is just a workaround.