storm-devs / storm-engine

Game engine behind Sea Dogs, Pirates of the Caribbean and Age of Pirates games.
https://storm-devs.github.io/storm-engine
GNU General Public License v3.0
847 stars 120 forks source link

Fix Linux CI #512

Closed q4a closed 1 year ago

q4a commented 1 year ago

Main goal of PR - fix Linux CI. Clang 12 was removed from Ubuntu 22.04 CI image: https://github.com/actions/runner-images/issues/8263

  1. Update to clang-15 fixed one error.
  2. Building SDL and Pulseaudio from source is painfull (for CI, for me and most likely for everyone), so I added -DSTORM_USE_CONAN_SDL=OFF to CI. That fixed other error ( https://github.com/q4a/storm-engine/actions/runs/6955795354/job/18925323436 ):
    checking whether C compiler accepts -std=gnu11... no
    configure: error: *** Compiler does not support -std=gnu11
    pulseaudio/14.2: ERROR: Package '22ea332a91486ebf9a840891f08bf8676c078958' build failed
    pulseaudio/14.2: WARN: Build folder /home/runner/.conan/data/pulseaudio/14.2/_/_/build/22ea332a91486ebf9a840891f08bf8676c078958/build-debug
    pulseaudio/14.2: 
    ERROR: pulseaudio/14.2: Error in build() method, line 127
    autotools.configure()
    ConanException: Error 1 while executing "/home/runner/.conan/data/pulseaudio/14.2/_/_/build/22ea332a91486ebf9a840891f08bf8676c078958/src/configure" '--disable-shared' '--enable-static' '--prefix=/' '--bindir=${prefix}/bin' '--sbindir=${prefix}/bin' '--libdir=${prefix}/lib' '--includedir=${prefix}/include' '--oldincludedir=${prefix}/include' '--enable-shared=no' '--enable-static=yes' '--enable-glib2=no' '--with-fftw=no' '--with-udev-rules-dir=${prefix}/bin/udev/rules.d' '--with-systemduserunitdir=/home/runner/.conan/data/pulseaudio/14.2/_/_/build/22ea332a91486ebf9a840891f08bf8676c078958/build-debug/ignore' '--enable-alsa=yes' '--enable-x11=yes' '--enable-openssl=yes' '--enable-dbus=no' '--libexecdir=${prefix}/bin' 
    CMake Error at cmake/conan.cmake:524 (message):
    Conan install failed='1'
    Call Stack (most recent call first):
    cmake/conan.cmake:761 (old_conan_cmake_install)
    CMakeLists.txt:36 (conan_cmake_run)
  3. And Looks like sentry-native 0.5.0 is very old and gives error on clang-15. So I updated it to 0.6.5. @espkk or @Hammie , can you check that Windows builds works fine with sentry-native 0.6.5? That fixed last error ( https://github.com/q4a/storm-engine/actions/runs/6956073134/job/18926156721 ):
    [  3%] Building CXX object third_party/mini_chromium/CMakeFiles/mini_chromium.dir/mini_chromium/base/logging.cc.o
    In file included from /home/runner/.conan/data/sentry-crashpad/0.5.0/_/_/build/c27994f4d7c794e87ef6de1008b4fa3af02a710c/src/external/crashpad/third_party/mini_chromium/mini_chromium/base/files/file_path.cc:10:
    /home/runner/.conan/data/sentry-crashpad/0.5.0/_/_/build/c27994f4d7c794e87ef6de1008b4fa3af02a710c/src/external/crashpad/third_party/mini_chromium/mini_chromium/base/logging.h:23:28: error: unknown type name 'uint32_t'
    using LoggingDestination = uint32_t;
                           ^
    /home/runner/.conan/data/sentry-crashpad/0.5.0/_/_/build/c27994f4d7c794e87ef6de1008b4fa3af02a710c/src/external/crashpad/third_party/mini_chromium/mini_chromium/base/logging.h:29:8: error: unknown type name 'LoggingDestination'
    enum : LoggingDestination {
       ^
    /home/runner/.conan/data/sentry-crashpad/0.5.0/_/_/build/c27994f4d7c794e87ef6de1008b4fa3af02a710c/src/external/crashpad/third_party/mini_chromium/mini_chromium/base/logging.h:47:3: error: unknown type name 'LoggingDestination'
    LoggingDestination logging_dest = LOG_DEFAULT;
    ^
    3 errors generated.
    gmake[2]: *** [third_party/mini_chromium/CMakeFiles/mini_chromium.dir/build.make:90: third_party/mini_chromium/CMakeFiles/mini_chromium.dir/mini_chromium/base/files/file_path.cc.o] Error 1
    gmake[2]: *** Waiting for unfinished jobs....
    In file included from /home/runner/.conan/data/sentry-crashpad/0.5.0/_/_/build/c27994f4d7c794e87ef6de1008b4fa3af02a710c/src/external/crashpad/third_party/mini_chromium/mini_chromium/base/logging.cc:5:
    /home/runner/.conan/data/sentry-crashpad/0.5.0/_/_/build/c27994f4d7c794e87ef6de1008b4fa3af02a710c/src/external/crashpad/third_party/mini_chromium/mini_chromium/base/logging.h:23:28: error: unknown type name 'uint32_t'
    using LoggingDestination = uint32_t;
                           ^
    /home/runner/.conan/data/sentry-crashpad/0.5.0/_/_/build/c27994f4d7c794e87ef6de1008b4fa3af02a710c/src/external/crashpad/third_party/mini_chromium/mini_chromium/base/logging.h:29:8: error: unknown type name 'LoggingDestination'
    enum : LoggingDestination {
       ^
    /home/runner/.conan/data/sentry-crashpad/0.5.0/_/_/build/c27994f4d7c794e87ef6de1008b4fa3af02a710c/src/external/crashpad/third_party/mini_chromium/mini_chromium/base/logging.h:47:3: error: unknown type name 'LoggingDestination'
    LoggingDestination logging_dest = LOG_DEFAULT;
    ^
    [  4%] Linking CXX static library libcrashpad_tools.a
    [  4%] Built target crashpad_tools
    /home/runner/.conan/data/sentry-crashpad/0.5.0/_/_/build/c27994f4d7c794e87ef6de1008b4fa3af02a710c/src/external/crashpad/third_party/mini_chromium/mini_chromium/base/logging.cc:76:1: error: unknown type name 'LoggingDestination'
    LoggingDestination g_logging_destination = LOG_DEFAULT;
    ^
    4 errors generated.
espkk commented 1 year ago
  1. that should be fine, I'm using 0.6.5 for a long time, no issues