Compiling FET for macOS

Started by Darren McDonald, March 08, 2026, 09:40:56 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Darren McDonald

Way back in 2016, I finally got around to diving in to try compiling FET on the Mac (partly just for fun, but also in order to hopefully solve a few minor bugs that had appeared on the most recently available Mac executable at the time—happily, those bugs are now gone!).

I am by no means a programmer, so I thought it might be helpful to list the steps required to compile FET on a Mac (from essentially a clean install), for anyone else with limited programming experience who's interested in trying to compile FET for the Mac.

The instructions below are written for the current version of FET (7.8.0) and the current version of Qt (6.10.2), and assume that both Qt and the downloaded FET folder are located in their default locations, /Users/YOURUSERNAME/Qt for Qt and /Users/YOURUSERNAME/Downloads for FET. (Replace YOURUSERNAME with your actual username.) Of course, you will also need to update the version numbers in the commands below as FET and Qt are updated. These instructions are current as of 2026, and I'll try to update these instructions when necessary.

1. Install Xcode from the Mac App Store. (Once installed, you'll need to open the Xcode app to finish the installation.)

2. Install Qt from https://www.qt.io. The default install location is /Users/YOURUSERNAME/Qt, and you can create a (free) Qt account, or just skip past that screen. If you're just using Qt for FET, you should select to "download for open source".

3. Install CMake from from https://cmake.org/download/.

4. Download the latest version of the FET source files from https://lalescu.ro/liviu/fet/download.html. The default download location is /Users/YOURUSERNAME/Downloads, and you'll need to double-click the downloaded xz file to create the folder of files needed to compile.

5. Open CMake, and in the first field ("Where is the source code:") select

/Users/YOURUSERNAME/Downloads/fet-7.8.0

For "Where to build the binaries:" (this is where the compiled FET version will be located) I set this to a new folder on my desktop named fet, so here I'd enter

/Users/YOURUSERNAME/Desktop/fet

Now select the Configure button. You'll be prompted for permission to create the desktop FET folder. You'll also be asked to select the generator (select Unix Makefiles, which is the default value) and then you'll see a number of fields highlighted in red. The next step involve setting those fields correctly.


6. You now need to set a number of CMake settings to the correct value. There's a checkbox in the list of CMake settings to allow you to select USE_SYSTEM_LOCALE. This should automatically install the relevant language files to use FET in your region's default language. (I don't do this, as I install support for all available languages, and instructions for including all language files are included below.)

Locate Qt6 for CMake, by setting Qt6_DIR to

/Users/YOURUSERNAME/Qt/6.10.2/macos/lib/cmake/Qt6

If you're only running FET on the computer you're using to compile, you can skip ahead to step 7. If you want to compile a version of FET that can be run on other computers, continue with the other CMake settings below.

To make a universal binary (that runs on ARM and Intel processors), set CMAKE_OSX_ARCHITECTURES to

x86_64;arm64

To set the minimum macOS version that is supported (older OS versions may complain the compiled app is too new if this isn't set), set CMAKE_OSX_DEPLOYMENT_TARGET to

13.0

7. To update the fields in CMake, press the Configure button twice, and all of the red highlighting should disappear. Then select the Generate button. Now you are finished with CMake.

8. Open the Terminal app and type the commands listed below, replacing YOURUSERNAME with the username of your Mac account (as above, it's the string between "~" and "$" in the Terminal app). You will need to press enter after you type each of the commands below.

cd /Users/YOURUSERNAME/Desktop/fet

make -j 4

Now you'll need to wait—around 2 minutes on a 2023 MacBook Mini M2 Pro. Faster results may be possible by using, for example, make -j 8 instead—with the number at the end of the command set to match the number of processors you've got in your computer. (Not sure how many processors you've got? Type sysctl -n hw.ncpu in the terminal, the number that appears will be the number of processors you've got.)

You now have a working version of FET located in /Users/YOURUSERNAME/Desktop/fet/src/interface/, but one which will only run on a Mac with Qt installed. To create an app that will run on other Macs, complete step 9.

9. Open the Terminal app and type the following:

cd /Users/YOURUSERNAME/Qt/6.10.2/macos/bin/

./macdeployqt /Users/YOURUSERNAME/Desktop/fet/src/interface/fet.app
10. If you want to use FET in a language other than the default, you'll need to move the translation files into the appropriate location. The files you need to move can be found in /Users/YOURUSERNAME/Downloads/fet-7.8.0/translations—you'll want to move all of the files ending with .qm to a new location. Open a new Finder window and right-click on the FET.app you've just created in /Users/YOURUSERNAME/Desktop/fet/src/interface/, and select Show Package Contents. Then open the Contents folder, and finally open the MacOS folder within Contents. This is where you should move the .qm files. Once these have been moved, you switch FET languages within the FET app as usual.

Now drag the fet application to your Applications folder, and that's it!

Liviu Lalescu

#1
Thank you, Darren! If you would like, your post could be placed on a more important board and made sticky.

Also, about translations: since CMake (FET-7.7.0), FET will search for the translation files also in "../share/fet/translations" relative to the fet (and fet-cl) executable. On my GNU/Linux environment for creating the bin GNU/Linux executable, I just run "cmake --install build --prefix /home/goghi/fet-7.8.0" and the translations are where they need to be. It might be the case also with your macOS executable - I mean you might not need to move the qm files manually.

Liviu Lalescu

Also, Darren, maybe you would like to update the official README. Just modify it from FET-7.8.0 and send it to me. I mean to include necessary information for macOS.

Darren McDonald

Hi Liviu, sorry, I haven't had time to update the readme file yet (but will hopefully have some time in the next couple of weeks). I'll look into the options for including the language files on macOS. At the moment I just transfer all the files with a single terminal command:
find ~/Downloads/fet-7.8.1/translations -name '*.qm' -exec cp '{}' ~/Desktop/fet/src/interface/fet.app/Contents/MacOS \;
(But for those who are new to compiling software, I though that "drag and drop" would be a bit more user-friendly, so I think it makes sense to keep those instructions on that post for the moment.)

If you think it makes sense to make that post a sticky, that might be helpful. Thanks, as always, for your work on this!

Liviu Lalescu

Hi, Darren,

Thank you! You are welcome!  :)