Update OpenBSD build instructions following https://github.com/dolphin-emu/dolphin/pull/12716

Guilherme Janczak 2024-05-03 00:13:00 +00:00
parent 3eca54d609
commit 6307a70b30

@ -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.