[SOLVED] google-go-lang doesn't compile on -current ( ? )
Slackware - ARMThis forum is for the discussion of Slackware ARM.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi all,
as stated in another thread I would like to get docker running on mi raspberry and I'm ( trying to ) using SBo script for this.
docker slackbuild has quite a bit of dependencies but the really first one is google-go-lang ( which need gcc-go as bootstrap ).
I managed to get gcc-go installed ( after an update to latest current ) but when I try to build google-go-lang it does not finish.
No error nor nothing strange.
The only thing is that one of the go1 process forked from the build stay in memory for ever, occupying 100% or more of cpu:
( from top )
After a whole night something has moved.
The build has gone further but ended up with an error:
Code:
Building Go cmd/dist using /usr.
Building Go toolchain1 using /usr.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
# cmd/internal/bio
runtime: failed mSpanList.remove span.npages=7 span=0x75e85ce8 prev=0x0 span.list=0x76f31550 list=0x76f31558
fatal error: mSpanList.remove
and a bunch of other errors following this.
Now I'm trying to recompile again the go1.13.7 ( I was trying the go1.13.8 ) and let him go all day.
Building Go cmd/dist using /usr.
Building Go toolchain1 using /usr.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
# cmd/cgo
src/cmd/cgo/gcc.go:1213:2: internal compiler error: '(*Package).isType': panic during likelyadjust while compiling (*Package).isType:
runtime error: index out of range
goroutine 7 [running]:
ssa.Compile..func1
/tmp/SBo/package-google-go-lang/usr/lib/go1.13.7/go/src/cmd/compile/internal/ssa/compile.go:43
panic
and a third run, after adding 1G of swap, lead to a complete hang of the Pi.
To recover I had to powercycl completely the Pi.
and a third run, after adding 1G of swap, lead to a complete hang of the Pi.
To recover I had to powercycl completely the Pi.
Did someone had more chance than me ?
FWIW, I have successfully built google-go-lang on a NanoPi NeoCore2 running Slarm64, but I had to add a 4GB swap file, because my usual 2GB swap file was not large enough. The error messages were never very explicit, the process would just be killed due to running out of memory. Doubling my swap file size did the trick. 4GB might be overkill, but 2GB was not enough on my machine. YMMV.
At the moment I'm evaluating the possibilities to use the tar file provided by the golang.org for armv6l ( which seems to work ) and package it using the same technique used for chrome slackbuild.
Open the package under some SBo dir and use the makepkg on it.
I spent the last three days ( whole day ) for this and also with 2G swap I didn't succeded.
I suspect that also the processor is a bit on the low side for this.
Or eventually my SDcard.
I could not get go-lang to build either. I downloaded a pre-built version from here https://golang.org/dl/ - you need the arm6l version. They recommend unpacking it into /usr/local and then adding /usr/local/go/bin to your PATH by editing /etc/profile. I have docker working.
I did something similar too.
I downloaded the prebuilt as you did but have modified the slackbuild to use this to create a SBo package from the prebuilt.
In this way I can rebuild the package ( and remove it clean when needed ).
Code:
#!/bin/sh
# Slackware build script for google-go-lang
# Written by Eric Schultz eric at schultzter.ca
# Taken over by Vincent Batts vbatts@hashbangbash.com
# Copyright (c) 2012, 2013, 2014, 2015, 2016, 2017, 2018 Vincent Batts
# Copyright (c) 2012 Eric Schultz
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
# the Software, and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
PRGNAM=google-go-lang
VERSION=${VERSION:-1.13.8}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
RELEASE=${RELEASE:-linux}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
if [ "$ARCH" = "i586" ]; then
LIBDIRSUFFIX=""
GOARCH="386"
elif [ "$ARCH" = "x86_64" ]; then
LIBDIRSUFFIX="64"
GOARCH="amd64"
elif [ "$ARCH" = "arm" ]; then
LIBDIRSUFFIX=""
GOARCH="arm"
export GOARM="6" # can be '5' as well, to use soft float instead of hardware
else
LIBDIRSUFFIX=""
GOARCH=386
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
set -e
rm -rf $PKG
mkdir -p $TMP $PKG/usr/lib${LIBDIRSUFFIX}/go${VERSION} $OUTPUT
cd $PKG/usr/lib${LIBDIRSUFFIX}/go${VERSION}
tar xvf $CWD/go${VERSION}.linux-armv6l.tar.gz
cd go
#chown -R root:root .
#find -L . \
# \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
# -o -perm 511 \) -exec chmod 755 {} \; -o \
# \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
# -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# as of >= go1.5, the cross-compiler does not need to be bootstrap, so the
# compiler need only be compiled for the host OS, which it detects
unset GOBIN GOPATH GOOS GOARCH
unset BASH_ENV # Not sure why, but this causes run.bash to fail --rworkman
export GOROOT_BOOTSTRAP="/usr" # gcc 5+ is go1.4 API, so we'll bootstrap with it
export GOROOT="$(pwd)"
export GOROOT_FINAL="/usr/lib${LIBDIRSUFFIX}/go${VERSION}/go"
# Put the profile scripts for setting PATH and env variables
mkdir -p $PKG/etc/profile.d
cat > $PKG/etc/profile.d/go.csh << EOF
#!/bin/csh
setenv GOROOT ${GOROOT_FINAL}
setenv PATH \${GOROOT}/bin:\${PATH}
EOF
cat > $PKG/etc/profile.d/go.sh << EOF
#!/bin/sh
export GOROOT="${GOROOT_FINAL}"
export PATH="\${GOROOT}/bin:\${PATH}"
EOF
chmod 0755 $PKG/etc/profile.d/go.csh
chmod 0755 $PKG/etc/profile.d/go.sh
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
AUTHORS CONTRIBUTING.md CONTRIBUTORS LICENSE PATENTS README.md VERSION \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
I know this thread is getting kinda old, and that other solutions were already found... However I recently had to rebuild my google-go-lang package on Slarm64 and this time I saved it and uploaded it to share with others, if anyone interested.
FWIW, the trick is to make a single continuous 4GB swap file before building, and disable any other swap files or partitions you may have. Even just adding more swap does not work, you need to turn off any swap smaller than 4GB so that it does not get used. 3GB might be okay, but 2GB is definitely insufficient. YMMV.
Hi all,
as stated in another thread I would like to get docker running on mi raspberry and I'm ( trying to ) using SBo script for this.
docker slackbuild has quite a bit of dependencies but the really first one is google-go-lang ( which need gcc-go as bootstrap ).
I managed to get gcc-go installed ( after an update to latest current ) but when I try to build google-go-lang it does not finish.
Any hint ?
Thanks in advance
Pierluigi
Slackware ARM -current pkgs - google-go-lang, docker, libseccomp, runc - are available on the SARPi downloads page if you want to save yourself the time and effort of building them yourself: https://sarpi.fatdog.nl/index.php?p=...ads#currentpkg
Here is a recently built version that matches the one in ponce's SBo -current repository, in case anyone needs this version and does not want to build it themselves:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.