I would like to upgrade obfs4proxy on my Debian “Buster” server. Unfortunately there is no current Debian package for Buster at the moment. So I did build it from source. The build process ran without any issues, but when I run obfs4proxy, I immediately get an error:
Create a file /etc/apt/sources.list.d/buster-backports.list that contains the line:
deb http://deb.debian.org/debian bullseye-backports main
apt-get update
apt-get install -t buster-backports golang
The runtime error you get with go1.12 is surprising. It looks like it’s the result of the compiler running global variable initialization in the wrong order. Specifically, the initialization of identity calls SetBytes which calls Subtract on the global variable feOne—but apparently feOne has not been initialized at that point. The compiler should initialize feOne before identity, but it initializes identity before feOne.
It surprises me because the order of global variable initialization is specified to examine the dependencies between variables and initialize them in the proper order. But there are also issues like #51913, so perhaps this is something that has changed over versions.