Build fails on Raspberry Pi 4 Model B stock raspian

waf configure seemed to complete fine, but the actual build fails

[389/950] cxx: libs/ardour/midi_ui.cc -> build/libs/ardour/midi_ui.cc.1.o
In file included from /home/pi/Ardour-5.12.0/libs/ardour/ardour/plugin.h:33,
from …/libs/ardour/ardour/session.h:72,
from …/libs/ardour/midi_track.cc:53:
/home/pi/Ardour-5.12.0/libs/ardour/ardour/cycles.h:221:2: warning: #warning You are compiling libardour on a platform for which ardour/cycles.h needs work [-Wcpp]
#warning You are compiling libardour on a platform for which ardour/cycles.h needs work
^~~~~~~
In file included from /home/pi/Ardour-5.12.0/libs/ardour/ardour/plugin.h:33,
from …/libs/ardour/ardour/session.h:72,
from …/libs/ardour/midi_ui.cc:31:
/home/pi/Ardour-5.12.0/libs/ardour/ardour/cycles.h:221:2: warning: #warning You are compiling libardour on a platform for which ardour/cycles.h needs work [-Wcpp]
#warning You are compiling libardour on a platform for which ardour/cycles.h needs work
^~~~~~~
In file included from /home/pi/Ardour-5.12.0/libs/pbd/pbd/properties.h:457,
from /home/pi/Ardour-5.12.0/libs/ardour/ardour/session_object.h:26,
from /home/pi/Ardour-5.12.0/libs/ardour/ardour/processor.h:32,
from …/libs/ardour/ardour/amp.h:26,
from …/libs/ardour/luabindings.cc:28:
/home/pi/Ardour-5.12.0/libs/pbd/pbd/property_basics_impl.h: In member function ‘bool PBD::PropertyChange::contains(PBD::PropertyDescriptor) const [with T = long long int]’:
/home/pi/Ardour-5.12.0/libs/pbd/pbd/property_basics_impl.h:40:1: note: parameter passing for argument of type ‘PBD::PropertyDescriptor’ changed in GCC 7.1
PropertyChange::contains (PropertyDescriptor p) const
^~~~~~~~~~~~~~
g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.

sounds like a g++ bug, or perhaps an out of memory issue. check dmesg

Thanks. I think this is the relevant section.

