HarbourMasters / Shipwright

3.03k stars 473 forks source link

Configuration error before building the project (Ubuntu Arm64) #3526

Open ArtemS2 opened 7 months ago

ArtemS2 commented 7 months ago

-- Linux Ubuntu 22.04 jammy -- Linking against dependent libraries statically -- Using the multi-header code from /home/artem/builds/Shipwright/libultraship/extern/nlohmann-json/include/ Searching for Boost installation Boost found in /usr/include CMake Warning at soh/CMakeLists.txt:358 (find_package): By not providing "FindSDL2_net.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "SDL2_net", but CMake did not find one.

Could not find a package configuration file provided by "SDL2_net" with any of the following names:

SDL2_netConfig.cmake
sdl2_net-config.cmake

Add the installation prefix of "SDL2_net" to CMAKE_PREFIX_PATH or set "SDL2_net_DIR" to a directory containing one of the above files. If "SDL2_net" provides a separate development package or SDK, be sure it has been installed.

-- Configuring done CMake Error at soh/CMakeLists.txt:266 (add_executable): Target "soh" links to target "SDL2_net::SDL2_net" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?

Archez commented 7 months ago

There is a requirement of sdl2_net in SoH. Either install it through apt, or if you do not need network capabilities (currently only used by CrowdControl), then you can pass in -DBUILD_CROWD_CONTROL=0 to cmake to skip it.

ArtemS2 commented 7 months ago

I tried to build with -DBUILD_CROWD_CONTROL=0 , but an error occurred during the build. build.log

Archez commented 7 months ago
/home/artem/builds/Shipwright/libultraship/src/controller/controldevice/controller/mapping/sdl/SDLMapping.cpp: In member function ‘bool LUS::SDLMapping::UsesSwitchLayout()’:
/home/artem/builds/Shipwright/libultraship/src/controller/controldevice/controller/mapping/sdl/SDLMapping.cpp:85:71: error: ‘SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_PAIR’ was not declared in this scope; did you mean ‘SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO’?
   85 |     return type == SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO || type == SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_PAIR;
      |                                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                       SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO

What version of SDL2 do you have? It might not be new enough to support the recent controller changes.

ArtemS2 commented 7 months ago

libsdl2-dev (2.0.20+dfsg-2ubuntu1.22.04.1)

Archez commented 7 months ago

Our build scripts use SDL2 2.26.1, so you are a bit behind. I recommend updating it.

ArtemS2 commented 7 months ago

This is the latest version of the library on my distribution. Can I use this repository to update securely - https://github.com/libsdl-org/SDL?

Archez commented 7 months ago

Yes. You can also reference how we do it from our build scripts. But ours is for x64, so the steps may be different for arm. I'm sure there are instructions on SDLs GitHub/site regarding building.

https://github.com/HarbourMasters/Shipwright/blob/2d22a3ebcc9d735eeccc4df6eb6e78a4a31cfb91/.github/workflows/generate-builds.yml#L28-L34