gravitl / netmaker

Netmaker makes networks with WireGuard. Netmaker automates fast, secure, and distributed virtual networks.
https://netmaker.io
Other
9.52k stars 552 forks source link

[Bug]: Request to support neclient for mips architecture - OpenWrt #1673

Closed aii-shanker-jj closed 2 years ago

aii-shanker-jj commented 2 years ago

Contact Details

No response

What happened?

Netclient version 0.16.1

Hardware GL-MT1300 of Gl-inet

Environment OpenWrt release: OpenWrt 19.07.8 r11364-ef56c85848 OS version: Linux GL-MT1300 4.14.241 #0 SMP Thu Jul 29 19:50:28 2021 mips GNU/Linux uname -m: mips

Install script failure Executed https://github.com/gravitl/netmaker/blob/master/scripts/netclient-install.sh and failed.

./netclient-install.sh
checking dependencies...
Downloading https://fw.gl-inet.com/releases/v19.07.8/packages-3.0/ramips/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/glinet_packages
Downloading https://fw.gl-inet.com/releases/v19.07.8/packages-3.0/ramips/glinet/Packages.gz
Updated list of available packages in /var/opkg-lists/glinet_private
Downloading https://fw.gl-inet.com/releases/v19.07.8/kmod-3.0-newdriver/ramips/mt7621/Packages.gz
Updated list of available packages in /var/opkg-lists/glinet_kmod
wireguard-tools
     wireguard-tools is installed
bash
     bash is installed
no $VERSION provided, fallback to latest
OS Version = Linux
Netclient Version = latest
./netclient-install.sh: line 150: fatal: not found

Reason for failure: https://github.com/gravitl/netmaker/blob/4d062b88ba2c56afbd3371e14e9ab36f75c57dfe/scripts/netclient-install.sh#L146-L151

Version

v0.16.1

What OS are you using?

Linux

Relevant log output

No response

Contributing guidelines

aii-shanker-jj commented 2 years ago
root@GL-MT1300:~# cat /etc/os-release
NAME="OpenWrt"
VERSION="19.07.8"
ID="openwrt"
ID_LIKE="lede openwrt"
PRETTY_NAME="OpenWrt 19.07.8"
VERSION_ID="19.07.8"
HOME_URL="https://openwrt.org/"
BUG_URL="https://bugs.openwrt.org/"
SUPPORT_URL="https://forum.openwrt.org/"
BUILD_ID="r11364-ef56c85848"
OPENWRT_BOARD="ramips/mt76x8"
OPENWRT_ARCH="mipsel_24kc"
OPENWRT_TAINTS="busybox"
OPENWRT_DEVICE_MANUFACTURER="OpenWrt"
OPENWRT_DEVICE_MANUFACTURER_URL="https://openwrt.org/"
OPENWRT_DEVICE_PRODUCT="Generic"
OPENWRT_DEVICE_REVISION="v0"
OPENWRT_RELEASE="OpenWrt 19.07.8 r11364-ef56c85848"
aii-shanker-jj commented 2 years ago

Generated netclient-linux-mips using https://github.com/gravitl/netmaker/blob/master/netclient/bin-maker.sh and on execution in GL-MT1300 device it failed with the following error

syntax error: unexpected "("

shan100github commented 2 years ago

Build file created with environment variable GOOS=linux GOARCH=mipsle GOMIPS=softfloat & works fine with version 0.14.6

Looks like we need to add GOMIPS=softfloat environment variable in https://github.com/gravitl/netmaker/blob/926859ff1858e86c367abc141acb494d8d08f19f/netclient/bin-maker.sh#L23 for generating CPU arch MIPS and provide support in https://github.com/gravitl/netmaker/blob/926859ff1858e86c367abc141acb494d8d08f19f/scripts/netclient-install.sh#L146

shan100github commented 2 years ago

Netmaker server: v0.14.6 Netclient version v0.14.6

shan100github commented 2 years ago

Through https://github.com/gravitl/netmaker/pull/1681 pull request will resolve this issue. Let me close this and for further details please refer fix.