Cross compiling FreeBSD on linux - Debian 13 Trixie

$ MAKEOBJDIRPREFIX=$PWD/../obj ./tools/build/make.py TARGET=amd64 TARGET_ARCH=amd64 --bootstrap-toolchain buildworld buildkernel

Is getting me errors on Debian 13 Trixie

Code:
#      test  varname-pwd
#      test  varname-vpath
#      test  varparse-dynamic
#      test  varparse-errors
#      test  varparse-mod
#      test  varparse-undef-partial
--- /home/mlxx/Desktop/FreeBSD/freebsd-src/contrib/bmake/unit-tests/cmd-interrupt.exp    2026-05-20 02:36:16.510813634 -0400
+++ cmd-interrupt.out    2026-05-23 00:47:26.263525571 -0400
@@ -5,5 +5,5 @@
 interrupt-phony: ok
 > cmd-interrupt-precious
 interrupt-precious: ok
-interrupt-compat expected-fail
+interrupt-compat unexpected-ok
 exit status 0
Failed tests: cmd-interrupt
*** Error code 1

Stop.
bmake[1]: stopped making "test" in /home/mlxx/Desktop/FreeBSD/freebsd-src/contrib/bmake/unit-tests
*** Error code 1

Stop.
bmake: stopped making "test" in /home/mlxx/Desktop/FreeBSD/freebsd-src/contrib/bmake
Traceback (most recent call last):
  File "/home/mlxx/Desktop/FreeBSD/freebsd-src/./tools/build/make.py", line 342, in <module>
    bmake_binary = bootstrap_bmake(source_root, objdir_prefix)
  File "/home/mlxx/Desktop/FreeBSD/freebsd-src/./tools/build/make.py", line 147, in bootstrap_bmake
    run(["sh", bmake_source_dir / "boot-strap"] + configure_args,
    ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        cwd=str(bmake_build_dir), env=env)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mlxx/Desktop/FreeBSD/freebsd-src/./tools/build/make.py", line 84, in run
    subprocess.check_call(cmd, **kwargs)
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/subprocess.py", line 419, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sh', '/home/mlxx/Desktop/FreeBSD/freebsd-src/contrib/bmake/boot-strap', '--with-default-sys-path=.../share/mk:/home/mlxx/Desktop/FreeBSD/freebsd-src/../obj/bmake-install/share/mk', '--with-machine=amd64', '--without-filemon', '--prefix=/home/mlxx/Desktop/FreeBSD/freebsd-src/../obj/bmake-install']' returned non-zero exit status 1.
mlxx@debian:~/Desktop/FreeBSD/freebsd-src$
 
Last edited by a moderator:
Completely ignoring the "why" question (my answer would be: because it's there, and might be fun to try) ...

Debugging it should probably start by running the boot-strap script (see last last of make output) by hand, and seeing where it fails and what error messages it gives.
 
Back
Top