Rpcs3: ci: FreeBSD

Created on 28 Mar 2020  路  2Comments  路  Source: RPCS3/rpcs3

CirrusCI has support for FreeBSD, I couldn't find any other CI solutions with FreeBSD support
https://cirrus-ci.org/guide/FreeBSD/

This could be a good idea to have, in order to prevent breaking RPCS3 in BSD (FreeBSD at least) by accident in the future as it already happened a few times. If too slow compared to the other CI builds, it can be made to be a non-blocking status in order not to bottleneck PR merge times.

Tagging @jbeich

Discussion BSD

Most helpful comment

Random notes:

  • 896d16ec7b86 broke build with Qt 5.13 but 5.14 hasn't landed yet, see workaround. After landing the binary package would only be in /latest set until a new /quarterly is cut (around Jan 1, Apr 1, Jul 1, Oct 1). A quick way to switch: sed -i.bak 's/quarterly/latest/' /etc/pkg/FreeBSD.conf
  • 64ed2f1151e7 broke build with libc++ 8 which is part of base system on FreeBSD 11.3/12.1, see workaround. Newer FreeBSD versions are not affected. libstdc++ from GCC is not supported because Qt5 is built with libc++, so mixing libc++ and libstdc++ would either break build or lead to a crash.
  • 9569ae24e01f + 7b54d386f221 forces Clang 9 but Clang 8 is default on FreeBSD 11.3/12.1, see workaround. Newer FreeBSD versions are not affected.. If necessary llvm90 or llvm10 can be installed to get newer Clang.
  • Building without -DUSE_SYSTEM_FFMPEG=on is not supported yet due to missing binaries. PPSSPP is in the same boat. Only important if you plan to distribute prebuilt RPCS3 for FreeBSD outside of system packages or if RPCS3 fails to build against new major FFmpeg release for a long time.

Example clean build:

$ pkg install git
$ git clone --recurse-submodules https://github.com/RPCS3/rpcs3

# Mandatory dependencies (qt5-dbus and qt5-gui are pulled via qt5-widgets)
$ pkg install cmake ninja qt5-qmake qt5-buildtools qt5-widgets qt5-concurrent glew openal-soft ffmpeg

# Optional dependencies (libevdev is pulled by qt5-gui)
$ pkg install pkgconf alsa-lib pulseaudio sdl2 evdev-proto vulkan-headers vulkan-loader

# Apply workarounds for old dependencies
$ fetch -qo- https://github.com/freebsd/freebsd-ports/raw/008242281e2b/emulators/rpcs3/files/patch-qt-5.13 | patch -Efsp0 -d rpcs3
$ fetch -qo- https://github.com/freebsd/freebsd-ports/raw/008242281e2b/emulators/rpcs3/files/patch-libc%2B%2B8 | patch -Efsp0 -d rpcs3
$ fetch -qo- https://github.com/freebsd/freebsd-ports/raw/008242281e2b/emulators/rpcs3/files/patch-CMakeLists.txt | patch -Efsp0 -d rpcs3

# Actual build
$ mkdir rpcs3_build
$ cmake -DUSE_SYSTEM_FFMPEG=ON -G Ninja -B rpcs3_build rpcs3
$ ninja -C rpcs3_build

All 2 comments

Can this get assigned to me? I'll probably do this in the future.

Random notes:

  • 896d16ec7b86 broke build with Qt 5.13 but 5.14 hasn't landed yet, see workaround. After landing the binary package would only be in /latest set until a new /quarterly is cut (around Jan 1, Apr 1, Jul 1, Oct 1). A quick way to switch: sed -i.bak 's/quarterly/latest/' /etc/pkg/FreeBSD.conf
  • 64ed2f1151e7 broke build with libc++ 8 which is part of base system on FreeBSD 11.3/12.1, see workaround. Newer FreeBSD versions are not affected. libstdc++ from GCC is not supported because Qt5 is built with libc++, so mixing libc++ and libstdc++ would either break build or lead to a crash.
  • 9569ae24e01f + 7b54d386f221 forces Clang 9 but Clang 8 is default on FreeBSD 11.3/12.1, see workaround. Newer FreeBSD versions are not affected.. If necessary llvm90 or llvm10 can be installed to get newer Clang.
  • Building without -DUSE_SYSTEM_FFMPEG=on is not supported yet due to missing binaries. PPSSPP is in the same boat. Only important if you plan to distribute prebuilt RPCS3 for FreeBSD outside of system packages or if RPCS3 fails to build against new major FFmpeg release for a long time.

Example clean build:

$ pkg install git
$ git clone --recurse-submodules https://github.com/RPCS3/rpcs3

# Mandatory dependencies (qt5-dbus and qt5-gui are pulled via qt5-widgets)
$ pkg install cmake ninja qt5-qmake qt5-buildtools qt5-widgets qt5-concurrent glew openal-soft ffmpeg

# Optional dependencies (libevdev is pulled by qt5-gui)
$ pkg install pkgconf alsa-lib pulseaudio sdl2 evdev-proto vulkan-headers vulkan-loader

# Apply workarounds for old dependencies
$ fetch -qo- https://github.com/freebsd/freebsd-ports/raw/008242281e2b/emulators/rpcs3/files/patch-qt-5.13 | patch -Efsp0 -d rpcs3
$ fetch -qo- https://github.com/freebsd/freebsd-ports/raw/008242281e2b/emulators/rpcs3/files/patch-libc%2B%2B8 | patch -Efsp0 -d rpcs3
$ fetch -qo- https://github.com/freebsd/freebsd-ports/raw/008242281e2b/emulators/rpcs3/files/patch-CMakeLists.txt | patch -Efsp0 -d rpcs3

# Actual build
$ mkdir rpcs3_build
$ cmake -DUSE_SYSTEM_FFMPEG=ON -G Ninja -B rpcs3_build rpcs3
$ ninja -C rpcs3_build
Was this page helpful?
0 / 5 - 0 ratings

Related issues

LokiGrants picture LokiGrants  路  3Comments

Emulator-Team-2 picture Emulator-Team-2  路  3Comments

Luffykun007 picture Luffykun007  路  3Comments

JohnGodgames picture JohnGodgames  路  3Comments

altiereslima picture altiereslima  路  3Comments