Created Building for OpenBSD (markdown)
parent
4bfc63e32e
commit
4ad5ae6a8a
|
@ -0,0 +1,43 @@
|
|||
*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 --git a/Source/Core/Common/MemArena.cpp b/Source/Core/Common/MemArena.cpp
|
||||
index 750a240e19..da77328e03 100644
|
||||
--- a/Source/Core/Common/MemArena.cpp
|
||||
+++ b/Source/Core/Common/MemArena.cpp
|
||||
@@ -123,7 +123,7 @@ u8* MemArena::FindMemoryBase()
|
||||
#if _ARCH_32
|
||||
const size_t memory_size = 0x31000000;
|
||||
#else
|
||||
- const size_t memory_size = 0x400000000;
|
||||
+ const size_t memory_size = 0x100000000;
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
```
|
||||
[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
|
||||
```
|
||||
To build, run the following in the repository root directory:
|
||||
```
|
||||
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.
|
||||
+ To improve performance, you may want to add `-DCMAKE_CXX_FLAGS=-Ofast` to the above CMake invocation when building.
|
Loading…
Reference in New Issue