Set up build environment
Set up environment variables and directories
These variables set some options that will be used in some compile steps.
export MYARCH=x86_64
export MYTHREADS=4
export MYCFLAGS="-march=x86-64 -mtune=generic -pipe -O2 -fPIC"
export MYCCFLAGS="-march=x86-64 -mtune=generic -pipe -O2 -fPIC"
sudo mkdir -p /root/packages
sudo mkdir -p /root/installs
Install Adoptium OpenJDK 17 (Optional)
Adoptium provides Java JDK support. This is only required if you are going to build and use LINSTOR.
Extract the binaries to /opt
sudo tar -xf OpenJDK17U-jdk_x64_linux_hotspot_17.0.15_6.tar.gz -C /opt
Update the default path to include Java, add a JAVA_HOME variable
sudo vi /etc/profile
# Around line 14, change the line similar to
# PATH="/usr/local/bin:/usr/bin:/bin:/usr/games"
# to (add /opt/jdk-17.0.14+7/bin: to the front of the current path statement)
PATH="/opt/jdk-17.0.14+7/bin:/opt/go/bin:/usr/local/bin:/usr/bin:/bin:/usr/games"
# Below that line, add
export JAVA_HOME=/opt/jdk-17.0.14+7
Google Go
Slackware provides the Go language via GCC Go. I remove this package and replace it with Google’s version.
Remove GCC Go (version may vary)
removepkg gcc-go-14.2.0-x86_64-2
Extract the binaries to /opt
sudo tar -xf go1.24.2.linux-amd64.tar.gz -C /opt
Update the default path to include Java, add a JAVA_HOME variable
sudo vi /etc/profile
# Around line 14, change the line similar to
# PATH="/usr/local/bin:/usr/bin:/bin:/usr/games"
# to (add /opt/go/bin: to the front of the current path statement)
PATH="/opt/go/bin:/usr/local/bin:/usr/bin:/bin:/usr/games"
# Below that line, add
export GO_HOME=/opt/go
Both Packages
With both packages installed, PATH will be as such
PATH="/opt/jdk-17.0.15+6/bin:/opt/go/bin:/usr/local/bin:/usr/bin:/bin:/usr/games"