cooljeanius / Tiggit

A game installer/launcher/thing. Forked in case I feel like trying to port it to other platforms.
http://tiggit.net
1 stars 0 forks source link

Properly fix CodeQL scan failure that can occur due to build error of C++ code #1

Open cooljeanius opened 1 year ago

cooljeanius commented 1 year ago
-- Detecting CXX compile features - done
CMake Error at /usr/local/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES
  wxWidgets_INCLUDE_DIRS)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/share/cmake-3.26/Modules/FindwxWidgets.cmake:977 (find_package_handle_standard_args)
  CMakeLists.txt:5 (find_package)

will probably require a custom set-up...

cooljeanius commented 10 months ago

So, current status of this is that the runner is running out of space... I'm going to have to start paying for an Enterprise plan if I want to use a larger runner, looks like: https://docs.github.com/en/enterprise-cloud@latest/actions/using-github-hosted-runners/about-larger-runners/about-larger-runners

cooljeanius commented 10 months ago

So, it looks like wxWidgets now successfully builds, but the CI task still fails due to the runner running out of space... I'll update the title...

cooljeanius commented 9 months ago

OK, so I fixed the disk space issue (by removing the android sdk), and got it past the configure step to the build step, so now the build error looks something like:

 [  6%] Building CXX object CMakeFiles/tiggit.dir/tiggit.cpp.o
  /home/runner/work/_temp/codeql_databases/cpp/working/autobuild/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_SYSTEM_DYN_LINK -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/home/runner/work/Tiggit/Tiggit/libs/jsoncpp/include -isystem /usr/lib/x86_64-linux-gnu/wx/include/gtk3-unicode-3.0 -isystem /usr/include/wx-3.0 -pthread -O3 -DNDEBUG -MD -MT CMakeFiles/tiggit.dir/tiggit.cpp.o -MF CMakeFiles/tiggit.dir/tiggit.cpp.o.d -o CMakeFiles/tiggit.dir/tiggit.cpp.o -c /home/runner/work/Tiggit/Tiggit/tiggit.cpp
  In file included from /home/runner/work/Tiggit/Tiggit/tiggit.cpp:22:
  /home/runner/work/Tiggit/Tiggit/auto_update.hpp: In member function ‘bool Updater::doAutoUpdate()’:
  /home/runner/work/Tiggit/Tiggit/auto_update.hpp:62:23: error: reference to ‘get’ is ambiguous
     62 |     path canon_path = get.getPath("bin");
        |                       ^~~
  In file included from /home/runner/work/Tiggit/Tiggit/tiggit.cpp:16:
  /home/runner/work/Tiggit/Tiggit/filegetter.hpp:141:12: note: candidates are: ‘FileGetter get’
    141 | FileGetter get;
        |            ^~~

I'm wondering if it's something to do with the version of the C++ standard used by default? Looks like I'll need to hack CMakeLists.txt to try setting some different compiler flags...

cooljeanius commented 2 months ago

OK, so I fixed the disk space issue (by removing the android sdk), and got it past the configure step to the build step, so now the build error looks something like:

 [  6%] Building CXX object CMakeFiles/tiggit.dir/tiggit.cpp.o
  /home/runner/work/_temp/codeql_databases/cpp/working/autobuild/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_SYSTEM_DYN_LINK -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/home/runner/work/Tiggit/Tiggit/libs/jsoncpp/include -isystem /usr/lib/x86_64-linux-gnu/wx/include/gtk3-unicode-3.0 -isystem /usr/include/wx-3.0 -pthread -O3 -DNDEBUG -MD -MT CMakeFiles/tiggit.dir/tiggit.cpp.o -MF CMakeFiles/tiggit.dir/tiggit.cpp.o.d -o CMakeFiles/tiggit.dir/tiggit.cpp.o -c /home/runner/work/Tiggit/Tiggit/tiggit.cpp
  In file included from /home/runner/work/Tiggit/Tiggit/tiggit.cpp:22:
  /home/runner/work/Tiggit/Tiggit/auto_update.hpp: In member function ‘bool Updater::doAutoUpdate()’:
  /home/runner/work/Tiggit/Tiggit/auto_update.hpp:62:23: error: reference to ‘get’ is ambiguous
     62 |     path canon_path = get.getPath("bin");
        |                       ^~~
  In file included from /home/runner/work/Tiggit/Tiggit/tiggit.cpp:16:
  /home/runner/work/Tiggit/Tiggit/filegetter.hpp:141:12: note: candidates are: ‘FileGetter get’
    141 | FileGetter get;
        |            ^~~

I'm wondering if it's something to do with the version of the C++ standard used by default? Looks like I'll need to hack CMakeLists.txt to try setting some different compiler flags...

Update: tried changing the flags via the environment. Flags changed successfully, but the build still failed. I guess it's something else...?

cooljeanius commented 2 months ago

OK I'm hacking around this by just ignoring the failure as of 2133697; leaving this open for a proper fix, though...