techahold/rustdeskinstall

downloaded gohttpserver on Raspberry Pi 3 Model B Rev 1.2 isn't armv7l format

jontio opened this issue · 8 comments

On a Raspberry Pi 3 Model B Rev 1.2 (ARMv7) the install script downloads a 64bit ARM file ( gohttpserver_1.1.4_linux_arm64.tar.gz ) but ARMv7 doesn't support 64 bit. So gohttpserver doesn't run.

The gohttpserver repo doesn't have a armv7l compiled version so that's a bit of a bother. So that means either asking the codeskyblue/gohttpserver people to compile one in their releases or build it.

Currently I think the install script should say to the user gohttpserver isn't supported for armv7l and not install it if it detects armv7l using uname -m.

I don't know anything about the go language but gave compiling a very quick go. This failed...

sudo apt install golang
go install github.com/codeskyblue/gohttpserver@latest
...
can't load package: package github.com/codeskyblue/gohttpserver@latest: cannot use path@version syntax in GOPATH mode

The go version apt installed was go version go1.11.6 linux/arm

and this also failed...

git clone https://github.com/codeskyblue/gohttpserver.git
cd gohttpserver
go build
...
build github.com/codeskyblue/gohttpserver: cannot find module for path embed

I'll add that in at some point

by looking at this https://www.raspberrypi.com/software/operating-systems/ it looks to me like the 3B is 64bit which is what I have put into the script

changed 64bit in 81b67ce

by looking at this https://www.raspberrypi.com/software/operating-systems/ it looks to me like the 3B is 64bit which is what I have put into the script

I see what's happened. I'm running a 32bit OS and when that happens uname -m returns armv7l. Likewise cat /proc/cpuinfo says...

Hardware        : BCM2835
Revision        : a22082
Serial          : 0000000066d226ed
Model           : Raspberry Pi 3 Model B Rev 1.2

Likewise lscpu says armv7l. The confusion is explained at https://forums.raspberrypi.com/viewtopic.php?t=140572

Everything apart from the gohttpserver works fine on armv7l so your script is good for pis running just the rustdesk server with 32bit OSes.

According to https://forums.raspberrypi.com/viewtopic.php?t=302345 uname -m will return aarch64 on 64 bit OS pis. So maybe at line 222...

if [ "${ARCH}" = "armv7l" ] ; then
echo "Go HTTP Server not supported on 32bit ARM devices but rustdesk server is now installed on your 32bit ARM device"
exit 0
fi

Maybe also...

echo "Installing Go HTTP Server"
if [ "${ARCH}" = "armv7l" ] ; then
wget "https://github.com/codeskyblue/gohttpserver/releases/download/${GOHTTPLATEST}/gohttpserver_${GOHTTPLATEST}_linux_amd64.tar.gz"
tar -xf  gohttpserver_${GOHTTPLATEST}_linux_amd64.tar.gz 
elif [ "${ARCH}" =  "aarch64" ] ; then
wget "https://github.com/codeskyblue/gohttpserver/releases/download/${GOHTTPLATEST}/gohttpserver_${GOHTTPLATEST}_linux_arm64.tar.gz"
tar -xf  gohttpserver_${GOHTTPLATEST}_linux_arm64.tar.gz
elif [ "${ARCH}" = "armv7l" ] ; then
echo "Go HTTP Server not supported on 32bit ARM devices"
exit 1
fi

Yes that makes sense!

Sorry had a slow moment earlier.

I'll update it now.

Updated both now, but I reckon if you try and install on 64bit raspbian on a pi 3 it'll now not install, see what comes up, I'm sure someone will open another issue if that happens lol.

Thanks that looks good. I installed 64bit raspbian to test that it still works on a 64bit ARM OS and the gohttpserver installs and runs fine. So I think everything should be good.

Awesome!

Thanks for testing it 😀