revery-ui/revery

Ubuntu 20.10: revery-ui/esy-skia build failed

jericdeleon opened this issue · 3 comments

Apologies for the vague title. I cannot pinpoint the exact issue on my own. I'll happily update over the course of resolution.

Tried to follow the Building and Installing document on a Pop!_OS 20.10 machine, and failed. Tried to follow the same steps again, this time using a plain vagrant box with ubuntu/groovy64, still had the same issues.

If Ubuntu 20.10 is currently unhandled, can anyone relay the highest Ubuntu version they know that the build instructions work on? (or if any distro is recommended for the relatively smoothest build experience?)

  • Steps to reproduce:

    1. Using a ubuntu/groovy64 vagrant box (or any Ubuntu 20.10 machine), follow the building and installing instructions
      • I had to give it at least 2GB of ram to build esy-harfbuzz, but other than that, nothing of note
  • Operating System: Ubuntu 20.10

  • Dependency Versions:

vagrant@ubuntu-groovy:~/code/revery$ sudo apt install build-essential cmake ragel libpng-dev libbz2-dev m4 xorg-dev libglu1-mesa-dev libharfbuzz-dev libgtk-3-dev libfontconfig1-dev nasm clang
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.8ubuntu3).
cmake is already the newest version (3.16.3-3ubuntu2).
libbz2-dev is already the newest version (1.0.8-4ubuntu2).
libfontconfig1-dev is already the newest version (2.13.1-2ubuntu3).
libglu1-mesa-dev is already the newest version (9.0.1-1build1).
libgtk-3-dev is already the newest version (3.24.23-1ubuntu1).
libharfbuzz-dev is already the newest version (2.6.4-1ubuntu5).
libpng-dev is already the newest version (1.6.37-3).
m4 is already the newest version (1.4.18-4).
xorg-dev is already the newest version (1:7.7+19ubuntu15).
clang is already the newest version (1:11.0-51~exp1).
nasm is already the newest version (2.15.04-1).
ragel is already the newest version (6.10-1build1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  • Expected Result: esy build will complete successfully.
  • Actual Result: esy build fails with the ff:
info esy build 0.6.7 (using package.json)
info building esy-skia@github:revery-ui/esy-skia#60e0260@d41d8cd9
error: build failed with exit code: 1
  build log:
    # esy-build-package: building: esy-skia@github:revery-ui/esy-skia#60e0260
    # esy-build-package: pwd: /home/vagrant/.esy/3/b/esy_skia-01fafb2b
    # esy-build-package: running: 'bash' './esy/build.sh' 'linux' '/home/vagrant/.esy/3__________________________________________________________________/i/esy_libjpeg_turbo-e4385a3b'
    buildtools                           @ 505de88083136eefd056e5ee4ca0f01fe9b33de8
    common                               @ 9737551d7a52c3db3262db5856e6bcd62c462b92
    third_party/externals/angle2         @ b001528ffa00e7c15a5002124f707570e59a5697
    third_party/externals/dng_sdk        @ 96443b262250c390b0caefbf3eed8463ba35ecae
    third_party/externals/expat          @ android-6.0.1_r55
    third_party/externals/freetype       @ fa6da7bf6dcbcfa22d2464259ad1cccee3233189
    third_party/externals/googletest     @ dd43b9998e9a44a579a7aba6c1309407d1a5ed95
    third_party/externals/harfbuzz       @ 1.4.2
    third_party/externals/icu            @ ec9c1133693148470ffe2e5e53576998e3650c1d
    third_party/externals/imgui          @ 6384eee34f08cb7eab8d835043e1738e4adcdf75
    third_party/externals/jsoncpp        @ 1.0.0
    third_party/externals/libjpeg-turbo  @ 1.5.3
    third_party/externals/libpng         @ v1.6.33
    third_party/externals/libwebp        @ v0.6.1
    third_party/externals/lua            @ v5-3-4
    third_party/externals/microhttpd     @ 748945ec6f1c67b7efc934ab0808e1d32f2fb98d
    third_party/externals/piex           @ bb217acdca1cc0c16b704669dd6f91a1b509c406
    third_party/externals/rapidjson      @ af223d44f4e8d3772cb1ac0ce8bc2a132b51717f
    third_party/externals/sdl            @ 5d7cfcca344034aff9327f77fc181ae3754e7a90
    third_party/externals/sfntly         @ b18b09b6114b9b7fe6fc2f96d8b15e8a72f66916
    third_party/externals/spirv-headers  @ 661ad91124e6af2272afd00f804d8aa276e17107
    third_party/externals/spirv-tools    @ e9e4393b1c5aad7553c05782acefbe32b42644bd
    third_party/externals/swiftshader    @ cbb80f5f0078a9941f3ec43e83e52c3d15a43bea
    third_party/externals/zlib           @ e7afdfe128e01ca480a28f757b571957befdd962
    llvm toolset-7.0 does not need to be manually activated
    Done. Made 44 targets from 27 files in 48ms
    ninja: Entering directory `/home/vagrant/.esy/3/b/esy_skia-01fafb2b/out/Static'
    [1/1206] stamp obj/arm64.stamp
    [2/1206] stamp obj/armv7.stamp
    [3/1206] compile ../../src/gpu/GrPaint.cpp
    FAILED: obj/src/gpu/gpu.GrPaint.o
    clang++ -MMD -MF obj/src/gpu/gpu.GrPaint.o.d -DNDEBUG -DSK_SAMPLES_FOR_X -DSK_GAMMA_APPLY_TO_A8 -DSK_ENABLE_DISCRETE_GPU -DGR_TEST_UTILS=1 -DSKIA_IMPLEMENTATION=1 -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../../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-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/home/vagrant/.esy/3__________________________________________________________________/i/esy_libjpeg_turbo-e4385a3b/include -Wno-poison-system-directories -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/gpu/GrPaint.cpp -o obj/src/gpu/gpu.GrPaint.o
    In file included from ../../src/gpu/GrPaint.cpp:8:
    In file included from ../../src/gpu/GrPaint.h:14:
    In file included from ../../src/gpu/GrFragmentProcessor.h:11:
    In file included from ../../src/gpu/GrProcessor.h:15:
    In file included from ../../src/gpu/GrProcessorUnitTest.h:15:
    In file included from ../../include/android/../private/GrTextureProxy.h:12:
    ../../include/private/GrSurfaceProxy.h:399:13: error: '~GrSurfaceProxy' overrides a destructor but is not marked 'override' [-Werror,-Wsuggest-destructor-override]
        virtual ~GrSurfaceProxy();
                ^
    ../../include/private/GrSurfaceProxy.h:149:13: note: overridden virtual function is here
        virtual ~GrIORefProxy() {
                ^
    In file included from ../../src/gpu/GrPaint.cpp:8:
    In file included from ../../src/gpu/GrPaint.h:14:
    In file included from ../../src/gpu/GrFragmentProcessor.h:11:
    In file included from ../../src/gpu/GrProcessor.h:19:
    In file included from ../../src/gpu/GrSurfaceProxyPriv.h:13:
    In file included from ../../src/gpu/GrResourceProvider.h:15:
    In file included from ../../src/core/SkScalerContext.h:19:
    ../../include/core/SkTypeface.h:304:13: error: '~SkTypeface' overrides a destructor but is not marked 'override' [-Werror,-Wsuggest-destructor-override]
        virtual ~SkTypeface();
                ^
    ../../include/core/../private/SkWeakRefCnt.h:63:5: note: overridden virtual function is here
        ~SkWeakRefCnt() override {
        ^
    2 errors generated.
    [4/1206] compile ../../src/gpu/GrPath.cpp
    FAILED: obj/src/gpu/gpu.GrPath.o
    clang++ -MMD -MF obj/src/gpu/gpu.GrPath.o.d -DNDEBUG -DSK_SAMPLES_FOR_X -DSK_GAMMA_APPLY_TO_A8 -DSK_ENABLE_DISCRETE_GPU -DGR_TEST_UTILS=1 -DSKIA_IMPLEMENTATION=1 -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../../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-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/home/vagrant/.esy/3__________________________________________________________________/i/esy_libjpeg_turbo-e4385a3b/include -Wno-poison-system-directories -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/gpu/GrPath.cpp -o obj/src/gpu/gpu.GrPath.o
    In file included from ../../src/gpu/GrPath.cpp:8:
    In file included from ../../src/gpu/GrPath.h:12:
    In file included from ../../src/gpu/GrPathRendering.h:12:
    In file included from ../../src/gpu/GrPipeline.h:12:
    In file included from ../../src/gpu/GrFragmentProcessor.h:11:
    In file included from ../../src/gpu/GrProcessor.h:15:
    In file included from ../../src/gpu/GrProcessorUnitTest.h:15:
    In file included from ../../include/android/../private/GrTextureProxy.h:12:
    ../../include/private/GrSurfaceProxy.h:399:13: error: '~GrSurfaceProxy' overrides a destructor but is not marked 'override' [-Werror,-Wsuggest-destructor-override]
        virtual ~GrSurfaceProxy();
                ^
    ../../include/private/GrSurfaceProxy.h:149:13: note: overridden virtual function is here
        virtual ~GrIORefProxy() {
                ^
    In file included from ../../src/gpu/GrPath.cpp:8:
    In file included from ../../src/gpu/GrPath.h:12:
    In file included from ../../src/gpu/GrPathRendering.h:12:
    In file included from ../../src/gpu/GrPipeline.h:12:
    In file included from ../../src/gpu/GrFragmentProcessor.h:11:
    In file included from ../../src/gpu/GrProcessor.h:19:
    In file included from ../../src/gpu/GrSurfaceProxyPriv.h:13:
    In file included from ../../src/gpu/GrResourceProvider.h:15:
    In file included from ../../src/core/SkScalerContext.h:19:
    ../../include/core/SkTypeface.h:304:13: error: '~SkTypeface' overrides a destructor but is not marked 'override' [-Werror,-Wsuggest-destructor-override]
        virtual ~SkTypeface();
                ^
    ../../include/core/../private/SkWeakRefCnt.h:63:5: note: overridden virtual function is here
        ~SkWeakRefCnt() override {
        ^
    In file included from ../../src/gpu/GrPath.cpp:8:
    In file included from ../../src/gpu/GrPath.h:12:
    In file included from ../../src/gpu/GrPathRendering.h:12:
    In file included from ../../src/gpu/GrPipeline.h:16:
    In file included from ../../src/gpu/GrProgramDesc.h:15:
    ../../src/gpu/glsl/GrGLSLFragmentShaderBuilder.h:25:13: error: '~GrGLSLFragmentBuilder' overrides a destructor but is not marked 'override' [-Werror,-Wsuggest-destructor-override]
        virtual ~GrGLSLFragmentBuilder() {}
                ^
    ../../src/gpu/glsl/GrGLSLShaderBuilder.h:26:13: note: overridden virtual function is here
        virtual ~GrGLSLShaderBuilder() {}
                ^
    3 errors generated.
    [5/1206] compile ../../src/opts/SkOpts_avx.cpp
    FAILED: obj/src/opts/avx.SkOpts_avx.o
    clang++ -MMD -MF obj/src/opts/avx.SkOpts_avx.o.d -DNDEBUG -DSK_SAMPLES_FOR_X -DSK_GAMMA_APPLY_TO_A8 -DSK_ENABLE_DISCRETE_GPU -DGR_TEST_UTILS=1 -DSKIA_IMPLEMENTATION=1 -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../../src/gpu -mavx -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-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/home/vagrant/.esy/3__________________________________________________________________/i/esy_libjpeg_turbo-e4385a3b/include -Wno-poison-system-directories -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/opts/SkOpts_avx.cpp -o obj/src/opts/avx.SkOpts_avx.o
    In file included from ../../src/opts/SkOpts_avx.cpp:11:
    ../../src/opts/SkRasterPipeline_opts.h:1688:15: error: AVX vector return of type 'V<unsigned long>' (vector of 8 'unsigned long' values) without 'avx512f' enabled changes the ABI [-Werror,-Wpsabi]
        auto px = gather(ptr, ix);
                  ^
    1 error generated.
    ninja: build stopped: subcommand failed.
    error: command failed: 'bash' './esy/build.sh' 'linux' '/home/vagrant/.esy/3__________________________________________________________________/i/esy_libjpeg_turbo-e4385a3b' (exited with 1)
    esy-build-package: exiting with errors above...

  building esy-skia@github:revery-ui/esy-skia#60e0260
esy: exiting due to errors above

Since these are only warnings that -Werror promotes to hard errors, a quick workaround for this is to remove -Werror from esy-skia's gn/BUILD.gn. The -Wsuggest-destructor-override option is new in Clang 11 and is auto-enabled due to BUILD.gn using -Weverything, but I believe these errors are false positives anyway. Not sure about the AVX one though.

Quick solution with a clang++ wrapper:

sudo vim /usr/local/bin/clang++

params=$@
params="${params/-Werror/-Wno-error}"
eval /usr/bin/clang++ "$params"

sudo chmod +x /usr/local/bin/clang++

This should be fixed by #1033. Feel free to reopen if this is incorrect.