Original version: Thu Oct 16 05:25:03 2025
Update(s): Sat Oct 18 16:16:28 2025 Mon Oct 20 10:50:50 2025 Sat Mar 21 16:07:42 2026
On 15 October 2025, the ISO C working group mailing list carried a surprise announcement of a brand new, independently developed, C compiler, kefir, designed and written by a single person, Jevgenij Protopopov. It tracks the latest work in the ISO C Standard development, runs only on x86_64 CPUs with Linux, FreeBSD, NetBSD, or OpenBSD operating systems, and has been tested on numerous large open-source software packages.
The developer's site is at https://git.sr.ht/~jprotopopov/kefir, and the compiler source bundle is at https://git.protopopov.lv/kefir/snapshot/kefir-0.5.0.tar.gz.
I made build attempts on CentOS 7.9, Ubuntu 20.04, and Ubuntu 24.04. Only the latter succeeded, and then not with various gcc versions, but with a version of clang. In the top-level unpacked source directory, kefir-0.5.0, my recipe looks like this:
$ PATH=/usr/bin:/bin:/usr/sbin:/sbin
$ export PATH
$ env -i HOME=$HOME PATH=$PATH \
make CC=$prefix/bin/clang-19 \
prefix=$prefix/ashare/kefir/kefir-0.5.0 \
test all
$ env -i HOME=$HOME PATH=$PATH \
make CC=$prefix/bin/clang-19 \
prefix=$prefix/ashare/kefir/kefir-0.5.0 \
install
I then proceeded to try out the new compiler, using CC=kefir on Makefile or configure command lines. It successfully built one precision (float) [so far] of my hoc system, my large computer arithmetic library, gawk-5.3.2, and mpfr-4.2.2: all tests passed. Some of those have instances of __asm__ __volatile__() and __builtin_xxx() macros to access hardware instructions that are not otherwise available to high-level languages.
The file list above provides links to a bundle of my Ubuntu 24.04 installation directory, which should be unpackable at any convenient location. At my site, it is unpacked into $prefix/ashare/kefir. The 3-line script, kefir, is a wrapper that needs a single filepath customization for the installation location. It is installed in $prefix/bin. Warning: the tar unbundle unpacks into kefir-0.5.0: I added the suffix -bin to distinguish it from the source bundle. The manual pages are found under the share directory.
I believe strongly that code developers need a range of compilers to avoid falling into the terrible trap of using compiler-dependent code that destroys software portability. For C, and sometimes C++, my home and office sites have numerous offerings:
aocc chibicc clang dgcc distcc
fil-c gcc icc icx kefir
lcc mmix-gcc mpicc nvcc nwcc
opencc pathcc pcc pgcc slimcc
suncc tcc zigcc
Here is a comparison of installed executable sizes (some, of course, invoke separate programs installed elsewhere):
-rwxr-xr-x 1 1061 Oct 15 12:37 kefir
-rwxr-xr-x 1 146232 Oct 15 12:37 kefir-cc
-rwxr-xr-x 1 55632 Oct 15 12:37 kefir-cc1
-rwxr-xr-x 1 11734 Oct 15 12:37 kefir-detect-host-env
-rwxr-xr-x 1 6310130 Oct 15 12:37 libkefir.a
lrwxrwxrwx 1 15 Oct 15 12:37 libkefir.so -> libkefir.so.0.0
-rwxr-xr-x 1 3081480 Oct 15 12:37 libkefir.so.0.0
-rwxr-xr-x 1 140592 May 27 2024 clang
-rwxr-xr-x 1 1023032 Sep 4 2024 gcc
-rwxr-xr-x 1 40608 Sep 3 2022 pcc
-rwxr-xr-x 1 289008 Aug 14 2020 tcc
I created this Web site for friends and colleagues to have rapid access to my build of kefir.
Failure to build 64-bit and 80-bit versions of hoc due to a compiler error in handling of complex arithmetic led me to file a bug report with the kefir developer. That issue had already been fixed with a small patch file, which I applied to produce kefir-0.50.0.p1. The patched compiler is now our local default for kefir, and with it, the two additional versions of hoc built and passed their tests. Builds of that patched compiler have also succeeded on Alma 9.5, CentOS 10, Debian 13.1, FreeBSD 14.3, and Ubuntu 20.04. However, one critical additional tweak was needed: the build must be done in a Unicode locale, and the env -i setting in the above recipes eliminated locales. For the GNU/Linux distributions, this is easily repaired by adding LANG=en_US.utf8 or LC_ALL=en_US.utf8 to the env or make commands. For FreeBSD, setting LANG still gets a failing build: using LC_ALL=en_US.UTF-8 (notice the value change) was successful. kefir does not build successfully on CentOS 7.9, because some of that O/S's packages are too old.
With instructions from kefir's author, I downloaded the latest development version of the compiler like this:
$ git clone -b develop https://git.sr.ht/~jprotopopov/kefir kefir-2025-10-17
With the addition of the LC_ALL setting, that compiler version built successfully on Ubuntu 20.04 and 24.04, and is available on our systems as kefir-dev. The Ubuntu 24.04 version is available in the files listed at the top of this Web page.
One final comment: on a fast 48-core AMD EPYC 9455 server, the kefir build with make -j24 takes just 16 seconds. By comparison, a build and installation of the latest gcc-16 release on that system, with all supported compilers, takes almost 30 minutes.