diff --git a/docs/Caveats.md b/docs/Caveats.md index 39b5ab15e6..d554f3ff77 100644 --- a/docs/Caveats.md +++ b/docs/Caveats.md @@ -91,7 +91,7 @@ After configuration, you may need to modify `externals/ffmpeg/CMakeFiles/ffmpeg- `-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. -If clang has errors, try using `g++-11`. +If clang has errors, try using `g++11`. ## FreeBSD @@ -107,6 +107,8 @@ hw.usb.usbhid.enable="0" ## NetBSD +2026-02-07: `vulkan-headers` must not be installed, since the version found in `pkgsrc` is older than required. Either wait for binary packages to update or build newer versions from source. + Install `pkgin` if not already `pkg_add pkgin`, see also the general [pkgsrc guide](https://www.netbsd.org/docs/pkgsrc/using.html). For NetBSD 10.1 provide `echo 'PKG_PATH="https://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/10.1/All/"' >/etc/pkg_install.conf`. If `pkgin` is taking too much time consider adding the following to `/etc/rc.conf`: ```sh @@ -116,7 +118,7 @@ ip6addrctl_policy=ipv4_prefer System provides a default `g++-10` which doesn't support the current C++ codebase; install `clang-19` with `pkgin install clang-19`. Or install `gcc14` (or `gcc15` with current pkgsrc). Provided that, the following CMake commands may work: -- `cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -Bbuild` +- `cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -Bbuild` (Recommended) - `cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/pkg/gcc14/bin/gcc -DCMAKE_CXX_COMPILER=/usr/pkg/gcc14/bin/g++ -Bbuild` - `cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/pkg/gcc15/bin/gcc -DCMAKE_CXX_COMPILER=/usr/pkg/gcc15/bin/g++ -Bbuild` @@ -138,8 +140,12 @@ cmake --install build However, pkgsrc is highly recommended, see [getting pkgsrc](https://iso.us.netbsd.org/pub/pkgsrc/current/pkgsrc/doc/pkgsrc.html#getting). You must get `current` not the `2025Q2` version. +`QtCore` on NetBSD is included, but due to misconfigurations(!) we MUST include one of the standard headers that include `bits/c++config.h`, since source_location (required by `QtCore`) isn't properly configured to intake `bits/c++config.h` (none of the experimental library is). This is a bug with NetBSD packaging and not our fault, but alas. + ## DragonFlyBSD +2026-02-07: `vulkan-headers` and `vulkan-utility-libraries` must NOT be uninstalled, since they're too old: `1.3.289`. Either wait for binary packages to update or build newer versions from source. + If `libstdc++.so.6` is not found (`GLIBCXX_3.4.30`) then attempt: ```sh diff --git a/src/common/thread.cpp b/src/common/thread.cpp index eac0f60131..b0b63ae35c 100644 --- a/src/common/thread.cpp +++ b/src/common/thread.cpp @@ -19,10 +19,12 @@ #include #include "common/string_util.h" #else -#if defined(__Bitrig__) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__OpenBSD__) +#if defined(__FreeBSD__) #include #include #include +#elif defined(__DragonFly__) || defined(__OpenBSD__) || defined(__Bitrig__) +#include #endif #include #include diff --git a/src/qt_common/CMakeLists.txt b/src/qt_common/CMakeLists.txt index 65f5b1ee2b..11ec6c4b14 100644 --- a/src/qt_common/CMakeLists.txt +++ b/src/qt_common/CMakeLists.txt @@ -87,7 +87,10 @@ if (NOT APPLE AND ENABLE_OPENGL) endif() if (UNIX AND NOT APPLE) - if (DEFINED Qt6Gui_PRIVATE_INCLUDE_DIRS) + if (PLATFORM_NETBSD) + # QtGui6 has improper pkg-config configuration under NetBSD + target_include_directories(qt_common PRIVATE "${CMAKE_SYSROOT}/usr/pkg/qt6/include/QtGui/6.10.1/QtGui") + elseif (DEFINED Qt6Gui_PRIVATE_INCLUDE_DIRS) target_include_directories(qt_common PRIVATE ${Qt6Gui_PRIVATE_INCLUDE_DIRS}) else() target_link_libraries(qt_common PRIVATE Qt6::GuiPrivate) diff --git a/src/video_core/host_shaders/CMakeLists.txt b/src/video_core/host_shaders/CMakeLists.txt index 60b399ccba..668f939546 100644 --- a/src/video_core/host_shaders/CMakeLists.txt +++ b/src/video_core/host_shaders/CMakeLists.txt @@ -118,6 +118,8 @@ if (NOT GLSLANG_ERROR STREQUAL "") set(QUIET_FLAG "") endif() +# Shader files must depend on their directory otherwise *BSD make will spontaneously combust +file(MAKE_DIRECTORY "${SHADER_DIR}") foreach(SOURCE_FILE IN ITEMS ${SHADER_FILES}) get_filename_component(FILENAME ${SOURCE_FILE} NAME) string(REPLACE "." "_" SHADER_NAME ${FILENAME}) @@ -133,6 +135,7 @@ foreach(SOURCE_FILE IN ITEMS ${SHADER_FILES}) ${SOURCE_FILE} DEPENDS ${INPUT_FILE} + ${SHADER_DIR} # HEADER_GENERATOR should be included here but msbuild seems to assume it's always modified ) set(SHADER_HEADERS ${SHADER_HEADERS} ${SOURCE_HEADER_FILE}) @@ -148,6 +151,8 @@ foreach(SOURCE_FILE IN ITEMS ${SHADER_FILES}) ${GLSLANGVALIDATOR} -V ${QUIET_FLAG} -I"${FIDELITYFX_INCLUDE_DIR}" ${GLSL_FLAGS} --variable-name ${SPIRV_VARIABLE_NAME} -o ${SPIRV_HEADER_FILE} ${SOURCE_FILE} --target-env ${SPIR_V_VERSION} MAIN_DEPENDENCY ${SOURCE_FILE} + DEPENDS + ${SHADER_DIR} ) set(SHADER_HEADERS ${SHADER_HEADERS} ${SPIRV_HEADER_FILE}) endif() @@ -167,6 +172,7 @@ foreach(FILEPATH IN ITEMS ${FIDELITYFX_FILES}) ${SOURCE_FILE} DEPENDS ${INPUT_FILE} + ${SHADER_DIR} # HEADER_GENERATOR should be included here but msbuild seems to assume it's always modified ) set(SHADER_HEADERS ${SHADER_HEADERS} ${SOURCE_HEADER_FILE})