From 6307a70b30fb8829dbd7671cc307262da2f2b9d3 Mon Sep 17 00:00:00 2001 From: Guilherme Janczak Date: Fri, 3 May 2024 00:13:00 +0000 Subject: [PATCH] Update OpenBSD build instructions following https://github.com/dolphin-emu/dolphin/pull/12716 --- Building-for-OpenBSD.md | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/Building-for-OpenBSD.md b/Building-for-OpenBSD.md index 9bada86..d34c417 100644 --- a/Building-for-OpenBSD.md +++ b/Building-for-OpenBSD.md @@ -1,7 +1,7 @@ *OpenBSD is not officially supported. These instructions are not actively updated and represent what happened to work for one user on amd64 in March 2018.* *Games do not currently work on OpenBSD/amd64 due to [bug 10926][1]. Until/unless a better solution is devised, users can apply a patch like the following to get past the bug:* -``` +```diff diff --git a/Source/Core/Common/MemArena.cpp b/Source/Core/Common/MemArena.cpp index 750a240e19..da77328e03 100644 --- a/Source/Core/Common/MemArena.cpp @@ -18,25 +18,14 @@ index 750a240e19..da77328e03 100644 ``` [1]: https://bugs.dolphin-emu.org/issues/10926 -Install the required packages: (Please amend if some are missing, I did not test this on a clean installation!) -``` -pkg_add cmake pulseaudio qtbase +Install the required packages. Keep in mind this is an incomplete list for a maximal build, the actual list of dependencies may be smaller depending on which features are enabled. Please amend as needed: +```console +# pkg_add bzip2 cmake curl enet gtest libhidapi libiconv libxkbcommon mbedtls miniupnpc ninja pulseaudio pugixml qtbase sdl2 sfml speexdsp zstd ``` To build, run the following in the repository root directory: +```console +$ cmake -G Ninja -B build && cmake --build build -j$(getconf NPROCESSORS_ONLN) ``` -mkdir build && cd build -export Qt5Gui_DIR=/usr/local/lib/qt5/cmake/Qt5Gui -export Qt5Widgets_DIR=/usr/local/lib/qt5/cmake/Qt5Widgets -cmake \ - -DCMAKE_EXE_LINKER_FLAGS='-L/usr/local/lib -lintl -z wxneeded' \ - -DENABLE_WX=OFF .. -make -``` -Rationale: -+ Setting `Qt5Gui_DIR` and `Qt5Widgets_DIR` is necessary because CMake does not know to look for them under `/usr/local/lib/qt5/cmake` by default. -+ PulseAudio wants to link with libintl, but it is not included in the default configuration. -+ Linking with `-z wxneeded` is needed to enable writable-executable memory on OpenBSD. The resulting binary still needs to be run a partition with `wxallowed` set in the mount flags; `/usr/local` is mounted like this by default. -+ wxWidgets needs to be disabled because wxWidgets3 has not been ported to OpenBSD yet. The experimental Qt interface is the only working GUI. Other considerations: + Dolphin needs a lot of memory to run - more than OpenBSD's default limits allow. Increase the `datasize` limits for your login class to at least 4G in `/etc/login.conf`, or (assuming your login class's `datasize-max` limit permits this) run `ulimit -d 4194304` before running Dolphin, e.g. in your `~/.profile` file or in a Dolphin startup script.