I am having problem building OpenWrt from source on my newly installed Ubuntu 18.10. I use my laptop to dual boot Windows 10 and Ubuntu and everything works as it should but I cant seem to build OpenWrt for some reason. Here is the log:
WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/busybox/Makefile' has a build dependency on 'libpam', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libgnutls', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libopenldap', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libidn2', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libssh2', which does not exist
WARNING: Makefile 'package/boot/kexec-tools/Makefile' has a dependency on 'liblzma', which does not exist
WARNING: Makefile 'package/network/services/lldpd/Makefile' has a dependency on 'libnetsnmp', which does not exist
time: target/linux/prereq#0.24#0.23#3.06
make[1]: Entering directory '/home/ahmar/network-build-system/openwrt'
make[2]: Entering directory '/home/ahmar/network-build-system/openwrt'
+ mkdir -p /home/ahmar/network-build-system/openwrt/staging_dir/target-mips_24kc_musl
+ cd /home/ahmar/network-build-system/openwrt/staging_dir/target-mips_24kc_musl
+ mkdir -p bin lib include stamp
mkdir -p /home/ahmar/network-build-system/openwrt/build_dir/target-mips_24kc_musl/stamp
touch /home/ahmar/network-build-system/openwrt/staging_dir/target-mips_24kc_musl/.prepared
+ mkdir -p /home/ahmar/network-build-system/openwrt/staging_dir/host
+ cd /home/ahmar/network-build-system/openwrt/staging_dir/host
+ mkdir -p bin lib include stamp
mkdir -p /home/ahmar/network-build-system/openwrt/build_dir/host/stamp /home/ahmar/network-build-system/openwrt/staging_dir/host/include/sys
install -m0644 /home/ahmar/network-build-system/openwrt/tools/include/*.h /home/ahmar/network-build-system/openwrt/staging_dir/host/include/
install -m0644 /home/ahmar/network-build-system/openwrt/tools/include/sys/*.h /home/ahmar/network-build-system/openwrt/staging_dir/host/include/sys/
ln -sf lib /home/ahmar/network-build-system/openwrt/staging_dir/host/lib64
touch /home/ahmar/network-build-system/openwrt/staging_dir/host/.prepared
make[3]: Entering directory '/home/ahmar/network-build-system/openwrt/tools/flock'
make[3]: Leaving directory '/home/ahmar/network-build-system/openwrt/tools/flock'
time: tools/flock/compile#0.08#0.11#1.24
make[3]: Entering directory '/home/ahmar/network-build-system/openwrt/tools/sed'
(cd /home/ahmar/network-build-system/openwrt/build_dir/host/sed-4.5/; if [ -x configure ]; then cp -fpR /home/ahmar/network-build-system/openwrt/scripts/config.{guess,sub} /home/ahmar/network-build-system/openwrt/build_dir/host/sed-4.5// && CC="gcc" CFLAGS="-O2 -I/home/ahmar/network-build-system/openwrt/staging_dir/host/include " CXX="g++" CPPFLAGS="-I/home/ahmar/network-build-system/openwrt/staging_dir/host/include " LDFLAGS="-L/home/ahmar/network-build-system/openwrt/staging_dir/host/lib " CONFIG_SHELL="/usr/bin/env bash" ac_cv_search_setfilecon=no ac_cv_header_selinux_context_h=no ac_cv_header_selinux_selinux_h=no bash ./configure --target=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --program-prefix="" --program-suffix="" --prefix=/home/ahmar/network-build-system/openwrt/staging_dir/host --exec-prefix=/home/ahmar/network-build-system/openwrt/staging_dir/host --sysconfdir=/home/ahmar/network-build-system/openwrt/staging_dir/host/etc --localstatedir=/home/ahmar/network-build-system/openwrt/staging_dir/host/var --sbindir=/home/ahmar/network-build-system/openwrt/staging_dir/host/bin --disable-acl --disable-nls ; fi )
cat: -: No such file or directory
cat: -: No such file or directory
cat: -: No such file or directory
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... cat: -: No such file or directory
no
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking whether make supports the include directive... cat: -: No such file or directory
no
checking for x86_64-pc-linux-gnu-gcc... gcc
cat: -: No such file or directory
checking whether the C compiler works... no
configure: error: in `/home/ahmar/network-build-system/openwrt/build_dir/host/sed-4.5':
configure: error: C compiler cannot create executables
See `config.log' for more details
make[3]: *** [Makefile:46: /home/ahmar/network-build-system/openwrt/build_dir/host/sed-4.5/.configured] Error 77
make[3]: Leaving directory '/home/ahmar/network-build-system/openwrt/tools/sed'
time: tools/sed/compile#0.60#0.50#5.50
make[2]: *** [tools/Makefile:154: tools/sed/compile] Error 2
make[2]: Leaving directory '/home/ahmar/network-build-system/openwrt'
make[1]: *** [tools/Makefile:150: /home/ahmar/network-build-system/openwrt/staging_dir/target-mips_24kc_musl/stamp/.tools_compile_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynnyy] Error 2
make[1]: Leaving directory '/home/ahmar/network-build-system/openwrt'
make: *** [/home/ahmar/network-build-system/openwrt/include/toplevel.mk:218: world] Error 2
I also tried to Google the issue but so far nothing. I have tried to install everything listed on the Documentation page for building source but it still fails. Any suggestions?