I failed to compile 5.8.2beta20 in current Ubuntu 24.04.2 (Kernel 6.11.0-21) with the following error:
MB-System-5.8.2beta20/src/mbview/mbview_plot.c:857:15: error: ‘CLOCK_REALTIME’ undeclared (first use in this function)
857 | clock_gettime(CLOCK_REALTIME, &starttime);
To me adding
#include <time.h>
to mbview_plot.c as first include fixed the issue.