[ 2887.332461] ------------[ cut here ]------------
[ 2887.332545] WARNING: CPU: 0 PID: 489 at drivers/gpu/drm/vc4/vc4_firmware_kms.c:899 vc4_crtc_atomic_flush+0x98/0x9c [vc4]
[ 2887.332582] Modules linked in: binfmt_misc rfcomm bnep hci_uart btbcm serdev bluetooth ecdh_generic fuse 8021q garp stp llc usblp snd_usb_audio snd_hwdep snd_usbmidi_lib snd_rawmidi snd_seq_device bcm2835_v4l2© v4l2_common bcm2835_codec© v4l2_mem2mem videobuf2_vmalloc bcm2835_mmal_vchiq© videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_common vc_sm_cma© videodev media argon_mem evdev brcmfmac brcmutil vc4 sha256_generic v3d drm_kms_helper gpu_sched cfg80211 drm rfkill drm_panel_orientation_quirks snd_soc_core raspberrypi_hwmon snd_bcm2835© hwmon snd_compress snd_pcm_dmaengine snd_pcm syscopyarea snd_timer sysfillrect sysimgblt fb_sys_fops snd uio_pdrv_genirq uio fixed i2c_dev ip_tables x_tables ipv6
[ 2887.333378] CPU: 0 PID: 489 Comm: Xorg Tainted: G WC 4.19.57-v7l+ #1244
[ 2887.333386] Hardware name: BCM2835
[ 2887.333420] [] (unwind_backtrace) from [] (show_stack+0x20/0x24)
[ 2887.333440] [] (show_stack) from [] (dump_stack+0xd4/0x118)
[ 2887.333460] [] (dump_stack) from [] (__warn+0x104/0x11c)
[ 2887.333477] [] (__warn) from [] (warn_slowpath_null+0x50/0x58)
[ 2887.333541] [] (warn_slowpath_null) from [] (vc4_crtc_atomic_flush+0x98/0x9c [vc4])
[ 2887.333677] [] (vc4_crtc_atomic_flush [vc4]) from [] (drm_atomic_helper_commit_planes+0x1a4/0x298 [drm_kms_helper])
[ 2887.333808] [] (drm_atomic_helper_commit_planes [drm_kms_helper]) from [] (vc4_atomic_complete_commit+0x60/0x33c [vc4])
[ 2887.333905] [] (vc4_atomic_complete_commit [vc4]) from [] (vc4_atomic_commit+0xe0/0x194 [vc4])
[ 2887.334135] [] (vc4_atomic_commit [vc4]) from [] (drm_atomic_commit+0x5c/0x60 [drm])
[ 2887.334486] [] (drm_atomic_commit [drm]) from [] (drm_mode_atomic_ioctl+0x98c/0xb78 [drm])
[ 2887.334826] [] (drm_mode_atomic_ioctl [drm]) from [] (drm_ioctl_kernel+0xb4/0xf0 [drm])
[ 2887.335158] [] (drm_ioctl_kernel [drm]) from [] (drm_ioctl+0x230/0x3cc [drm])
[ 2887.335336] [] (drm_ioctl [drm]) from [] (do_vfs_ioctl+0xbc/0x804)
[ 2887.335357] [] (do_vfs_ioctl) from [] (ksys_ioctl+0x44/0x6c)
[ 2887.335375] [] (ksys_ioctl) from [] (sys_ioctl+0x18/0x1c)
[ 2887.335392] [] (sys_ioctl) from [] (ret_fast_syscall+0x0/0x28)
[ 2887.335402] Exception stack(0xdb47dfa8 to 0xdb47dff0)
[ 2887.335414] dfa0: 02703f08 bea89a78 0000000c c03864bc bea89a78 00000000
[ 2887.335426] dfc0: 02703f08 bea89a78 c03864bc 00000036 027c4f30 0274e010 02572738 00000033
[ 2887.335436] dfe0: b6d4e08c bea89a44 b6d35594 b69c151c
[ 2887.335460] —[ end trace 334e2819341425df ]—

I run Ardour on the NVIDIA Jetson Nano developer kit. The Jetson Nano uses Ubuntu 18.04 and 18.04 has a file of 'snap’s of various software items including Ardour. Ardour on Jetson Nano needed two changes to run well for me: 1st - getting the OS to run off a solid state drive (Samsung T500 in the case of the YouTube video: https://www.youtube.com/watch?v=7O7pUtQD9HI&t=18s); and then 2nd: adding a 6G ‘swap file’ (https://www.youtube.com/watch?v=JXv39FGi-nw) .

Don’t know if Raspberry Pi 4 Model B can run Ubuntu 18.04 or not, (don’t know why not, though) but if the two links are used, link 1 needs to be run before link 2. That’s because running a swap file (or a swap partition) on an SD card is not recommended. Also, link 1, in my own situation needed at least a 32G SD card, but that is probably because the Jetson Nano needs a lot of SD card space. Once ‘Run On USB’ has been done, then those limitations are gone, so link 1 should be done first.

There are links about running on USB with the Raspberry 4, so those might work for you. And there are cautions online against putting swap partitions on Raspberry 3s. But the link 2 is about adding a swap file, and - again - do not put any kind of swap on an SD card unless you don’t mind losing SD cards.

That vc4_firmware_kms messages seems rather seems unrelated. Maybe it is even a follow up error.
Wasn’t there an OOM killer message before then? some mention of killed process?

Compiling Ardour can require a lot of memory. You may easy it a bit by reducing concurrency, but the final linking step can easily require 2-3GB. I doubt a default RPi system can handle this. You could add a swap partition or use a swap file, perhaps even over network…

Anyway, why compile on the Pi itself? It’s not really a good platform for development. I suggest to cross compile for ARM, that’s likely also 10-100 times faster.

PS. that firmware-kms message might be interesting for Pi kernel hackers. It’s related to their graphics driver.