On FreeBSD 14.3:
$ gmake -C depends HOST=i686-unknown-freebsd libevent
gmake: Entering directory '/home/hebasto/dev/bitcoin/depends'
Configuring libevent...
CMake Deprecation Warning at CMakeLists.txt:22 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.
Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.
-- The C compiler identification is Clang 19.1.7
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /usr/bin/clang
-- Check for working C compiler: /usr/bin/clang - broken
CMake Error at /usr/local/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler
"/usr/bin/clang"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: '/home/hebasto/dev/bitcoin/depends/work/build/i686-unknown-freebsd/libevent/2.1.12-stable-baac65d95ab/build/CMakeFiles/CMakeScratch/TryCompile-LurZhX'
Run Build Command(s): /usr/local/bin/cmake -E env VERBOSE=1 /usr/local/bin/gmake -f Makefile cmTC_a9d3d/fast
gmake[1]: Entering directory '/home/hebasto/dev/bitcoin/depends/work/build/i686-unknown-freebsd/libevent/2.1.12-stable-baac65d95ab/build/CMakeFiles/CMakeScratch/TryCompile-LurZhX'
/usr/local/bin/gmake -f CMakeFiles/cmTC_a9d3d.dir/build.make CMakeFiles/cmTC_a9d3d.dir/build
gmake[2]: Entering directory '/home/hebasto/dev/bitcoin/depends/work/build/i686-unknown-freebsd/libevent/2.1.12-stable-baac65d95ab/build/CMakeFiles/CMakeScratch/TryCompile-LurZhX'
Building C object CMakeFiles/cmTC_a9d3d.dir/testCCompiler.c.o
/usr/bin/clang -m32 --target=i686-unknown-freebsd -I/home/hebasto/dev/bitcoin/depends/i686-unknown-freebsd/include -D_GNU_SOURCE -D_FORTIFY_SOURCE=3 -pipe -std=c11 -O2 -fdebug-prefix-map=/home/hebasto/dev/bitcoin/depends/work/build/i686-unknown-freebsd/libevent/2.1.12-stable-baac65d95ab=/usr -fmacro-prefix-map=/home/hebasto/dev/bitcoin/depends/work/build/i686-unknown-freebsd/libevent/2.1.12-stable-baac65d95ab=/usr -fPIE -MD -MT CMakeFiles/cmTC_a9d3d.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_a9d3d.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_a9d3d.dir/testCCompiler.c.o -c /home/hebasto/dev/bitcoin/depends/work/build/i686-unknown-freebsd/libevent/2.1.12-stable-baac65d95ab/build/CMakeFiles/CMakeScratch/TryCompile-LurZhX/testCCompiler.c
Linking C executable cmTC_a9d3d
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_a9d3d.dir/link.txt --verbose=1
ld: error: /usr/lib/crt1.o is incompatible with elf_i386_fbsd
ld: error: /usr/lib/crti.o is incompatible with elf_i386_fbsd
ld: error: /usr/lib/crtbegin.o is incompatible with elf_i386_fbsd
ld: error: /usr/lib/libgcc.a(x86.o) is incompatible with elf_i386_fbsd
ld: error: /usr/lib/libgcc.a(fp_mode.o) is incompatible with elf_i386_fbsd
ld: error: /usr/lib/libgcc.a(absvdi2.o) is incompatible with elf_i386_fbsd
ld: error: /usr/lib/libgcc.a(absvsi2.o) is incompatible with elf_i386_fbsd
ld: error: /usr/lib/libgcc.a(absvti2.o) is incompatible with elf_i386_fbsd
ld: error: /usr/lib/libgcc.a(addvdi3.o) is incompatible with elf_i386_fbsd
ld: error: /usr/lib/libgcc.a(addvsi3.o) is incompatible with elf_i386_fbsd
ld: error: /usr/lib/libgcc.a(addvti3.o) is incompatible with elf_i386_fbsd
ld: error: /usr/lib/libgcc.a(apple_versioning.o) is incompatible with elf_i386_fbsd
ld: error: /usr/lib/libgcc.a(ashldi3.o) is incompatible with elf_i386_fbsd
ld: error: /usr/lib/libgcc.a(ashlti3.o) is incompatible with elf_i386_fbsd
ld: error: /usr/lib/libgcc.a(ashrdi3.o) is incompatible with elf_i386_fbsd
ld: error: /usr/lib/libgcc.a(ashrti3.o) is incompatible with elf_i386_fbsd
ld: error: /usr/lib/libgcc.a(bswapdi2.o) is incompatible with elf_i386_fbsd
ld: error: /usr/lib/libgcc.a(bswapsi2.o) is incompatible with elf_i386_fbsd
ld: error: /usr/lib/libgcc.a(clear_cache.o) is incompatible with elf_i386_fbsd
ld: error: /usr/lib/libgcc.a(clzdi2.o) is incompatible with elf_i386_fbsd
ld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
/usr/bin/clang -m32 --target=i686-unknown-freebsd -I/home/hebasto/dev/bitcoin/depends/i686-unknown-freebsd/include -D_GNU_SOURCE -D_FORTIFY_SOURCE=3 -pipe -std=c11 -O2 -fdebug-prefix-map=/home/hebasto/dev/bitcoin/depends/work/build/i686-unknown-freebsd/libevent/2.1.12-stable-baac65d95ab=/usr -fmacro-prefix-map=/home/hebasto/dev/bitcoin/depends/work/build/i686-unknown-freebsd/libevent/2.1.12-stable-baac65d95ab=/usr -L/home/hebasto/dev/bitcoin/depends/i686-unknown-freebsd/lib CMakeFiles/cmTC_a9d3d.dir/testCCompiler.c.o -o cmTC_a9d3d
gmake[2]: *** [CMakeFiles/cmTC_a9d3d.dir/build.make:103: cmTC_a9d3d] Error 1
gmake[2]: Leaving directory '/home/hebasto/dev/bitcoin/depends/work/build/i686-unknown-freebsd/libevent/2.1.12-stable-baac65d95ab/build/CMakeFiles/CMakeScratch/TryCompile-LurZhX'
gmake[1]: *** [Makefile:134: cmTC_a9d3d/fast] Error 2
gmake[1]: Leaving directory '/home/hebasto/dev/bitcoin/depends/work/build/i686-unknown-freebsd/libevent/2.1.12-stable-baac65d95ab/build/CMakeFiles/CMakeScratch/TryCompile-LurZhX'
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:47 (project)
-- Configuring incomplete, errors occurred!
gmake: *** [funcs.mk:343: /home/hebasto/dev/bitcoin/depends/i686-unknown-freebsd/.libevent_stamp_configured] Error 1
gmake: Leaving directory '/home/hebasto/dev/bitcoin/depends'
Additionally, for example, #23948 contains no evidence that this scenario has ever been tested.
As the i686-unknown-freebsd target was never documented in depends/README.md, we might consider removing the broken code from depends/hosts/freebsd.mk.
The same reasoning applies to OpenBSD as well. However, I have not tested this on NetBSD.