Qubes builder instructions for building template not working

I would like to build the ubuntu template. (I don’t actually care about ubuntu, I’m currently yak shaving)

Following Contents/docs/os/ubuntu.md at master · Qubes-Community/Contents · GitHub , which points to the qubes builder instructions at: Qubes builder | Qubes OS

use fedora 32 template for appvm to compile in

run ./setup and select:

  • Qubes Release 4.0
  • Enabling just “Stable - Default Repo”
  • git clone faster = true
  • no pre-built packages
  • build template only = yes
  • select only “bionic” template
  • leave recomended builder-rpm, builder-debian, mgmt-salt

grep NO builder.conf returns:

NO_SIGN = 1

then make qubes-vm returns:

gcc -E -m64 -DBUILD_ID -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs -O2 -fomit-frame-pointer -nostdinc -fno-builtin -fno-common -Werror -Wredundant-decls -Wno-pointer-arith -Wvla -pipe -D__XEN__ -ffile-prefix-map=/home/user/qubes-src/vmm-xen/debian-vm=. -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -I/home/user/qubes-src/vmm-xen/debian-vm/xen/include -I/home/user/qubes-src/vmm-xen/debian-vm/xen/include/asm-x86/mach-generic -I/home/user/qubes-src/vmm-xen/debian-vm/xen/include/asm-x86/mach-default -DXEN_IMG_OFFSET=0x200000 -msoft-float -fno-stack-protector -fno-exceptions -fno-asynchronous-unwind-tables -Wnested-externs -DHAVE_AS_NEGATIVE_TRUE -mno-red-zone -fpic -mno-sse -mskip-rax-setup -include public/xen-compat.h -DXEN_GENERATING_COMPAT_HEADERS -m32 -o compat/argo.i compat/argo.c
gcc: error: unrecognized command line option ‘-ffile-prefix-map=/home/user/qubes-src/vmm-xen/debian-vm=.’
Makefile:68: recipe for target ‘compat/argo.i’ failed
make[5]: *** [compat/argo.i] Error 1

Am I selecting the wrong options?

Notes:

  • The dom0 is qubes 4.1, but that shouldn’t matter inside the fedora32 vm
  • also tried fedora-34

A thought:
Would it make sense to have the installer automatically set up a “qubes-template-builder” appVM for users?

At first glance, without thinking through, it looks like an awesome idea to have a qtb AppVm by default!