<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.fex-emu.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Crueter</id>
	<title>FEX-Emu Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.fex-emu.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Crueter"/>
	<link rel="alternate" type="text/html" href="https://wiki.fex-emu.com/index.php/Special:Contributions/Crueter"/>
	<updated>2026-05-19T02:12:06Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.0</generator>
	<entry>
		<id>https://wiki.fex-emu.com/index.php?title=Development:Setting_up_FEX&amp;diff=1503</id>
		<title>Development:Setting up FEX</title>
		<link rel="alternate" type="text/html" href="https://wiki.fex-emu.com/index.php?title=Development:Setting_up_FEX&amp;diff=1503"/>
		<updated>2026-01-18T02:08:37Z</updated>

		<summary type="html">&lt;p&gt;Crueter: Add qml6 modules. I hate Debian&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Development]]&lt;br /&gt;
== Build dependencies ==&lt;br /&gt;
=== Debian/Ubuntu dependencies ===&lt;br /&gt;
* git&lt;br /&gt;
* cmake&lt;br /&gt;
* ninja-build&lt;br /&gt;
* pkgconf&lt;br /&gt;
* ccache (Recommended if you're rebuilding constantly)&lt;br /&gt;
* clang&lt;br /&gt;
* llvm&lt;br /&gt;
* lld (For ThinLTO)&lt;br /&gt;
* binfmt-support (For AArch64 binfmt_misc support)&lt;br /&gt;
* libssl-dev&lt;br /&gt;
* python3-setuptools (For build scripts)&lt;br /&gt;
* g++-x86-64-linux-gnu (For building thunks)&lt;br /&gt;
* libgcc-XX-dev-i386-cross (For building thunks, version should match your g++-x86-64-linux-gnu package)&lt;br /&gt;
* libgcc-XX-dev-amd64-cross (For building thunks, version should match your g++-x86-64-linux-gnu package)&lt;br /&gt;
* nasm (only if building tests)&lt;br /&gt;
* python3-clang (for struct verifier)&lt;br /&gt;
* libstdc++-12-dev-i386-cross (for struct verifier)&lt;br /&gt;
* libstdc++-12-dev-amd64-cross (for struct verifier)&lt;br /&gt;
* libstdc++-12-dev-arm64-cross (for struct verifier)&lt;br /&gt;
* squashfs-tools (For squashfs rootfs support)&lt;br /&gt;
* squashfuse (For mounting the squashfs)&lt;br /&gt;
* libc-bin or glibc-tools (For unittests, needs catchsegv from this)&lt;br /&gt;
* libc6-dev-i386-amd64-cross (For FEXLinuxTests)&lt;br /&gt;
* lib32stdc++-XX-dev-amd64-cross (For FEXLinuxTests, version should match your g++-x86-64-linux-gnu package)&lt;br /&gt;
&lt;br /&gt;
For the FEXConfig GUI:&lt;br /&gt;
* qtdeclarative6-dev&lt;br /&gt;
* qml6-module-qtquick-controls&lt;br /&gt;
* qml6-module-qtquick-dialogs&lt;br /&gt;
* qml6-module-qtquick-layouts&lt;br /&gt;
* qml6-module-qtqml-workerscript&lt;br /&gt;
* qml6-module-qtquick-templates&lt;br /&gt;
* qml6-module-qtquick-window&lt;br /&gt;
&lt;br /&gt;
=== Gentoo dependencies ===&lt;br /&gt;
* dev-vcs/git&lt;br /&gt;
* dev-build/cmake&lt;br /&gt;
* dev-build/ninja&lt;br /&gt;
* dev-util/ccache (for speeding up repeated builds)&lt;br /&gt;
* llvm-core/clang&lt;br /&gt;
* llvm-core/lld&lt;br /&gt;
* llvm-core/llvm&lt;br /&gt;
* dev-lang/nasm (for tests)&lt;br /&gt;
* dev-libs/xxhash&lt;br /&gt;
* dev-libs/libfmt &amp;gt;= 11&lt;br /&gt;
* dev-qt/qtbase:6&lt;br /&gt;
* dev-qt/qtdeclarative:6&lt;br /&gt;
* sys-fs/squashfs-tools&lt;br /&gt;
&lt;br /&gt;
'''Use gubbins'''&lt;br /&gt;
* &amp;gt;=media-libs/libglvnd-1.3.4 X&lt;br /&gt;
* dev-qt/qtbase:6 gui widgets&lt;br /&gt;
* sys-fs/squashfs-tools zstd&lt;br /&gt;
&lt;br /&gt;
=== Fedora dependencies ===&lt;br /&gt;
* git&lt;br /&gt;
* cmake&lt;br /&gt;
* ninja-build&lt;br /&gt;
* pkg-config&lt;br /&gt;
* ccache&lt;br /&gt;
* clang&lt;br /&gt;
* lld&lt;br /&gt;
* llvm&lt;br /&gt;
* llvm-devel&lt;br /&gt;
* openssl-devel&lt;br /&gt;
* nasm&lt;br /&gt;
* python3-clang&lt;br /&gt;
* python3-setuptools&lt;br /&gt;
* squashfs-tools&lt;br /&gt;
* squashfuse&lt;br /&gt;
* erofs-fuse&lt;br /&gt;
* erofs-utils&lt;br /&gt;
* qt6-qtdeclarative-devel&lt;br /&gt;
&lt;br /&gt;
== Build Configuration ==&lt;br /&gt;
* Ensure release mode is enabled&lt;br /&gt;
* Disable test building&lt;br /&gt;
* Enable LTO in a release build&lt;br /&gt;
* Enable LLD to make LTO builds faster&lt;br /&gt;
&lt;br /&gt;
  git clone --recurse-submodules https://github.com/FEX-Emu/FEX.git&lt;br /&gt;
  cd FEX&lt;br /&gt;
  mkdir Build&lt;br /&gt;
  cd Build&lt;br /&gt;
  CC=clang CXX=clang++ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DUSE_LINKER=lld -DENABLE_LTO=True -DBUILD_TESTING=False -DENABLE_ASSERTIONS=False -G Ninja ..&lt;br /&gt;
  ninja&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
  sudo ninja install&lt;br /&gt;
&lt;br /&gt;
You can install a binfmt_misc handler for both 32bit and 64bit x86 execution directly from the environment.&lt;br /&gt;
If you already have box86's 32bit binfmt_misc handler installed then make sure to uninstall their's first.&lt;br /&gt;
Make sure to have run install prior to this, otherwise binfmt_misc will install an old handler even if the executable has been updated.&lt;br /&gt;
&lt;br /&gt;
  sudo ninja binfmt_misc&lt;br /&gt;
&lt;br /&gt;
=== Quirks ===&lt;br /&gt;
&lt;br /&gt;
==== binfmt_misc problems ====&lt;br /&gt;
* Double check that binfmt_misc has worked&lt;br /&gt;
** `ls /usr/share/binfmts/FEX*` should return files&lt;br /&gt;
** `ls /var/lib/binfmts/FEX*` should return files&lt;br /&gt;
** `/proc/sys/fs/binfmt_misc/status` should exist&lt;br /&gt;
*** If it doesn't exist then make sure your kernel has `CONFIG_BINFMT_MISC=y`&lt;br /&gt;
*** If it still doesn't exist then make sure systemd isn't disabling it `systemctl enable binfmt-support`&lt;br /&gt;
&lt;br /&gt;
==== DESTDIR quirks ====&lt;br /&gt;
* When using DESTDIR, make sure the path is absolute instead of relative&lt;br /&gt;
** FEX's thunks use subprojects because it needs to cross-compile&lt;br /&gt;
** If DESTDIR is relative then the install paths of the subprojects go to the wrong location&lt;br /&gt;
** Using $(pwd)/install works well&lt;br /&gt;
&lt;br /&gt;
== Runtime Configuration ==&lt;br /&gt;
FEXConfig is the application to use for runtime configuration setup.&lt;br /&gt;
&lt;br /&gt;
CTRL+S saves the configuration.&lt;br /&gt;
&lt;br /&gt;
=== Things to ensure to set ===&lt;br /&gt;
On AArch64 host, a rootfs path is mandatory, while it is optional on x86-64 host&lt;br /&gt;
&lt;br /&gt;
* Core: JIT&lt;br /&gt;
* RootFS&lt;br /&gt;
* Silent Logging (Useful to get FEX information spam out of the way)&lt;br /&gt;
* Block Size (500 is a good default. Optimization passes may break things though)&lt;br /&gt;
&lt;br /&gt;
More Details at: Follow the instructions [[Development:Configuring_FEX|here]]&lt;br /&gt;
&lt;br /&gt;
== RootFS generation ==&lt;br /&gt;
AArch64 hosts require a rootfs for running applications. FEX provides various x86 images that can be installed through [[Development:Setting_up_RootFS#Quick_Setup_with_FEXRootFSFetcher|FEXRootFSFetcher]]&lt;br /&gt;
&lt;br /&gt;
For more detailed instructions see [[Development:Setting_up_RootFS]]&lt;br /&gt;
&lt;br /&gt;
== Setting up library forwarding ==&lt;br /&gt;
&lt;br /&gt;
Follow the instructions [[Development:Setting_up_Library_Forwarding|here]].&lt;br /&gt;
&lt;br /&gt;
== Binaries ==&lt;br /&gt;
* FEX&lt;br /&gt;
** This is the emulator executable used to run x86 programs&lt;br /&gt;
* FEXInterpreter&lt;br /&gt;
** This is a (deprecated) alias for ''FEX'', provided for backwards compatibility&lt;br /&gt;
* FEXConfig&lt;br /&gt;
** Used for configuring emulation from a Qt-based GUI&lt;br /&gt;
* FEXBash&lt;br /&gt;
** Can be useful for starting a bash instance that is running under emulation&lt;br /&gt;
** It's not a chroot! Don't use sudo inside of this environment!&lt;br /&gt;
* FEXMountDaemon&lt;br /&gt;
** This is a mount daemon that will run in the background when you are using a squashfs based rootfs&lt;br /&gt;
** Usually one one instance open at any given moment&lt;br /&gt;
** It usually closes when FEX exits, but not always. See the problems section in setting up a rootfs&lt;br /&gt;
*** Has a ten second timeout window in case a another instance of FEX opens and uses it.&lt;br /&gt;
&lt;br /&gt;
=== Debug binaries ===&lt;br /&gt;
* TestHarnessRunner&lt;br /&gt;
** Used for running FEX's ASM unit tests&lt;br /&gt;
** Runs some binary in a host x86_64 host environment or FEX and checks results&lt;br /&gt;
** Useful for quickly creating ASM based unit tests&lt;br /&gt;
* IRLoader&lt;br /&gt;
** Used for running FEX's IR based unit tests&lt;br /&gt;
** Only runs through FEX and checks the results&lt;br /&gt;
** Minimal number of tests&lt;br /&gt;
* UnitTestGenerator&lt;br /&gt;
** This is supposed to be an x86-64 instruction generator&lt;br /&gt;
** Has an understanding of x86-64 instruction encoding format&lt;br /&gt;
** Generates hundreds of thousands of instructions&lt;br /&gt;
** Used to be used with a lockstep runner to ensure correct behaviour&lt;br /&gt;
** Largely unsupported, avoiding undefined behaviour is difficult and FEX doesn't need to match undefined behaviour&lt;br /&gt;
** Lockstep hostrunner wasn't ever made to be bug free, hard to support&lt;br /&gt;
** Doesn't ensure correct behaviour on AArch64 device&lt;/div&gt;</summary>
		<author><name>Crueter</name></author>
	</entry>
	<entry>
		<id>https://wiki.fex-emu.com/index.php?title=Talk:Development:Setting_up_FEX&amp;diff=1502</id>
		<title>Talk:Development:Setting up FEX</title>
		<link rel="alternate" type="text/html" href="https://wiki.fex-emu.com/index.php?title=Talk:Development:Setting_up_FEX&amp;diff=1502"/>
		<updated>2026-01-13T17:11:43Z</updated>

		<summary type="html">&lt;p&gt;Crueter: Qt 6 is now recommended&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Crueter</name></author>
	</entry>
	<entry>
		<id>https://wiki.fex-emu.com/index.php?title=Development:Setting_up_FEX&amp;diff=1501</id>
		<title>Development:Setting up FEX</title>
		<link rel="alternate" type="text/html" href="https://wiki.fex-emu.com/index.php?title=Development:Setting_up_FEX&amp;diff=1501"/>
		<updated>2026-01-13T17:10:45Z</updated>

		<summary type="html">&lt;p&gt;Crueter: Fedora: recommend Qt 6 over Qt 5&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Development]]&lt;br /&gt;
== Build dependencies ==&lt;br /&gt;
=== Debian/Ubuntu dependencies ===&lt;br /&gt;
* git&lt;br /&gt;
* cmake&lt;br /&gt;
* ninja-build&lt;br /&gt;
* pkgconf&lt;br /&gt;
* ccache (Recommended if you're rebuilding constantly)&lt;br /&gt;
* clang&lt;br /&gt;
* llvm&lt;br /&gt;
* lld (For ThinLTO)&lt;br /&gt;
* binfmt-support (For AArch64 binfmt_misc support)&lt;br /&gt;
* libssl-dev&lt;br /&gt;
* python3-setuptools (For build scripts)&lt;br /&gt;
* g++-x86-64-linux-gnu (For building thunks)&lt;br /&gt;
* libgcc-XX-dev-i386-cross (For building thunks, version should match your g++-x86-64-linux-gnu package)&lt;br /&gt;
* libgcc-XX-dev-amd64-cross (For building thunks, version should match your g++-x86-64-linux-gnu package)&lt;br /&gt;
* nasm (only if building tests)&lt;br /&gt;
* python3-clang (for struct verifier)&lt;br /&gt;
* libstdc++-12-dev-i386-cross (for struct verifier)&lt;br /&gt;
* libstdc++-12-dev-amd64-cross (for struct verifier)&lt;br /&gt;
* libstdc++-12-dev-arm64-cross (for struct verifier)&lt;br /&gt;
* squashfs-tools (For squashfs rootfs support)&lt;br /&gt;
* squashfuse (For mounting the squashfs)&lt;br /&gt;
* libc-bin or glibc-tools (For unittests, needs catchsegv from this)&lt;br /&gt;
* libc6-dev-i386-amd64-cross (For FEXLinuxTests)&lt;br /&gt;
* lib32stdc++-XX-dev-amd64-cross (For FEXLinuxTests, version should match your g++-x86-64-linux-gnu package)&lt;br /&gt;
* qtdeclarative6-dev (For configuration GUI)&lt;br /&gt;
&lt;br /&gt;
=== Gentoo dependencies ===&lt;br /&gt;
* dev-vcs/git&lt;br /&gt;
* dev-build/cmake&lt;br /&gt;
* dev-build/ninja&lt;br /&gt;
* dev-util/ccache (for speeding up repeated builds)&lt;br /&gt;
* llvm-core/clang&lt;br /&gt;
* llvm-core/lld&lt;br /&gt;
* llvm-core/llvm&lt;br /&gt;
* dev-lang/nasm (for tests)&lt;br /&gt;
* dev-libs/xxhash&lt;br /&gt;
* dev-libs/libfmt &amp;gt;= 11&lt;br /&gt;
* dev-qt/qtbase:6&lt;br /&gt;
* dev-qt/qtdeclarative:6&lt;br /&gt;
* sys-fs/squashfs-tools&lt;br /&gt;
&lt;br /&gt;
'''Use gubbins'''&lt;br /&gt;
* &amp;gt;=media-libs/libglvnd-1.3.4 X&lt;br /&gt;
* dev-qt/qtbase:6 gui widgets&lt;br /&gt;
* sys-fs/squashfs-tools zstd&lt;br /&gt;
&lt;br /&gt;
=== Fedora dependencies ===&lt;br /&gt;
* git&lt;br /&gt;
* cmake&lt;br /&gt;
* ninja-build&lt;br /&gt;
* pkg-config&lt;br /&gt;
* ccache&lt;br /&gt;
* clang&lt;br /&gt;
* lld&lt;br /&gt;
* llvm&lt;br /&gt;
* llvm-devel&lt;br /&gt;
* openssl-devel&lt;br /&gt;
* nasm&lt;br /&gt;
* python3-clang&lt;br /&gt;
* python3-setuptools&lt;br /&gt;
* squashfs-tools&lt;br /&gt;
* squashfuse&lt;br /&gt;
* erofs-fuse&lt;br /&gt;
* erofs-utils&lt;br /&gt;
* qt6-qtdeclarative-devel&lt;br /&gt;
&lt;br /&gt;
== Build Configuration ==&lt;br /&gt;
* Ensure release mode is enabled&lt;br /&gt;
* Disable test building&lt;br /&gt;
* Enable LTO in a release build&lt;br /&gt;
* Enable LLD to make LTO builds faster&lt;br /&gt;
&lt;br /&gt;
  git clone --recurse-submodules https://github.com/FEX-Emu/FEX.git&lt;br /&gt;
  cd FEX&lt;br /&gt;
  mkdir Build&lt;br /&gt;
  cd Build&lt;br /&gt;
  CC=clang CXX=clang++ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DUSE_LINKER=lld -DENABLE_LTO=True -DBUILD_TESTING=False -DENABLE_ASSERTIONS=False -G Ninja ..&lt;br /&gt;
  ninja&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
  sudo ninja install&lt;br /&gt;
&lt;br /&gt;
You can install a binfmt_misc handler for both 32bit and 64bit x86 execution directly from the environment.&lt;br /&gt;
If you already have box86's 32bit binfmt_misc handler installed then make sure to uninstall their's first.&lt;br /&gt;
Make sure to have run install prior to this, otherwise binfmt_misc will install an old handler even if the executable has been updated.&lt;br /&gt;
&lt;br /&gt;
  sudo ninja binfmt_misc&lt;br /&gt;
&lt;br /&gt;
=== Quirks ===&lt;br /&gt;
&lt;br /&gt;
==== binfmt_misc problems ====&lt;br /&gt;
* Double check that binfmt_misc has worked&lt;br /&gt;
** `ls /usr/share/binfmts/FEX*` should return files&lt;br /&gt;
** `ls /var/lib/binfmts/FEX*` should return files&lt;br /&gt;
** `/proc/sys/fs/binfmt_misc/status` should exist&lt;br /&gt;
*** If it doesn't exist then make sure your kernel has `CONFIG_BINFMT_MISC=y`&lt;br /&gt;
*** If it still doesn't exist then make sure systemd isn't disabling it `systemctl enable binfmt-support`&lt;br /&gt;
&lt;br /&gt;
==== DESTDIR quirks ====&lt;br /&gt;
* When using DESTDIR, make sure the path is absolute instead of relative&lt;br /&gt;
** FEX's thunks use subprojects because it needs to cross-compile&lt;br /&gt;
** If DESTDIR is relative then the install paths of the subprojects go to the wrong location&lt;br /&gt;
** Using $(pwd)/install works well&lt;br /&gt;
&lt;br /&gt;
== Runtime Configuration ==&lt;br /&gt;
FEXConfig is the application to use for runtime configuration setup.&lt;br /&gt;
&lt;br /&gt;
CTRL+S saves the configuration.&lt;br /&gt;
&lt;br /&gt;
=== Things to ensure to set ===&lt;br /&gt;
On AArch64 host, a rootfs path is mandatory, while it is optional on x86-64 host&lt;br /&gt;
&lt;br /&gt;
* Core: JIT&lt;br /&gt;
* RootFS&lt;br /&gt;
* Silent Logging (Useful to get FEX information spam out of the way)&lt;br /&gt;
* Block Size (500 is a good default. Optimization passes may break things though)&lt;br /&gt;
&lt;br /&gt;
More Details at: Follow the instructions [[Development:Configuring_FEX|here]]&lt;br /&gt;
&lt;br /&gt;
== RootFS generation ==&lt;br /&gt;
AArch64 hosts require a rootfs for running applications. FEX provides various x86 images that can be installed through [[Development:Setting_up_RootFS#Quick_Setup_with_FEXRootFSFetcher|FEXRootFSFetcher]]&lt;br /&gt;
&lt;br /&gt;
For more detailed instructions see [[Development:Setting_up_RootFS]]&lt;br /&gt;
&lt;br /&gt;
== Setting up library forwarding ==&lt;br /&gt;
&lt;br /&gt;
Follow the instructions [[Development:Setting_up_Library_Forwarding|here]].&lt;br /&gt;
&lt;br /&gt;
== Binaries ==&lt;br /&gt;
* FEX&lt;br /&gt;
** This is the emulator executable used to run x86 programs&lt;br /&gt;
* FEXInterpreter&lt;br /&gt;
** This is a (deprecated) alias for ''FEX'', provided for backwards compatibility&lt;br /&gt;
* FEXConfig&lt;br /&gt;
** Used for configuring emulation from a Qt-based GUI&lt;br /&gt;
* FEXBash&lt;br /&gt;
** Can be useful for starting a bash instance that is running under emulation&lt;br /&gt;
** It's not a chroot! Don't use sudo inside of this environment!&lt;br /&gt;
* FEXMountDaemon&lt;br /&gt;
** This is a mount daemon that will run in the background when you are using a squashfs based rootfs&lt;br /&gt;
** Usually one one instance open at any given moment&lt;br /&gt;
** It usually closes when FEX exits, but not always. See the problems section in setting up a rootfs&lt;br /&gt;
*** Has a ten second timeout window in case a another instance of FEX opens and uses it.&lt;br /&gt;
&lt;br /&gt;
=== Debug binaries ===&lt;br /&gt;
* TestHarnessRunner&lt;br /&gt;
** Used for running FEX's ASM unit tests&lt;br /&gt;
** Runs some binary in a host x86_64 host environment or FEX and checks results&lt;br /&gt;
** Useful for quickly creating ASM based unit tests&lt;br /&gt;
* IRLoader&lt;br /&gt;
** Used for running FEX's IR based unit tests&lt;br /&gt;
** Only runs through FEX and checks the results&lt;br /&gt;
** Minimal number of tests&lt;br /&gt;
* UnitTestGenerator&lt;br /&gt;
** This is supposed to be an x86-64 instruction generator&lt;br /&gt;
** Has an understanding of x86-64 instruction encoding format&lt;br /&gt;
** Generates hundreds of thousands of instructions&lt;br /&gt;
** Used to be used with a lockstep runner to ensure correct behaviour&lt;br /&gt;
** Largely unsupported, avoiding undefined behaviour is difficult and FEX doesn't need to match undefined behaviour&lt;br /&gt;
** Lockstep hostrunner wasn't ever made to be bug free, hard to support&lt;br /&gt;
** Doesn't ensure correct behaviour on AArch64 device&lt;/div&gt;</summary>
		<author><name>Crueter</name></author>
	</entry>
	<entry>
		<id>https://wiki.fex-emu.com/index.php?title=Development:Setting_up_FEX&amp;diff=1500</id>
		<title>Development:Setting up FEX</title>
		<link rel="alternate" type="text/html" href="https://wiki.fex-emu.com/index.php?title=Development:Setting_up_FEX&amp;diff=1500"/>
		<updated>2026-01-13T17:09:31Z</updated>

		<summary type="html">&lt;p&gt;Crueter: Debian: recommend Qt 6 instead of Qt 5&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Development]]&lt;br /&gt;
== Build dependencies ==&lt;br /&gt;
=== Debian/Ubuntu dependencies ===&lt;br /&gt;
* git&lt;br /&gt;
* cmake&lt;br /&gt;
* ninja-build&lt;br /&gt;
* pkgconf&lt;br /&gt;
* ccache (Recommended if you're rebuilding constantly)&lt;br /&gt;
* clang&lt;br /&gt;
* llvm&lt;br /&gt;
* lld (For ThinLTO)&lt;br /&gt;
* binfmt-support (For AArch64 binfmt_misc support)&lt;br /&gt;
* libssl-dev&lt;br /&gt;
* python3-setuptools (For build scripts)&lt;br /&gt;
* g++-x86-64-linux-gnu (For building thunks)&lt;br /&gt;
* libgcc-XX-dev-i386-cross (For building thunks, version should match your g++-x86-64-linux-gnu package)&lt;br /&gt;
* libgcc-XX-dev-amd64-cross (For building thunks, version should match your g++-x86-64-linux-gnu package)&lt;br /&gt;
* nasm (only if building tests)&lt;br /&gt;
* python3-clang (for struct verifier)&lt;br /&gt;
* libstdc++-12-dev-i386-cross (for struct verifier)&lt;br /&gt;
* libstdc++-12-dev-amd64-cross (for struct verifier)&lt;br /&gt;
* libstdc++-12-dev-arm64-cross (for struct verifier)&lt;br /&gt;
* squashfs-tools (For squashfs rootfs support)&lt;br /&gt;
* squashfuse (For mounting the squashfs)&lt;br /&gt;
* libc-bin or glibc-tools (For unittests, needs catchsegv from this)&lt;br /&gt;
* libc6-dev-i386-amd64-cross (For FEXLinuxTests)&lt;br /&gt;
* lib32stdc++-XX-dev-amd64-cross (For FEXLinuxTests, version should match your g++-x86-64-linux-gnu package)&lt;br /&gt;
* qtdeclarative6-dev (For configuration GUI)&lt;br /&gt;
&lt;br /&gt;
=== Gentoo dependencies ===&lt;br /&gt;
* dev-vcs/git&lt;br /&gt;
* dev-build/cmake&lt;br /&gt;
* dev-build/ninja&lt;br /&gt;
* dev-util/ccache (for speeding up repeated builds)&lt;br /&gt;
* llvm-core/clang&lt;br /&gt;
* llvm-core/lld&lt;br /&gt;
* llvm-core/llvm&lt;br /&gt;
* dev-lang/nasm (for tests)&lt;br /&gt;
* dev-libs/xxhash&lt;br /&gt;
* dev-libs/libfmt &amp;gt;= 11&lt;br /&gt;
* dev-qt/qtbase:6&lt;br /&gt;
* dev-qt/qtdeclarative:6&lt;br /&gt;
* sys-fs/squashfs-tools&lt;br /&gt;
&lt;br /&gt;
'''Use gubbins'''&lt;br /&gt;
* &amp;gt;=media-libs/libglvnd-1.3.4 X&lt;br /&gt;
* dev-qt/qtbase:6 gui widgets&lt;br /&gt;
* sys-fs/squashfs-tools zstd&lt;br /&gt;
&lt;br /&gt;
=== Fedora dependencies ===&lt;br /&gt;
* git&lt;br /&gt;
* cmake&lt;br /&gt;
* ninja-build&lt;br /&gt;
* pkg-config&lt;br /&gt;
* ccache&lt;br /&gt;
* clang&lt;br /&gt;
* lld&lt;br /&gt;
* llvm&lt;br /&gt;
* llvm-devel&lt;br /&gt;
* openssl-devel&lt;br /&gt;
* nasm&lt;br /&gt;
* python3-clang&lt;br /&gt;
* python3-setuptools&lt;br /&gt;
* squashfs-tools&lt;br /&gt;
* squashfuse&lt;br /&gt;
* erofs-fuse&lt;br /&gt;
* erofs-utils&lt;br /&gt;
* qt5-qtdeclarative-devel&lt;br /&gt;
* qt5-qtquickcontrols&lt;br /&gt;
* qt5-qtquickcontrols2&lt;br /&gt;
&lt;br /&gt;
== Build Configuration ==&lt;br /&gt;
* Ensure release mode is enabled&lt;br /&gt;
* Disable test building&lt;br /&gt;
* Enable LTO in a release build&lt;br /&gt;
* Enable LLD to make LTO builds faster&lt;br /&gt;
&lt;br /&gt;
  git clone --recurse-submodules https://github.com/FEX-Emu/FEX.git&lt;br /&gt;
  cd FEX&lt;br /&gt;
  mkdir Build&lt;br /&gt;
  cd Build&lt;br /&gt;
  CC=clang CXX=clang++ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DUSE_LINKER=lld -DENABLE_LTO=True -DBUILD_TESTING=False -DENABLE_ASSERTIONS=False -G Ninja ..&lt;br /&gt;
  ninja&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
  sudo ninja install&lt;br /&gt;
&lt;br /&gt;
You can install a binfmt_misc handler for both 32bit and 64bit x86 execution directly from the environment.&lt;br /&gt;
If you already have box86's 32bit binfmt_misc handler installed then make sure to uninstall their's first.&lt;br /&gt;
Make sure to have run install prior to this, otherwise binfmt_misc will install an old handler even if the executable has been updated.&lt;br /&gt;
&lt;br /&gt;
  sudo ninja binfmt_misc&lt;br /&gt;
&lt;br /&gt;
=== Quirks ===&lt;br /&gt;
&lt;br /&gt;
==== binfmt_misc problems ====&lt;br /&gt;
* Double check that binfmt_misc has worked&lt;br /&gt;
** `ls /usr/share/binfmts/FEX*` should return files&lt;br /&gt;
** `ls /var/lib/binfmts/FEX*` should return files&lt;br /&gt;
** `/proc/sys/fs/binfmt_misc/status` should exist&lt;br /&gt;
*** If it doesn't exist then make sure your kernel has `CONFIG_BINFMT_MISC=y`&lt;br /&gt;
*** If it still doesn't exist then make sure systemd isn't disabling it `systemctl enable binfmt-support`&lt;br /&gt;
&lt;br /&gt;
==== DESTDIR quirks ====&lt;br /&gt;
* When using DESTDIR, make sure the path is absolute instead of relative&lt;br /&gt;
** FEX's thunks use subprojects because it needs to cross-compile&lt;br /&gt;
** If DESTDIR is relative then the install paths of the subprojects go to the wrong location&lt;br /&gt;
** Using $(pwd)/install works well&lt;br /&gt;
&lt;br /&gt;
== Runtime Configuration ==&lt;br /&gt;
FEXConfig is the application to use for runtime configuration setup.&lt;br /&gt;
&lt;br /&gt;
CTRL+S saves the configuration.&lt;br /&gt;
&lt;br /&gt;
=== Things to ensure to set ===&lt;br /&gt;
On AArch64 host, a rootfs path is mandatory, while it is optional on x86-64 host&lt;br /&gt;
&lt;br /&gt;
* Core: JIT&lt;br /&gt;
* RootFS&lt;br /&gt;
* Silent Logging (Useful to get FEX information spam out of the way)&lt;br /&gt;
* Block Size (500 is a good default. Optimization passes may break things though)&lt;br /&gt;
&lt;br /&gt;
More Details at: Follow the instructions [[Development:Configuring_FEX|here]]&lt;br /&gt;
&lt;br /&gt;
== RootFS generation ==&lt;br /&gt;
AArch64 hosts require a rootfs for running applications. FEX provides various x86 images that can be installed through [[Development:Setting_up_RootFS#Quick_Setup_with_FEXRootFSFetcher|FEXRootFSFetcher]]&lt;br /&gt;
&lt;br /&gt;
For more detailed instructions see [[Development:Setting_up_RootFS]]&lt;br /&gt;
&lt;br /&gt;
== Setting up library forwarding ==&lt;br /&gt;
&lt;br /&gt;
Follow the instructions [[Development:Setting_up_Library_Forwarding|here]].&lt;br /&gt;
&lt;br /&gt;
== Binaries ==&lt;br /&gt;
* FEX&lt;br /&gt;
** This is the emulator executable used to run x86 programs&lt;br /&gt;
* FEXInterpreter&lt;br /&gt;
** This is a (deprecated) alias for ''FEX'', provided for backwards compatibility&lt;br /&gt;
* FEXConfig&lt;br /&gt;
** Used for configuring emulation from a Qt-based GUI&lt;br /&gt;
* FEXBash&lt;br /&gt;
** Can be useful for starting a bash instance that is running under emulation&lt;br /&gt;
** It's not a chroot! Don't use sudo inside of this environment!&lt;br /&gt;
* FEXMountDaemon&lt;br /&gt;
** This is a mount daemon that will run in the background when you are using a squashfs based rootfs&lt;br /&gt;
** Usually one one instance open at any given moment&lt;br /&gt;
** It usually closes when FEX exits, but not always. See the problems section in setting up a rootfs&lt;br /&gt;
*** Has a ten second timeout window in case a another instance of FEX opens and uses it.&lt;br /&gt;
&lt;br /&gt;
=== Debug binaries ===&lt;br /&gt;
* TestHarnessRunner&lt;br /&gt;
** Used for running FEX's ASM unit tests&lt;br /&gt;
** Runs some binary in a host x86_64 host environment or FEX and checks results&lt;br /&gt;
** Useful for quickly creating ASM based unit tests&lt;br /&gt;
* IRLoader&lt;br /&gt;
** Used for running FEX's IR based unit tests&lt;br /&gt;
** Only runs through FEX and checks the results&lt;br /&gt;
** Minimal number of tests&lt;br /&gt;
* UnitTestGenerator&lt;br /&gt;
** This is supposed to be an x86-64 instruction generator&lt;br /&gt;
** Has an understanding of x86-64 instruction encoding format&lt;br /&gt;
** Generates hundreds of thousands of instructions&lt;br /&gt;
** Used to be used with a lockstep runner to ensure correct behaviour&lt;br /&gt;
** Largely unsupported, avoiding undefined behaviour is difficult and FEX doesn't need to match undefined behaviour&lt;br /&gt;
** Lockstep hostrunner wasn't ever made to be bug free, hard to support&lt;br /&gt;
** Doesn't ensure correct behaviour on AArch64 device&lt;/div&gt;</summary>
		<author><name>Crueter</name></author>
	</entry>
	<entry>
		<id>https://wiki.fex-emu.com/index.php?title=Development:Setting_up_FEX&amp;diff=1499</id>
		<title>Development:Setting up FEX</title>
		<link rel="alternate" type="text/html" href="https://wiki.fex-emu.com/index.php?title=Development:Setting_up_FEX&amp;diff=1499"/>
		<updated>2026-01-13T17:03:28Z</updated>

		<summary type="html">&lt;p&gt;Crueter: Gentoo: move USE flags to use gubbins&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Development]]&lt;br /&gt;
== Build dependencies ==&lt;br /&gt;
=== Debian/Ubuntu dependencies ===&lt;br /&gt;
* git&lt;br /&gt;
* cmake&lt;br /&gt;
* ninja-build&lt;br /&gt;
* pkgconf&lt;br /&gt;
* ccache (Recommended if you're rebuilding constantly)&lt;br /&gt;
* clang&lt;br /&gt;
* llvm&lt;br /&gt;
* lld (For ThinLTO)&lt;br /&gt;
* binfmt-support (For AArch64 binfmt_misc support)&lt;br /&gt;
* libssl-dev&lt;br /&gt;
* python3-setuptools (For build scripts)&lt;br /&gt;
* g++-x86-64-linux-gnu (For building thunks)&lt;br /&gt;
* libgcc-XX-dev-i386-cross (For building thunks, version should match your g++-x86-64-linux-gnu package)&lt;br /&gt;
* libgcc-XX-dev-amd64-cross (For building thunks, version should match your g++-x86-64-linux-gnu package)&lt;br /&gt;
* nasm (only if building tests)&lt;br /&gt;
* python3-clang (for struct verifier)&lt;br /&gt;
* libstdc++-12-dev-i386-cross (for struct verifier)&lt;br /&gt;
* libstdc++-12-dev-amd64-cross (for struct verifier)&lt;br /&gt;
* libstdc++-12-dev-arm64-cross (for struct verifier)&lt;br /&gt;
* squashfs-tools (For squashfs rootfs support)&lt;br /&gt;
* squashfuse (For mounting the squashfs)&lt;br /&gt;
* libc-bin or glibc-tools (For unittests, needs catchsegv from this)&lt;br /&gt;
* libc6-dev-i386-amd64-cross (For FEXLinuxTests)&lt;br /&gt;
* lib32stdc++-XX-dev-amd64-cross (For FEXLinuxTests, version should match your g++-x86-64-linux-gnu package)&lt;br /&gt;
* qtdeclarative5-dev (For GUI)&lt;br /&gt;
* qml-module-qtquick-controls (For GUI)&lt;br /&gt;
* qml-module-qtquick-controls2 (For GUI)&lt;br /&gt;
* qml-module-qtquick-dialogs (For GUI)&lt;br /&gt;
&lt;br /&gt;
=== Gentoo dependencies ===&lt;br /&gt;
* dev-vcs/git&lt;br /&gt;
* dev-build/cmake&lt;br /&gt;
* dev-build/ninja&lt;br /&gt;
* dev-util/ccache (for speeding up repeated builds)&lt;br /&gt;
* llvm-core/clang&lt;br /&gt;
* llvm-core/lld&lt;br /&gt;
* llvm-core/llvm&lt;br /&gt;
* dev-lang/nasm (for tests)&lt;br /&gt;
* dev-libs/xxhash&lt;br /&gt;
* dev-libs/libfmt &amp;gt;= 11&lt;br /&gt;
* dev-qt/qtbase:6&lt;br /&gt;
* dev-qt/qtdeclarative:6&lt;br /&gt;
* sys-fs/squashfs-tools&lt;br /&gt;
&lt;br /&gt;
'''Use gubbins'''&lt;br /&gt;
* &amp;gt;=media-libs/libglvnd-1.3.4 X&lt;br /&gt;
* dev-qt/qtbase:6 gui widgets&lt;br /&gt;
* sys-fs/squashfs-tools zstd&lt;br /&gt;
&lt;br /&gt;
=== Fedora dependencies ===&lt;br /&gt;
* git&lt;br /&gt;
* cmake&lt;br /&gt;
* ninja-build&lt;br /&gt;
* pkg-config&lt;br /&gt;
* ccache&lt;br /&gt;
* clang&lt;br /&gt;
* lld&lt;br /&gt;
* llvm&lt;br /&gt;
* llvm-devel&lt;br /&gt;
* openssl-devel&lt;br /&gt;
* nasm&lt;br /&gt;
* python3-clang&lt;br /&gt;
* python3-setuptools&lt;br /&gt;
* squashfs-tools&lt;br /&gt;
* squashfuse&lt;br /&gt;
* erofs-fuse&lt;br /&gt;
* erofs-utils&lt;br /&gt;
* qt5-qtdeclarative-devel&lt;br /&gt;
* qt5-qtquickcontrols&lt;br /&gt;
* qt5-qtquickcontrols2&lt;br /&gt;
&lt;br /&gt;
== Build Configuration ==&lt;br /&gt;
* Ensure release mode is enabled&lt;br /&gt;
* Disable test building&lt;br /&gt;
* Enable LTO in a release build&lt;br /&gt;
* Enable LLD to make LTO builds faster&lt;br /&gt;
&lt;br /&gt;
  git clone --recurse-submodules https://github.com/FEX-Emu/FEX.git&lt;br /&gt;
  cd FEX&lt;br /&gt;
  mkdir Build&lt;br /&gt;
  cd Build&lt;br /&gt;
  CC=clang CXX=clang++ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DUSE_LINKER=lld -DENABLE_LTO=True -DBUILD_TESTING=False -DENABLE_ASSERTIONS=False -G Ninja ..&lt;br /&gt;
  ninja&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
  sudo ninja install&lt;br /&gt;
&lt;br /&gt;
You can install a binfmt_misc handler for both 32bit and 64bit x86 execution directly from the environment.&lt;br /&gt;
If you already have box86's 32bit binfmt_misc handler installed then make sure to uninstall their's first.&lt;br /&gt;
Make sure to have run install prior to this, otherwise binfmt_misc will install an old handler even if the executable has been updated.&lt;br /&gt;
&lt;br /&gt;
  sudo ninja binfmt_misc&lt;br /&gt;
&lt;br /&gt;
=== Quirks ===&lt;br /&gt;
&lt;br /&gt;
==== binfmt_misc problems ====&lt;br /&gt;
* Double check that binfmt_misc has worked&lt;br /&gt;
** `ls /usr/share/binfmts/FEX*` should return files&lt;br /&gt;
** `ls /var/lib/binfmts/FEX*` should return files&lt;br /&gt;
** `/proc/sys/fs/binfmt_misc/status` should exist&lt;br /&gt;
*** If it doesn't exist then make sure your kernel has `CONFIG_BINFMT_MISC=y`&lt;br /&gt;
*** If it still doesn't exist then make sure systemd isn't disabling it `systemctl enable binfmt-support`&lt;br /&gt;
&lt;br /&gt;
==== DESTDIR quirks ====&lt;br /&gt;
* When using DESTDIR, make sure the path is absolute instead of relative&lt;br /&gt;
** FEX's thunks use subprojects because it needs to cross-compile&lt;br /&gt;
** If DESTDIR is relative then the install paths of the subprojects go to the wrong location&lt;br /&gt;
** Using $(pwd)/install works well&lt;br /&gt;
&lt;br /&gt;
== Runtime Configuration ==&lt;br /&gt;
FEXConfig is the application to use for runtime configuration setup.&lt;br /&gt;
&lt;br /&gt;
CTRL+S saves the configuration.&lt;br /&gt;
&lt;br /&gt;
=== Things to ensure to set ===&lt;br /&gt;
On AArch64 host, a rootfs path is mandatory, while it is optional on x86-64 host&lt;br /&gt;
&lt;br /&gt;
* Core: JIT&lt;br /&gt;
* RootFS&lt;br /&gt;
* Silent Logging (Useful to get FEX information spam out of the way)&lt;br /&gt;
* Block Size (500 is a good default. Optimization passes may break things though)&lt;br /&gt;
&lt;br /&gt;
More Details at: Follow the instructions [[Development:Configuring_FEX|here]]&lt;br /&gt;
&lt;br /&gt;
== RootFS generation ==&lt;br /&gt;
AArch64 hosts require a rootfs for running applications. FEX provides various x86 images that can be installed through [[Development:Setting_up_RootFS#Quick_Setup_with_FEXRootFSFetcher|FEXRootFSFetcher]]&lt;br /&gt;
&lt;br /&gt;
For more detailed instructions see [[Development:Setting_up_RootFS]]&lt;br /&gt;
&lt;br /&gt;
== Setting up library forwarding ==&lt;br /&gt;
&lt;br /&gt;
Follow the instructions [[Development:Setting_up_Library_Forwarding|here]].&lt;br /&gt;
&lt;br /&gt;
== Binaries ==&lt;br /&gt;
* FEX&lt;br /&gt;
** This is the emulator executable used to run x86 programs&lt;br /&gt;
* FEXInterpreter&lt;br /&gt;
** This is a (deprecated) alias for ''FEX'', provided for backwards compatibility&lt;br /&gt;
* FEXConfig&lt;br /&gt;
** Used for configuring emulation from a Qt-based GUI&lt;br /&gt;
* FEXBash&lt;br /&gt;
** Can be useful for starting a bash instance that is running under emulation&lt;br /&gt;
** It's not a chroot! Don't use sudo inside of this environment!&lt;br /&gt;
* FEXMountDaemon&lt;br /&gt;
** This is a mount daemon that will run in the background when you are using a squashfs based rootfs&lt;br /&gt;
** Usually one one instance open at any given moment&lt;br /&gt;
** It usually closes when FEX exits, but not always. See the problems section in setting up a rootfs&lt;br /&gt;
*** Has a ten second timeout window in case a another instance of FEX opens and uses it.&lt;br /&gt;
&lt;br /&gt;
=== Debug binaries ===&lt;br /&gt;
* TestHarnessRunner&lt;br /&gt;
** Used for running FEX's ASM unit tests&lt;br /&gt;
** Runs some binary in a host x86_64 host environment or FEX and checks results&lt;br /&gt;
** Useful for quickly creating ASM based unit tests&lt;br /&gt;
* IRLoader&lt;br /&gt;
** Used for running FEX's IR based unit tests&lt;br /&gt;
** Only runs through FEX and checks the results&lt;br /&gt;
** Minimal number of tests&lt;br /&gt;
* UnitTestGenerator&lt;br /&gt;
** This is supposed to be an x86-64 instruction generator&lt;br /&gt;
** Has an understanding of x86-64 instruction encoding format&lt;br /&gt;
** Generates hundreds of thousands of instructions&lt;br /&gt;
** Used to be used with a lockstep runner to ensure correct behaviour&lt;br /&gt;
** Largely unsupported, avoiding undefined behaviour is difficult and FEX doesn't need to match undefined behaviour&lt;br /&gt;
** Lockstep hostrunner wasn't ever made to be bug free, hard to support&lt;br /&gt;
** Doesn't ensure correct behaviour on AArch64 device&lt;/div&gt;</summary>
		<author><name>Crueter</name></author>
	</entry>
	<entry>
		<id>https://wiki.fex-emu.com/index.php?title=Talk:Development:Setting_up_FEX&amp;diff=1489</id>
		<title>Talk:Development:Setting up FEX</title>
		<link rel="alternate" type="text/html" href="https://wiki.fex-emu.com/index.php?title=Talk:Development:Setting_up_FEX&amp;diff=1489"/>
		<updated>2025-12-29T23:12:24Z</updated>

		<summary type="html">&lt;p&gt;Crueter: add talk page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Recommending Qt 6 ==&lt;br /&gt;
&lt;br /&gt;
Some distros are even dropping Qt 5, and Qt 6 in general is just better. Feels like it might be high time to recommend Qt 6 over Qt 5. --[[User:Crueter|Crueter]] ([[User talk:Crueter|talk]]) 23:12, 29 December 2025 (UTC)&lt;/div&gt;</summary>
		<author><name>Crueter</name></author>
	</entry>
	<entry>
		<id>https://wiki.fex-emu.com/index.php?title=Development:Setting_up_FEX&amp;diff=1488</id>
		<title>Development:Setting up FEX</title>
		<link rel="alternate" type="text/html" href="https://wiki.fex-emu.com/index.php?title=Development:Setting_up_FEX&amp;diff=1488"/>
		<updated>2025-12-29T23:09:30Z</updated>

		<summary type="html">&lt;p&gt;Crueter: add missing Gentoo deps + full-qualified names&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Development]]&lt;br /&gt;
== Build dependencies ==&lt;br /&gt;
=== Debian/Ubuntu dependencies ===&lt;br /&gt;
* git&lt;br /&gt;
* cmake&lt;br /&gt;
* ninja-build&lt;br /&gt;
* pkgconf&lt;br /&gt;
* ccache (Recommended if you're rebuilding constantly)&lt;br /&gt;
* clang&lt;br /&gt;
* llvm&lt;br /&gt;
* lld (For ThinLTO)&lt;br /&gt;
* binfmt-support (For AArch64 binfmt_misc support)&lt;br /&gt;
* libssl-dev&lt;br /&gt;
* python-setuptools (For build scripts)&lt;br /&gt;
* g++-x86-64-linux-gnu (For building thunks)&lt;br /&gt;
* libgcc-XX-dev-i386-cross (For building thunks, version should match your g++-x86-64-linux-gnu package)&lt;br /&gt;
* libgcc-XX-dev-amd64-cross (For building thunks, version should match your g++-x86-64-linux-gnu package)&lt;br /&gt;
* nasm (only if building tests)&lt;br /&gt;
* python3-clang (for struct verifier)&lt;br /&gt;
* libstdc++-12-dev-i386-cross (for struct verifier)&lt;br /&gt;
* libstdc++-12-dev-amd64-cross (for struct verifier)&lt;br /&gt;
* libstdc++-12-dev-arm64-cross (for struct verifier)&lt;br /&gt;
* squashfs-tools (For squashfs rootfs support)&lt;br /&gt;
* squashfuse (For mounting the squashfs)&lt;br /&gt;
* libc-bin or glibc-tools (For unittests, needs catchsegv from this)&lt;br /&gt;
* libc6-dev-i386-amd64-cross (For FEXLinuxTests)&lt;br /&gt;
* lib32stdc++-XX-dev-amd64-cross (For FEXLinuxTests, version should match your g++-x86-64-linux-gnu package)&lt;br /&gt;
* qtdeclarative5-dev (For GUI)&lt;br /&gt;
* qml-module-qtquick-controls (For GUI)&lt;br /&gt;
* qml-module-qtquick-controls2 (For GUI)&lt;br /&gt;
* qml-module-qtquick-dialogs (For GUI)&lt;br /&gt;
&lt;br /&gt;
=== Gentoo dependencies ===&lt;br /&gt;
* dev-vcs/git&lt;br /&gt;
* dev-build/cmake&lt;br /&gt;
* dev-build/ninja&lt;br /&gt;
* dev-util/ccache&lt;br /&gt;
* llvm-core/clang&lt;br /&gt;
* llvm-core/lld&lt;br /&gt;
* llvm-core/llvm&lt;br /&gt;
* dev-lang/nasm&lt;br /&gt;
* dev-libs/xxhash&lt;br /&gt;
* dev-libs/libfmt &amp;gt;= 11&lt;br /&gt;
* dev-qt/qtbase:6 (with `gui` and `widgets` USE flags)&lt;br /&gt;
* dev-qt/qtdeclarative:6&lt;br /&gt;
* sys-fs/squashfs-tools (with `zstd` USE flag)&lt;br /&gt;
&lt;br /&gt;
'''Use gubbins'''&lt;br /&gt;
* &amp;gt;=media-libs/libglvnd-1.3.4 X&lt;br /&gt;
&lt;br /&gt;
=== Fedora dependencies ===&lt;br /&gt;
* git&lt;br /&gt;
* cmake&lt;br /&gt;
* ninja-build&lt;br /&gt;
* pkg-config&lt;br /&gt;
* ccache&lt;br /&gt;
* clang&lt;br /&gt;
* lld&lt;br /&gt;
* llvm&lt;br /&gt;
* llvm-devel&lt;br /&gt;
* openssl-devel&lt;br /&gt;
* nasm&lt;br /&gt;
* python3-clang&lt;br /&gt;
* python3-setuptools&lt;br /&gt;
* squashfs-tools&lt;br /&gt;
* squashfuse&lt;br /&gt;
* erofs-fuse&lt;br /&gt;
* erofs-utils&lt;br /&gt;
* qt5-qtdeclarative-devel&lt;br /&gt;
* qt5-qtquickcontrols&lt;br /&gt;
* qt5-qtquickcontrols2&lt;br /&gt;
&lt;br /&gt;
== Build Configuration ==&lt;br /&gt;
* Ensure release mode is enabled&lt;br /&gt;
* Disable test building&lt;br /&gt;
* Enable LTO in a release build&lt;br /&gt;
* Enable LLD to make LTO builds faster&lt;br /&gt;
&lt;br /&gt;
  git clone --recurse-submodules https://github.com/FEX-Emu/FEX.git&lt;br /&gt;
  cd FEX&lt;br /&gt;
  mkdir Build&lt;br /&gt;
  cd Build&lt;br /&gt;
  CC=clang CXX=clang++ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DUSE_LINKER=lld -DENABLE_LTO=True -DBUILD_TESTING=False -DENABLE_ASSERTIONS=False -G Ninja ..&lt;br /&gt;
  ninja&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
  sudo ninja install&lt;br /&gt;
&lt;br /&gt;
You can install a binfmt_misc handler for both 32bit and 64bit x86 execution directly from the environment.&lt;br /&gt;
If you already have box86's 32bit binfmt_misc handler installed then make sure to uninstall their's first.&lt;br /&gt;
Make sure to have run install prior to this, otherwise binfmt_misc will install an old handler even if the executable has been updated.&lt;br /&gt;
&lt;br /&gt;
  sudo ninja binfmt_misc&lt;br /&gt;
&lt;br /&gt;
=== Quirks ===&lt;br /&gt;
&lt;br /&gt;
==== binfmt_misc problems ====&lt;br /&gt;
* Double check that binfmt_misc has worked&lt;br /&gt;
** `ls /usr/share/binfmts/FEX*` should return files&lt;br /&gt;
** `ls /var/lib/binfmts/FEX*` should return files&lt;br /&gt;
** `/proc/sys/fs/binfmt_misc/status` should exist&lt;br /&gt;
*** If it doesn't exist then make sure your kernel has `CONFIG_BINFMT_MISC=y`&lt;br /&gt;
*** If it still doesn't exist then make sure systemd isn't disabling it `systemctl enable binfmt-support`&lt;br /&gt;
&lt;br /&gt;
==== DESTDIR quirks ====&lt;br /&gt;
* When using DESTDIR, make sure the path is absolute instead of relative&lt;br /&gt;
** FEX's thunks use subprojects because it needs to cross-compile&lt;br /&gt;
** If DESTDIR is relative then the install paths of the subprojects go to the wrong location&lt;br /&gt;
** Using $(pwd)/install works well&lt;br /&gt;
&lt;br /&gt;
== Runtime Configuration ==&lt;br /&gt;
FEXConfig is the application to use for runtime configuration setup.&lt;br /&gt;
&lt;br /&gt;
CTRL+S saves the configuration.&lt;br /&gt;
&lt;br /&gt;
=== Things to ensure to set ===&lt;br /&gt;
On AArch64 host, a rootfs path is mandatory, while it is optional on x86-64 host&lt;br /&gt;
&lt;br /&gt;
* Core: JIT&lt;br /&gt;
* RootFS&lt;br /&gt;
* Silent Logging (Useful to get FEX information spam out of the way)&lt;br /&gt;
* Block Size (500 is a good default. Optimization passes may break things though)&lt;br /&gt;
&lt;br /&gt;
More Details at: Follow the instructions [[Development:Configuring_FEX|here]]&lt;br /&gt;
&lt;br /&gt;
== RootFS generation ==&lt;br /&gt;
AArch64 hosts require a rootfs for running applications. FEX provides various x86 images that can be installed through [[Development:Setting_up_RootFS#Quick_Setup_with_FEXRootFSFetcher|FEXRootFSFetcher]]&lt;br /&gt;
&lt;br /&gt;
For more detailed instructions see [[Development:Setting_up_RootFS]]&lt;br /&gt;
&lt;br /&gt;
== Setting up library forwarding ==&lt;br /&gt;
&lt;br /&gt;
Follow the instructions [[Development:Setting_up_Library_Forwarding|here]].&lt;br /&gt;
&lt;br /&gt;
== Binaries ==&lt;br /&gt;
* FEX&lt;br /&gt;
** This is the emulator executable used to run x86 programs&lt;br /&gt;
* FEXInterpreter&lt;br /&gt;
** This is a (deprecated) alias for ''FEX'', provided for backwards compatibility&lt;br /&gt;
* FEXConfig&lt;br /&gt;
** Used for configuring emulation from a Qt-based GUI&lt;br /&gt;
* FEXBash&lt;br /&gt;
** Can be useful for starting a bash instance that is running under emulation&lt;br /&gt;
** It's not a chroot! Don't use sudo inside of this environment!&lt;br /&gt;
* FEXMountDaemon&lt;br /&gt;
** This is a mount daemon that will run in the background when you are using a squashfs based rootfs&lt;br /&gt;
** Usually one one instance open at any given moment&lt;br /&gt;
** It usually closes when FEX exits, but not always. See the problems section in setting up a rootfs&lt;br /&gt;
*** Has a ten second timeout window in case a another instance of FEX opens and uses it.&lt;br /&gt;
&lt;br /&gt;
=== Debug binaries ===&lt;br /&gt;
* TestHarnessRunner&lt;br /&gt;
** Used for running FEX's ASM unit tests&lt;br /&gt;
** Runs some binary in a host x86_64 host environment or FEX and checks results&lt;br /&gt;
** Useful for quickly creating ASM based unit tests&lt;br /&gt;
* IRLoader&lt;br /&gt;
** Used for running FEX's IR based unit tests&lt;br /&gt;
** Only runs through FEX and checks the results&lt;br /&gt;
** Minimal number of tests&lt;br /&gt;
* UnitTestGenerator&lt;br /&gt;
** This is supposed to be an x86-64 instruction generator&lt;br /&gt;
** Has an understanding of x86-64 instruction encoding format&lt;br /&gt;
** Generates hundreds of thousands of instructions&lt;br /&gt;
** Used to be used with a lockstep runner to ensure correct behaviour&lt;br /&gt;
** Largely unsupported, avoiding undefined behaviour is difficult and FEX doesn't need to match undefined behaviour&lt;br /&gt;
** Lockstep hostrunner wasn't ever made to be bug free, hard to support&lt;br /&gt;
** Doesn't ensure correct behaviour on AArch64 device&lt;/div&gt;</summary>
		<author><name>Crueter</name></author>
	</entry>
	<entry>
		<id>https://wiki.fex-emu.com/index.php?title=Development:Setting_up_FEX&amp;diff=1487</id>
		<title>Development:Setting up FEX</title>
		<link rel="alternate" type="text/html" href="https://wiki.fex-emu.com/index.php?title=Development:Setting_up_FEX&amp;diff=1487"/>
		<updated>2025-12-29T23:05:02Z</updated>

		<summary type="html">&lt;p&gt;Crueter: Fix CTRL typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Development]]&lt;br /&gt;
== Build dependencies ==&lt;br /&gt;
=== Debian/Ubuntu dependencies ===&lt;br /&gt;
* git&lt;br /&gt;
* cmake&lt;br /&gt;
* ninja-build&lt;br /&gt;
* pkgconf&lt;br /&gt;
* ccache (Recommended if you're rebuilding constantly)&lt;br /&gt;
* clang&lt;br /&gt;
* llvm&lt;br /&gt;
* lld (For ThinLTO)&lt;br /&gt;
* binfmt-support (For AArch64 binfmt_misc support)&lt;br /&gt;
* libssl-dev&lt;br /&gt;
* python-setuptools (For build scripts)&lt;br /&gt;
* g++-x86-64-linux-gnu (For building thunks)&lt;br /&gt;
* libgcc-XX-dev-i386-cross (For building thunks, version should match your g++-x86-64-linux-gnu package)&lt;br /&gt;
* libgcc-XX-dev-amd64-cross (For building thunks, version should match your g++-x86-64-linux-gnu package)&lt;br /&gt;
* nasm (only if building tests)&lt;br /&gt;
* python3-clang (for struct verifier)&lt;br /&gt;
* libstdc++-12-dev-i386-cross (for struct verifier)&lt;br /&gt;
* libstdc++-12-dev-amd64-cross (for struct verifier)&lt;br /&gt;
* libstdc++-12-dev-arm64-cross (for struct verifier)&lt;br /&gt;
* squashfs-tools (For squashfs rootfs support)&lt;br /&gt;
* squashfuse (For mounting the squashfs)&lt;br /&gt;
* libc-bin or glibc-tools (For unittests, needs catchsegv from this)&lt;br /&gt;
* libc6-dev-i386-amd64-cross (For FEXLinuxTests)&lt;br /&gt;
* lib32stdc++-XX-dev-amd64-cross (For FEXLinuxTests, version should match your g++-x86-64-linux-gnu package)&lt;br /&gt;
* qtdeclarative5-dev (For GUI)&lt;br /&gt;
* qml-module-qtquick-controls (For GUI)&lt;br /&gt;
* qml-module-qtquick-controls2 (For GUI)&lt;br /&gt;
* qml-module-qtquick-dialogs (For GUI)&lt;br /&gt;
&lt;br /&gt;
=== Gentoo dependencies ===&lt;br /&gt;
* dev-vcs/git&lt;br /&gt;
* cmake&lt;br /&gt;
* ninja&lt;br /&gt;
* ccache&lt;br /&gt;
* clang&lt;br /&gt;
* lld&lt;br /&gt;
* nasm&lt;br /&gt;
&lt;br /&gt;
'''Use gubbins'''&lt;br /&gt;
* &amp;gt;=media-libs/libglvnd-1.3.4 X&lt;br /&gt;
&lt;br /&gt;
=== Fedora dependencies ===&lt;br /&gt;
* git&lt;br /&gt;
* cmake&lt;br /&gt;
* ninja-build&lt;br /&gt;
* pkg-config&lt;br /&gt;
* ccache&lt;br /&gt;
* clang&lt;br /&gt;
* lld&lt;br /&gt;
* llvm&lt;br /&gt;
* llvm-devel&lt;br /&gt;
* openssl-devel&lt;br /&gt;
* nasm&lt;br /&gt;
* python3-clang&lt;br /&gt;
* python3-setuptools&lt;br /&gt;
* squashfs-tools&lt;br /&gt;
* squashfuse&lt;br /&gt;
* erofs-fuse&lt;br /&gt;
* erofs-utils&lt;br /&gt;
* qt5-qtdeclarative-devel&lt;br /&gt;
* qt5-qtquickcontrols&lt;br /&gt;
* qt5-qtquickcontrols2&lt;br /&gt;
&lt;br /&gt;
== Build Configuration ==&lt;br /&gt;
* Ensure release mode is enabled&lt;br /&gt;
* Disable test building&lt;br /&gt;
* Enable LTO in a release build&lt;br /&gt;
* Enable LLD to make LTO builds faster&lt;br /&gt;
&lt;br /&gt;
  git clone --recurse-submodules https://github.com/FEX-Emu/FEX.git&lt;br /&gt;
  cd FEX&lt;br /&gt;
  mkdir Build&lt;br /&gt;
  cd Build&lt;br /&gt;
  CC=clang CXX=clang++ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DUSE_LINKER=lld -DENABLE_LTO=True -DBUILD_TESTING=False -DENABLE_ASSERTIONS=False -G Ninja ..&lt;br /&gt;
  ninja&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
  sudo ninja install&lt;br /&gt;
&lt;br /&gt;
You can install a binfmt_misc handler for both 32bit and 64bit x86 execution directly from the environment.&lt;br /&gt;
If you already have box86's 32bit binfmt_misc handler installed then make sure to uninstall their's first.&lt;br /&gt;
Make sure to have run install prior to this, otherwise binfmt_misc will install an old handler even if the executable has been updated.&lt;br /&gt;
&lt;br /&gt;
  sudo ninja binfmt_misc&lt;br /&gt;
&lt;br /&gt;
=== Quirks ===&lt;br /&gt;
&lt;br /&gt;
==== binfmt_misc problems ====&lt;br /&gt;
* Double check that binfmt_misc has worked&lt;br /&gt;
** `ls /usr/share/binfmts/FEX*` should return files&lt;br /&gt;
** `ls /var/lib/binfmts/FEX*` should return files&lt;br /&gt;
** `/proc/sys/fs/binfmt_misc/status` should exist&lt;br /&gt;
*** If it doesn't exist then make sure your kernel has `CONFIG_BINFMT_MISC=y`&lt;br /&gt;
*** If it still doesn't exist then make sure systemd isn't disabling it `systemctl enable binfmt-support`&lt;br /&gt;
&lt;br /&gt;
==== DESTDIR quirks ====&lt;br /&gt;
* When using DESTDIR, make sure the path is absolute instead of relative&lt;br /&gt;
** FEX's thunks use subprojects because it needs to cross-compile&lt;br /&gt;
** If DESTDIR is relative then the install paths of the subprojects go to the wrong location&lt;br /&gt;
** Using $(pwd)/install works well&lt;br /&gt;
&lt;br /&gt;
== Runtime Configuration ==&lt;br /&gt;
FEXConfig is the application to use for runtime configuration setup.&lt;br /&gt;
&lt;br /&gt;
CTRL+S saves the configuration.&lt;br /&gt;
&lt;br /&gt;
=== Things to ensure to set ===&lt;br /&gt;
On AArch64 host, a rootfs path is mandatory, while it is optional on x86-64 host&lt;br /&gt;
&lt;br /&gt;
* Core: JIT&lt;br /&gt;
* RootFS&lt;br /&gt;
* Silent Logging (Useful to get FEX information spam out of the way)&lt;br /&gt;
* Block Size (500 is a good default. Optimization passes may break things though)&lt;br /&gt;
&lt;br /&gt;
More Details at: Follow the instructions [[Development:Configuring_FEX|here]]&lt;br /&gt;
&lt;br /&gt;
== RootFS generation ==&lt;br /&gt;
AArch64 hosts require a rootfs for running applications. FEX provides various x86 images that can be installed through [[Development:Setting_up_RootFS#Quick_Setup_with_FEXRootFSFetcher|FEXRootFSFetcher]]&lt;br /&gt;
&lt;br /&gt;
For more detailed instructions see [[Development:Setting_up_RootFS]]&lt;br /&gt;
&lt;br /&gt;
== Setting up library forwarding ==&lt;br /&gt;
&lt;br /&gt;
Follow the instructions [[Development:Setting_up_Library_Forwarding|here]].&lt;br /&gt;
&lt;br /&gt;
== Binaries ==&lt;br /&gt;
* FEX&lt;br /&gt;
** This is the emulator executable used to run x86 programs&lt;br /&gt;
* FEXInterpreter&lt;br /&gt;
** This is a (deprecated) alias for ''FEX'', provided for backwards compatibility&lt;br /&gt;
* FEXConfig&lt;br /&gt;
** Used for configuring emulation from a Qt-based GUI&lt;br /&gt;
* FEXBash&lt;br /&gt;
** Can be useful for starting a bash instance that is running under emulation&lt;br /&gt;
** It's not a chroot! Don't use sudo inside of this environment!&lt;br /&gt;
* FEXMountDaemon&lt;br /&gt;
** This is a mount daemon that will run in the background when you are using a squashfs based rootfs&lt;br /&gt;
** Usually one one instance open at any given moment&lt;br /&gt;
** It usually closes when FEX exits, but not always. See the problems section in setting up a rootfs&lt;br /&gt;
*** Has a ten second timeout window in case a another instance of FEX opens and uses it.&lt;br /&gt;
&lt;br /&gt;
=== Debug binaries ===&lt;br /&gt;
* TestHarnessRunner&lt;br /&gt;
** Used for running FEX's ASM unit tests&lt;br /&gt;
** Runs some binary in a host x86_64 host environment or FEX and checks results&lt;br /&gt;
** Useful for quickly creating ASM based unit tests&lt;br /&gt;
* IRLoader&lt;br /&gt;
** Used for running FEX's IR based unit tests&lt;br /&gt;
** Only runs through FEX and checks the results&lt;br /&gt;
** Minimal number of tests&lt;br /&gt;
* UnitTestGenerator&lt;br /&gt;
** This is supposed to be an x86-64 instruction generator&lt;br /&gt;
** Has an understanding of x86-64 instruction encoding format&lt;br /&gt;
** Generates hundreds of thousands of instructions&lt;br /&gt;
** Used to be used with a lockstep runner to ensure correct behaviour&lt;br /&gt;
** Largely unsupported, avoiding undefined behaviour is difficult and FEX doesn't need to match undefined behaviour&lt;br /&gt;
** Lockstep hostrunner wasn't ever made to be bug free, hard to support&lt;br /&gt;
** Doesn't ensure correct behaviour on AArch64 device&lt;/div&gt;</summary>
		<author><name>Crueter</name></author>
	</entry>
</feed>