#9091·ladybird

BSD system support issue list

Author: cqundefineCreated Apr 25, 2026Updated Sep 15, 2026

There are a bunch of issues regarding support for BSD systems and new ones keep appearing. I'm making this issue to keep track of every single problem that I know of regarding those systems, this list is probably quite incomplete.

FreeBSD (this one is the least problematic):

  • libvpx doesn't build by default which requires a flags workaround or disabling the FFmpeg features, should be fixed on vcpkg (this will be fixed by microsoft/vcpkg#51382, needs a vcpkg baseline bump)
  • TestFunctionObjC doesn't launch because of a missing symbol (will get disabled on non Apple systems after #9013 gets merged)
  • Wrong JPEG library version: library is 62, caller expects 80, this seems to get caused by the fact that the compiler picks up the system headers instead of the vcpkg headers, and on FreeBSD the JPEG_LIB_VERSION is 80, while our build is 62 (I found the issue to be caused by our LibDRM include path, it's the system include path which takes priority over the vcpkg include path, should use the -idirafter compiler flag)
  • A bunch of canvas tests fail or crash (the crashes might be related to the previous point)
  • Even more random tests fail and timeout when building using the Sanitizer preset
  • vcpkg expects the standard Linux unzip command which has a different syntax than the bsdunzip present on FreeBSD
  • transfer_file_through_socket should also use sendfile on FreeBSD instead of sending the file contents
  • WASM_COMPILED_FAULT_RECOVERY_SUPPORTED is not enabled on FreeBSD

OpenBSD (once it builds and runs it actually works, but it's a challenge to get it to that point):

  • We are missing our custom overlay triplets for OpenBSD
  • OpenBSD's dynamic linker has issues with RPATH/RUNPATH containing $ORIGIN (pretty sure it doesn't support it at all), so shared libraries don't work in our setup (especially because of vcpkg)
  • OpenBSD 7.7 ships with a very poor implementation of pkg-config which causes issues when used with vcpkg, we would need to make 7.8 a requirement which should be fine
  • OpenBSD's ports systems ships a modified CMake which doesn't create namelinks (links to shared libraries without a version in their names) which causes issues with vcpkg (another reason to block shared libraries on OpenBSD)
  • Format.cpp doesn't know how to get the thread ID on OpenBSD, while not strictly required, it would be a nice improvement
  • OpenBSD doesn't have pthread_getname_np, we should use pthread_get_name_np
  • WASM_COMPILED_FAULT_RECOVERY_SUPPORTED is not enabled on OpenBSD
  • vcpkg fails to find libcurl on OpenBSD, that's because OpenBSD versions libcurl differently and while vcpkg looks for the standard libcurl.so.4 on OpenBSD the equivalent is libcurl.so.26.34 (at least at the time of writing, the second number jumps with every curl update)
  • The ninja version currently in the ports system is too old for vcpkg (in practice it doesn't really matter), the easiest fix is to set VCPKG_FORCE_SYSTEM_BINARIES=1
  • liblzma build errors out in /usr/include/sys/sysctl.h....? This can be manually fixed by modyfing system headers (including sys/types.h in sys/sysctl.h), but that's obviously not the correct fix. The OpenBSD ports system doesn't patch this port at all so I'm not sure what's the problem, probably vcpkg does something "incorrectly"
  • The ports sytem ships autoconf and automake wrappers that want AUTOCONF_VERSION and AUTOMAKE_VERSION environment variables to be defined
  • rustup does not provide binaries for OpenBSD, that needs a note in build instructions
  • OpenBSD specific build instructions need to be written
  • LibThreading/Thread.cpp needs a <pthread_np.h> include
  • BytecodeInterpreter.cpp unconditionally includes <ucontext.h> which is not a thing on OpenBSD and isn't used if WASM_COMPILED_FAULT_RECOVERY_SUPPORTED is not set
  • current_executable_path does not have an implementation on OpenBSD, it needs a hacky implementation to guess the path based on argv[0] and the PATH environment variable, yes that is the only way to do that on OpenBSD
  • The linker gives warnings about functions used by our dependencies often being misused, this is harmless and we can't really do anything about it, probably should get a note somewhere
  • We should consider using some system libraries like fontconfig or libressl as they are not packages like on Linux but rather a part of OpenBSD itself
  • OpenBSD doesn't have interprocess mutexes which causes a compile error on a missing pthread function

NetBSD (also very difficult to get it to build, tends to crash and is barely usable when you actually get it to run):

  • We are missing our custom overlay triplets for NetBSD
  • Some compilers shipped on NetBSD use a broken C++ standard library which causes any method in math.h to not work (the C++ standard library is supposed to ship it's own version of math.h that should take precedence over the C standard library, yet in some cases the C++ version of math.h is missing), we should add a check to make sure it's not the case and error out if it is
  • Format.cpp doesn't know how to get the thread ID on NetBSD, while not strictly required, it would be a nice improvement
  • NetBSD doesn't ship an unversioned python3 binary by default (?), which causes vcpkg to not be able to find a python install
  • WASM_COMPILED_FAULT_RECOVERY_SUPPORTED is not enabled on NetBSD
  • Build instructions need to be written
  • LibThreading/Thread.cpp needs a <pthread_np.h> include (?)
  • vcpkg doesn't find libcurl on NetBSD, NetBSD curl (installed through pkgin) does have a libcurl.so.4 but it's in /usr/pkg/lib which doesn't seem to be in the default library path
  • openssl vcpkg package needs to be updated so it builds properly
  • ffmpeg vcpkg package needs to be updated so it builds properly
  • The only usable compiler that doesn't get affected by the math.h issue is gcc14 (from pkgin), probably should get a note somewhere
  • The fact that we require a system compiler (it gets installed in /usr/pkg/gcc14) means that the standard libraries (like libstdc++) it requires are not in the global dynamic linker path and since vcpkg overrides RPATH it causes issues.
  • There's no gn in the ports repository (pkgsrc) (?) so you need to build it yourself
  • You need to define _PTHREAD_PSHARED to get access to the pthread_mutexattr_setpshared function on NetBSD, we probably shouldn't be using it anyways as NetBSD man pages note that it's quite limited
  • Every HTTPS request fails with Error: Request finished with error: SSL handshake failed
  • Almost immediately WebContent segmentation faults in GC::Heap::gather_conservative_roots

General:

  • For time zone watching the mechanism is the same on all BSD systems as it is on Linux, but we need file watching for that, while it works on FreeBSD 15 because that now has inotify which means we can share the implementation with Linux, for other systems we need a kqueue based file watcher (TODO: Investigate if kqueue can even supply us with what we need)
  • Process statistics are unimplemented for all BSD operating systems

Source: LadybirdBrowser/ladybird