compile freebsd on ubuntu

Thomas Mueller mueller6722 at
Wed Apr 28 02:40:24 UTC 2021

from <wangwei19 at>:

> Dear friend:
>   I  am compiling the freebsd kernal on ubuntu with this command :
>   sudo bmake -j1 buildworld KERNCONF=MODEDKERNEL COMPILER_TYPE=gcc TARGET=amd64 TARGET_ARCH=amd64
>   beacuse make cannot work so i use the bmake but it take the error that:
>       rpcgen: execvp cpp: No such file or directory *** [key_prot.h] Error code 1
>   how can i fix this error
>   i download the system code from the github, and compile it on the workpalce.

>   the full log is that:

If you download the src tree, or src and xsrc trees, for NetBSD, there are directions of how to cross-compile NetBSD from other (quasi-)Unixes.

NetBSD now uses cvs but has been moving slowly to switch to mercurial (hg) for downloading src, xsrc and pkgsrc trees.

NetBSD has tools and documentation on how to cross-compile NetBSD userland and kernel.

There is a in the src directory that is recommended instead of using make directly.

FreeBSD has not developed this infrastructure for cross-compiling, though there has been some talk about producing such an infrastructure.

My question would be the other way around, how to cross-compile Linux from FreeBSD or NetBSD.

This would not be a full-fledged Ubuntu or other fancy distro, but more comparable to FreeBSD or NetBSD base system.


More information about the freebsd-questions mailing list