Hi Malcolm,
I have the same OS as you (Ubuntu 18.04) and I could build 9.0 (as well as 9.1.beta0) without any trouble. If I compare the file r-3.6.2.log resulting from the build of R on my system with yours, they are pretty similar until these lines in your r-3.6.2.log:
making pretty.d from pretty.c
making uncmin.d from uncmin.c
make[7]: Entering directory '/usr/local/CA/sage-9.0/local/var/tmp/sage/build/r-3.6.2/src/src/appl'
gcc -I. -I../../src/include -I../../src/include -DHAVE_CONFIG_H -fopenmp -fpic -g -O2 -c integrate.c -o integrate.o
In file included from ../../src/include/R_ext/Applic.h:41:0,
from integrate.c:33:
../../src/include/R_ext/BLAS.h:103:55: error: expected declaration specifiers or '...' before ')' token
const double *beta, double *y, const int *incy FCLEN);
The similar lines in my r-3.6.2.log are
making pretty.d from pretty.c
making uncmin.d from uncmin.c
make[7]: Entering directory '/home/eric/sage/9.0/local/var/tmp/sage/build/r-3.6.2/src/src/appl'
gcc -I. -I../../src/include -I../../src/include -DHAVE_CONFIG_H -fopenmp -fpic -g -O2 -c integrate.c -o integrate.o
gcc -I. -I../../src/include -I../../src/include -DHAVE_CONFIG_H -fopenmp -fpic -g -O2 -c interv.c -o interv.o
...
Successfully installed r-3.6.2
Deleting temporary build directory
/home/eric/sage/9.0/local/var/tmp/sage/build/r-3.6.2
Finished installing r-3.6.2.spkg
A question: are you using the system gfortran (i.e. gfortran coming from the Ubuntu package gfortran) and not Sage's built gfortran? I am using the system one.
Best regards,
Eric.