LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 02-22-2020, 10:53 AM   #1
Pigi_102
Member
 
Registered: Aug 2008
Posts: 186

Rep: Reputation: 22
google-go-lang doesn't compile on -current ( ? )


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 )
Code:
14705 root      20   0  515420 505136  19012 R  99.7  52.6  46:44.74 go1
and also straceing it don't shows nothing:

Code:
root@casa:/etc/rc.d# strace -f -p 14705
strace: Process 14705 attached
Any hint ?

Thanks in advance

Pierluigi
 
Old 02-22-2020, 01:31 PM   #2
Tonus
Senior Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-15.0
Posts: 1,405
Blog Entries: 3

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
google-go-lang doesn't compile on -current ( ? )

How long did you let it to finish the job? On my Pi it takes forever (pi3 or pi4) without any info on screen but it is working.

The only fail I had was on 32bit with an old archos 10 (and have not investigate that).
 
Old 02-22-2020, 02:53 PM   #3
Pigi_102
Member
 
Registered: Aug 2008
Posts: 186

Original Poster
Rep: Reputation: 22
On firt try I let the build go for a couple hours or more.
I also had the Pi almost hang with a load of 24+ and an exception stack
Code:
[ 5896.174823] INFO: task kworker/3:2:5078 blocked for more than 120 seconds.
[ 5896.174836]       Tainted: G         C        4.19.80-v7+ #1
[ 5896.174842] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 5896.174850] kworker/3:2     D    0  5078      2 0x00000000
[ 5896.174883] Workqueue: events_freezable mmc_rescan
[ 5896.174917] [<808563d0>] (__schedule) from [<80856b28>] (schedule+0x4c/0xac)
[ 5896.174934] [<80856b28>] (schedule) from [<806aec74>] (__mmc_claim_host+0xe0/0x238)
[ 5896.174953] [<806aec74>] (__mmc_claim_host) from [<806aee04>] (mmc_get_card+0x38/0x3c)
[ 5896.174971] [<806aee04>] (mmc_get_card) from [<806b7e0c>] (mmc_sd_detect+0x24/0x7c)
[ 5896.174989] [<806b7e0c>] (mmc_sd_detect) from [<806b1298>] (mmc_rescan+0xe8/0x3f8)
[ 5896.175009] [<806b1298>] (mmc_rescan) from [<8013be88>] (process_one_work+0x234/0x510)
[ 5896.175027] [<8013be88>] (process_one_work) from [<8013cf50>] (worker_thread+0x60/0x5b4)
[ 5896.175042] [<8013cf50>] (worker_thread) from [<801429cc>] (kthread+0x16c/0x174)
[ 5896.175058] [<801429cc>] (kthread) from [<801010ac>] (ret_from_fork+0x14/0x28)
[ 5896.175065] Exception stack(0xa6f05fb0 to 0xa6f05ff8)
Now I changed some vm_dirty parameters to try to get the build running .

I will let the build go overnight, but I suspect it will not end.

Let's see what happens.

Pigi
 
Old 02-23-2020, 01:52 AM   #4
Pigi_102
Member
 
Registered: Aug 2008
Posts: 186

Original Poster
Rep: Reputation: 22
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.
 
Old 02-23-2020, 12:27 PM   #5
Pigi_102
Member
 
Registered: Aug 2008
Posts: 186

Original Poster
Rep: Reputation: 22
No joy also on this one.
The build stopped with:
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/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.

Did someone had more chance than me ?

Pigi
 
Old 02-24-2020, 10:39 AM   #6
shelldweller
Member
 
Registered: Mar 2019
Distribution: Slackware
Posts: 300

Rep: Reputation: Disabled
more swap

Quote:
Originally Posted by Pigi_102 View Post
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.
 
Old 02-24-2020, 11:51 AM   #7
Pigi_102
Member
 
Registered: Aug 2008
Posts: 186

Original Poster
Rep: Reputation: 22
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.
 
Old 02-25-2020, 02:08 PM   #8
Dunc.
Member
 
Registered: Jul 2012
Location: Cumbria UK
Distribution: Slackware
Posts: 58

Rep: Reputation: 30
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.

Dunc.
 
Old 02-25-2020, 05:29 PM   #9
Pigi_102
Member
 
Registered: Aug 2008
Posts: 186

Original Poster
Rep: Reputation: 22
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}
Maybe it could help.
 
Old 03-28-2020, 09:00 AM   #10
shelldweller
Member
 
Registered: Mar 2019
Distribution: Slackware
Posts: 300

Rep: Reputation: Disabled
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.

Here 'tis:

https://3space.xyz/pineslarm/package...h64-1ponce.tgz

https://3space.xyz/pineslarm/package...1ponce.tgz.md5

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.
 
Old 03-28-2020, 05:44 PM   #11
Exaga
SARPi Maintainer
 
Registered: Nov 2012
Distribution: Slackware AArch64
Posts: 1,043

Rep: Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665
Quote:
Originally Posted by Pigi_102 View Post
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
 
1 members found this post helpful.
Old 04-03-2020, 02:58 AM   #12
Exaga
SARPi Maintainer
 
Registered: Nov 2012
Distribution: Slackware AArch64
Posts: 1,043

Rep: Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665
additional docker related slackware arm -current packages

Additional docker related pkgs have been built for Slackware ARM -current. These are; containerd, docker-proxy, and tini.

Available from the SARPi website downloads page: https://sarpi.fatdog.eu/index.php?p=downloads

I hope you find them useful.
 
1 members found this post helpful.
Old 09-04-2020, 02:10 PM   #13
shelldweller
Member
 
Registered: Mar 2019
Distribution: Slackware
Posts: 300

Rep: Reputation: Disabled
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:

https://3space.xyz/pineslarm/package...-1_shldwlr.tgz
https://3space.xyz/pineslarm/package...hldwlr.tgz.md5
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] $LANG per user doesn't obey the global $LANG set in /etc/profile.d/lang.sh me_h Slackware 23 11-20-2016 07:28 AM
Slackware 13.37 doesn't consider setting of LANG in /etc/profile.d/lang.sh after 'su' Didier Spaier Slackware 5 12-14-2013 02:24 PM
Exception in thread "main" java.lang.NoClassDefFoundError: org/aspectj/lang/Signature canonas Linux - Software 3 06-16-2008 04:00 AM
What is the use of lang in <head lang=''> tooparam Programming 2 02-01-2006 05:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 02:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration