From 75f75f346134867a13e6f2f0cb89233a004a2ee2 Mon Sep 17 00:00:00 2001 From: lizzie Date: Mon, 5 Jan 2026 08:43:27 +0000 Subject: [PATCH] [port, cmake] fix OBSD 7.8 build failure, update OpenBSD 7.8 documentation Signed-off-by: lizzie --- CMakeLists.txt | 12 +++++++++--- docs/Caveats.md | 2 ++ docs/Deps.md | 2 +- docs/Development.md | 10 +++++----- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 86a67ce0a5..49e565e86c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -436,9 +436,15 @@ if (YUZU_USE_CPM) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthreads") endif() - target_compile_options(boost_heap INTERFACE -Wno-shadow) - target_compile_options(boost_icl INTERFACE -Wno-shadow) - target_compile_options(boost_asio INTERFACE -Wno-conversion -Wno-implicit-fallthrough) + if (TARGET boost_heap) + target_compile_options(boost_heap INTERFACE -Wno-shadow) + endif() + if (TARGET boost_icl) + target_compile_options(boost_icl INTERFACE -Wno-shadow) + endif() + if (TARGET boost_asio) + target_compile_options(boost_asio INTERFACE -Wno-conversion -Wno-implicit-fallthrough) + endif() endif() endif() diff --git a/docs/Caveats.md b/docs/Caveats.md index ed98f602d8..39b5ab15e6 100644 --- a/docs/Caveats.md +++ b/docs/Caveats.md @@ -85,6 +85,8 @@ If you have `quazip1_qt6_devel`, uninstall it. It may call `Core5Compat` on CMak ## OpenBSD +System boost doesn't have `context` (as of 7.8); so you may need to specify `-DYUZU_USE_CPM=ON -DBoost_FORCE_BUNDLED=ON`. + After configuration, you may need to modify `externals/ffmpeg/CMakeFiles/ffmpeg-build/build.make` to use `-j$(nproc)` instead of just `-j`. `-lc++-experimental` doesn't exist in OpenBSD but the LLVM driver still tries to link against it, to solve just symlink `ln -s /usr/lib/libc++.a /usr/lib/libc++experimental.a`. Builds are currently not working due to lack of `std::jthread` and such, either compile libc++ manually or wait for ports to catch up. diff --git a/docs/Deps.md b/docs/Deps.md index 689d12800a..c91d6fc4fb 100644 --- a/docs/Deps.md +++ b/docs/Deps.md @@ -277,7 +277,7 @@ For NetBSD +10.1: `pkgin install git cmake boost fmtlib SDL2 catch2 libjwt spirv ```sh pkg_add -u -pkg_add cmake nasm git boost unzip--iconv autoconf-2.72p0 bash ffmpeg glslang gmake llvm-19.1.7p3 qt6 jq fmt nlohmann-json enet boost vulkan-utility-libraries vulkan-headers spirv-headers spirv-tools catch2 sdl2 libusb1-1.0.27 +pkg_add cmake nasm git boost unzip--iconv autoconf-2.72p0 bash ffmpeg glslang gmake qt6 jq fmt nlohmann-json enet boost vulkan-utility-libraries vulkan-headers spirv-headers spirv-tools catch2 sdl2 libusb1-1.0.29 ``` [Caveats](./Caveats.md#openbsd). diff --git a/docs/Development.md b/docs/Development.md index 062bc140d9..eb9f4159b5 100644 --- a/docs/Development.md +++ b/docs/Development.md @@ -82,15 +82,15 @@ You may additionally need the `Qt Extension Pack` extension if building Qt. # Build speedup -If you have an HDD, use ramdisk (build in RAM): +If you have an HDD, use ramdisk (build in RAM), approximatedly you need 4GB for a full build with debug symbols: ```sh -sudo mkdir /tmp/ramdisk -sudo chmod 777 /tmp/ramdisk +mkdir /tmp/ramdisk +chmod 777 /tmp/ramdisk # about 8GB needed -sudo mount -t tmpfs -o size=8G myramdisk /tmp/ramdisk +mount -t tmpfs -o size=4G myramdisk /tmp/ramdisk cmake -B /tmp/ramdisk cmake --build /tmp/ramdisk -- -j32 -sudo umount /tmp/ramdisk +umount /tmp/ramdisk ``` # Assets and large files