Hi Žygimantas,
Thanks for the help. I installed a virtual machine running Ubuntu 18.04 and then followed the instructions in the link you provided but the build still failed. It seems to be due to a dependency called common.
Here is the output from the build process:
make -j2 V=s
WARNING: Makefile 'package/configdb/Makefile' has a build dependency on 'common', which does not exist
WARNING: Makefile 'package/diag/Makefile' has a build dependency on 'common', which does not exist
WARNING: Makefile 'package/dsutils/Makefile' has a build dependency on 'common', which does not exist
WARNING: Makefile 'package/mcm-core/Makefile' has a build dependency on 'common', which does not exist
WARNING: Makefile 'package/network/services/net-snmp/Makefile' has a dependency on 'libpci', which does not exist
WARNING: Makefile 'package/qmi-client-helper/Makefile' has a build dependency on 'common', which does not exist
WARNING: Makefile 'package/network/utils/qmicli/Makefile' has a dependency on 'libmbim', which does not exist
WARNING: Makefile 'package/qmuxd/Makefile' has a build dependency on 'common', which does not exist
WARNING: Makefile 'package/xmllib/Makefile' has a build dependency on 'common', which does not exist
WARNING: Makefile 'package/feeds/packages/xz/Makefile' has a dependency on 'bash', which does not exist
WARNING: Makefile 'package/feeds/packages/xz/Makefile' has a dependency on 'bash', which does not exist
WARNING: Makefile 'package/feeds/packages/xz/Makefile' has a dependency on 'bash', which does not exist
WARNING: Makefile 'package/feeds/packages/xz/Makefile' has a dependency on 'bash', which does not exist
WARNING: your configuration is out of sync. Please run make menuconfig, oldconfig or defconfig!
make[1]: Entering directory '/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64'
make compile-install
make[2]: Entering directory '/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64'
make[3]: Entering directory '/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64'
make[3]: Entering directory '/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64'
+ mkdir -p /home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi
+ cd /home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi
+ mkdir -p bin lib include stamp
mkdir -p /home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp
touch /home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/.prepared
+ mkdir -p /home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/staging_dir/host
+ cd /home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/staging_dir/host
+ mkdir -p bin lib include stamp
mkdir -p /home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/build_dir/host/stamp /home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/staging_dir/host/include/sys
install -m0644 /home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/tools/include/*.h /home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/staging_dir/host/include/
install -m0644 /home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/tools/include/sys/*.h /home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/staging_dir/host/include/sys/
ln -sf lib /home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/staging_dir/host/lib64
touch /home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/staging_dir/host/.prepared
make[4]: Entering directory '/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/tools/flock'
touch: cannot touch '/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/build_dir/host/flock/.prepared8a39d031cbb2a2262d4c98af1e505866_6664517399ebbbc92a37c5bb081b5c53_check': Permission denied
touch: cannot touch '/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/build_dir/host/flock/.prepared8a39d031cbb2a2262d4c98af1e505866_6664517399ebbbc92a37c5bb081b5c53_check': Permission denied
Makefile:25: recipe for target '/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/build_dir/host/flock/.prepared8a39d031cbb2a2262d4c98af1e505866_6664517399ebbbc92a37c5bb081b5c53_check' failed
make[4]: *** [/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/build_dir/host/flock/.prepared8a39d031cbb2a2262d4c98af1e505866_6664517399ebbbc92a37c5bb081b5c53_check] Error 1
make[4]: Leaving directory '/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/tools/flock'
time: tools/flock/compile#0.04#0.02#0.15
tools/Makefile:158: recipe for target 'tools/flock/compile' failed
make[3]: *** [tools/flock/compile] Error 2
make[3]: Leaving directory '/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64'
tools/Makefile:156: recipe for target '/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.tools_compile_yynyynnyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyyynyynynnyyynnyyy' failed
make[2]: *** [/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.tools_compile_yynyynnyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyyynyynynnyyynnyyy] Error 2
make[2]: *** Waiting for unfinished jobs....
rm -rf /home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-mdm9x07
make[3]: Leaving directory '/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64'
make[2]: Leaving directory '/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64'
Makefile:102: recipe for target 'world' failed
make[1]: *** [world] Error 2
make[1]: Leaving directory '/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64'
Build failed - please re-run with -j1 to see the real error message
/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/include/toplevel.mk:229: recipe for target 'world' failed
make: *** [world] Error 1