sensec / luci-app-udp2raw

OpenWrt/LEDE LuCI for udp2raw-tunnel
GNU General Public License v3.0
113 stars 65 forks source link

Compile Error 2 #4

Closed pandalion98 closed 6 years ago

pandalion98 commented 6 years ago

Build environment: Debian from Microsoft Store [Windows Subsystem for Linux (WSL)]

I am following this compile guide. While compiling, I encounter this issue:

root@xxxxxxxx:~/lede-sdk-17.01.6-ramips-mt7620_gcc-5.4.0_musl-1.1.16.Linux-x86_64# cd package/
root@xxxxxxxx:~/lede-sdk-17.01.6-ramips-mt7620_gcc-5.4.0_musl-1.1.16.Linux-x86_64/package# ls
linux  Makefile  toolchain
root@xxxxxxxx:~/lede-sdk-17.01.6-ramips-mt7620_gcc-5.4.0_musl-1.1.16.Linux-x86_64/package# git clone https://github.com/sensec/luci-app-udp2raw.git
Cloning into 'luci-app-udp2raw'...
remote: Enumerating objects: 106, done.
remote: Total 106 (delta 0), reused 0 (delta 0), pack-reused 106
Receiving objects: 100% (106/106), 260.96 KiB | 193.00 KiB/s, done.
Resolving deltas: 100% (25/25), done.
root@xxxxxxxx:~/lede-sdk-17.01.6-ramips-mt7620_gcc-5.4.0_musl-1.1.16.Linux-x86_64/package# git clone https://github.com/sensec/openwrt-udp2raw.git
Cloning into 'openwrt-udp2raw'...
remote: Enumerating objects: 27, done.
remote: Total 27 (delta 0), reused 0 (delta 0), pack-reused 27
Unpacking objects: 100% (27/27), done.
root@xxxxxxxx:~/lede-sdk-17.01.6-ramips-mt7620_gcc-5.4.0_musl-1.1.16.Linux-x86_64/package# cd ..
root@xxxxxxxx:~/lede-sdk-17.01.6-ramips-mt7620_gcc-5.4.0_musl-1.1.16.Linux-x86_64# make menuconfig
awk: include/scan.awk: line 21: function asort never defined
awk: include/scan.awk: line 21: function asort never defined
Collecting package info: done
awk: include/scan.awk: line 21: function asort never defined
awk: include/scan.awk: line 21: function asort never defined
Collecting target info: done
configuration written to .config

*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

root@xxxxxxxx:~/lede-sdk-17.01.6-ramips-mt7620_gcc-5.4.0_musl-1.1.16.Linux-x86_64# make package/openwrt-udp2raw/compile V=s
awk: include/scan.awk: line 21: function asort never defined
awk: include/scan.awk: line 21: function asort never defined
awk: include/scan.awk: line 21: function asort never defined
awk: include/scan.awk: line 21: function asort never defined
#
# configuration written to .config
#
make[1]: Entering directory '/root/lede-sdk-17.01.6-ramips-mt7620_gcc-5.4.0_musl-1.1.16.Linux-x86_64'
make[1]: *** No rule to make target 'package/openwrt-udp2raw/compile'.  Stop.
make[1]: Leaving directory '/root/lede-sdk-17.01.6-ramips-mt7620_gcc-5.4.0_musl-1.1.16.Linux-x86_64'
/root/lede-sdk-17.01.6-ramips-mt7620_gcc-5.4.0_musl-1.1.16.Linux-x86_64/include/toplevel.mk:198: recipe for target 'package/openwrt-udp2raw/compile' failed
make: *** [package/openwrt-udp2raw/compile] Error 2

I have no idea what is causing this. Any ideas?

pandalion98 commented 6 years ago

I have tried disabling the cryptographic signing option on make menuconfig, yet the error is still there.

pandalion98 commented 6 years ago

After debugging for a few minutes, it looks like the main issue is with awk that is included with Debian on Windows (not tried on native Debian).

awk: include/scan.awk: line 21: function asort never defined

The fix was to replace the stock awk with gawk.

apt-get --no-install-recommends install gawk

After doing this step, I simply followed the guide on the wiki. No other changes had to be done.