-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Building for OpenBSD
Guilherme Janczak edited this page May 3, 2024
·
3 revisions
OpenBSD is not officially supported. These instructions are not actively updated and represent what happened to work as recently as May 2024 on OpenBSD 7.5 amd64.
Games do not currently work on OpenBSD/amd64 due to bug 10926. 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
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:
# 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:
$ cmake -G Ninja -B build && cmake --build build -j$(getconf NPROCESSORS_ONLN)
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'sdatasize-max
limit permits this) runulimit -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.
Homepage | Project Site | Forums | Wiki | Issue Tracker | Coding Style | Transifex Page