Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 681740

Summary: dev-lang/go-1.12.1 fails to compile on ARM - ERROR: dev-lang/go-1.12.1::gentoo failed (compile phase): build failed (no error message)
Product: Gentoo Linux Reporter: Nuno <can.ecodo.nu.n.o+bugs.gentoo>
Component: Current packagesAssignee: William Hubbs <williamh>
Status: RESOLVED TEST-REQUEST    
Severity: normal CC: arm, sam
Priority: Normal    
Version: unspecified   
Hardware: ARM   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info '=dev-lang/go-1.12.1::gentoo'
environment
go-1.13.10/temp/build.log
environment

Description Nuno 2019-03-25 14:44:40 UTC
Created attachment 570718 [details]
emerge --info '=dev-lang/go-1.12.1::gentoo'

dev-lang/go-1.11.5 also fails to compile.

emerge pretend:

[ebuild     U ] dev-lang/go-1.12.1 [1.10.1] USE="(-gccgo)"


build.log:

```
 * Package:    dev-lang/go-1.12.1
 * Repository: gentoo
 * Maintainer: williamh@gentoo.org
 * USE:        arm elibc_glibc kernel_linux userland_GNU
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking go1.12.1.src.tar.gz to /var/tmp/portage/dev-lang/go-1.12.1/work
>>> Unpacking go-linux-amd64-bootstrap-1.8.tbz to /var/tmp/portage/dev-lang/go-1.12.1/work
>>> Unpacking go-linux-arm-bootstrap-1.8.tbz to /var/tmp/portage/dev-lang/go-1.12.1/work
>>> Unpacking go-linux-arm64-bootstrap-1.8.tbz to /var/tmp/portage/dev-lang/go-1.12.1/work
>>> Unpacking go-linux-ppc64-bootstrap-1.8.tbz to /var/tmp/portage/dev-lang/go-1.12.1/work
>>> Unpacking go-linux-ppc64le-bootstrap-1.8.tbz to /var/tmp/portage/dev-lang/go-1.12.1/work
>>> Unpacking go-linux-s390x-bootstrap-1.8.tbz to /var/tmp/portage/dev-lang/go-1.12.1/work
>>> Unpacking go-linux-386-bootstrap-1.8.tbz to /var/tmp/portage/dev-lang/go-1.12.1/work
>>> Unpacking go-freebsd-amd64-bootstrap-1.8.tbz to /var/tmp/portage/dev-lang/go-1.12.1/work
>>> Unpacking go-freebsd-386-bootstrap-1.8.tbz to /var/tmp/portage/dev-lang/go-1.12.1/work
>>> Unpacking go-darwin-amd64-bootstrap-1.8.tbz to /var/tmp/portage/dev-lang/go-1.12.1/work
>>> Unpacking go-solaris-amd64-bootstrap-1.8.tbz to /var/tmp/portage/dev-lang/go-1.12.1/work
>>> Source unpacked in /var/tmp/portage/dev-lang/go-1.12.1/work
>>> Preparing source in /var/tmp/portage/dev-lang/go-1.12.1/work/go ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-lang/go-1.12.1/work/go ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-lang/go-1.12.1/work/go ...
Building Go cmd/dist using /var/tmp/portage/dev-lang/go-1.12.1/work/go-linux-arm-bootstrap.
 * ERROR: dev-lang/go-1.12.1::gentoo failed (compile phase):
 *   build failed
 * 
 * Call stack:
 *     ebuild.sh, line 124:  Called src_compile
 *   environment, line 1150:  Called die
 * The specific snippet of code:
 *       ./make.bash || die "build failed"
 * 
 * If you need support, post the output of `emerge --info '=dev-lang/go-1.12.1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-lang/go-1.12.1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-lang/go-1.12.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-lang/go-1.12.1/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-lang/go-1.12.1/work/go/src'
 * S: '/var/tmp/portage/dev-lang/go-1.12.1/work/go'
```
Comment 1 Nuno 2019-03-25 14:45:51 UTC
Created attachment 570720 [details]
environment
Comment 2 William Hubbs gentoo-dev 2019-03-31 19:42:36 UTC
@arm:
Go 1.12.1 is stable on arm, so if you can assist me with
figuring out what is going on here it would be greatly appreciated.

Thanks,

William
Comment 3 Nuno 2019-08-29 22:10:41 UTC
dev-lang/go-1.12.5 is also affected. Tried both with and without 'system-bootstrap'.

emerge -pqv '=dev-lang/go-1.12.5::gentoo'
[ebuild     U ] dev-lang/go-1.12.5 [1.12.1] USE="system-bootstrap%* -gccgo"


 * Package:    dev-lang/go-1.12.5
 * Repository: gentoo
 * Maintainer: williamh@gentoo.org
 * USE:        arm elibc_glibc kernel_linux system-bootstrap userland_GNU
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking go1.12.5.src.tar.gz to /var/tmp/portage/dev-lang/go-1.12.5/work
>>> Source unpacked in /var/tmp/portage/dev-lang/go-1.12.5/work
>>> Preparing source in /var/tmp/portage/dev-lang/go-1.12.5/work/go ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-lang/go-1.12.5/work/go ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-lang/go-1.12.5/work/go ...
Building Go cmd/dist using /usr/lib/go.
 * ERROR: dev-lang/go-1.12.5::gentoo failed (compile phase):
 *   build failed
 * 
 * Call stack:
 *     ebuild.sh, line 124:  Called src_compile
 *   environment, line 1169:  Called die
 * The specific snippet of code:
 *       ./make.bash || die "build failed"
 * 
 * If you need support, post the output of `emerge --info '=dev-lang/go-1.12.5::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-lang/go-1.12.5::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-lang/go-1.12.5/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-lang/go-1.12.5/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-lang/go-1.12.5/work/go/src'
 * S: '/var/tmp/portage/dev-lang/go-1.12.5/work/go'


------

I tried running './make.bash' manually and it works...

portage@banana:~/dev-lang/go-1.12.5/work/go/src$ ./make.bash
Building Go cmd/dist using /usr/lib/go.
Building Go toolchain1 using /usr/lib/go.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
Building Go toolchain3 using go_bootstrap and Go toolchain2.
Building packages and commands for linux/arm.
---
Installed Go for linux/arm in /var/tmp/portage/dev-lang/go-1.12.5/work/go
Installed commands in /var/tmp/portage/dev-lang/go-1.12.5/work/go/bin
portage@banana:~/dev-lang/go-1.12.5/work/go/src$ 


Anything else I can try to debug this, let me know. Meanwhile, I've been updating go using a binary package from another host.
Comment 4 Nuno 2019-12-29 19:28:21 UTC
dev-lang/go-1.12.13 still affected. Tried both with and without system-bootstrap:

[ebuild     U ] dev-lang/go-1.12.13 [1.12.5] USE="-gccgo -system-bootstrap"
[ebuild     U ] dev-lang/go-1.12.13 [1.12.5] USE="system-bootstrap* -gccgo"



build.log:

>  * Package:    dev-lang/go-1.12.13
>  * Repository: gentoo
>  * Maintainer: williamh@gentoo.org
>  * USE:        arm elibc_glibc kernel_linux system-bootstrap userland_GNU
>  * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
> >>> Unpacking source...
> >>> Unpacking go1.12.13.src.tar.gz to /var/tmp/portage/dev-lang/go-1.12.13/work
> >>> Source unpacked in /var/tmp/portage/dev-lang/go-1.12.13/work
> >>> Preparing source in /var/tmp/portage/dev-lang/go-1.12.13/work/go ...
> >>> Source prepared.
> >>> Configuring source in /var/tmp/portage/dev-lang/go-1.12.13/work/go ...
> >>> Source configured.
> >>> Compiling source in /var/tmp/portage/dev-lang/go-1.12.13/work/go ...
> Building Go cmd/dist using /usr/lib/go.
>  * ERROR: dev-lang/go-1.12.13::gentoo failed (compile phase):
>  *   build failed
>  * 
>  * Call stack:
>  *     ebuild.sh, line 125:  Called src_compile
>  *   environment, line 1169:  Called die
>  * The specific snippet of code:
>  *       ./make.bash || die "build failed"
>  * 
>  * If you need support, post the output of `emerge --info '=dev-lang/go-1.12.13::gentoo'`,
>  * the complete build log and the output of `emerge -pqv '=dev-lang/go-1.12.13::gentoo'`.
>  * The complete build log is located at '/var/tmp/portage/dev-lang/go-1.12.13/temp/build.log'.
>  * The ebuild environment file is located at '/var/tmp/portage/dev-lang/go-1.12.13/temp/environment'.
>  * Working directory: '/var/tmp/portage/dev-lang/go-1.12.13/work/go/src'
>  * S: '/var/tmp/portage/dev-lang/go-1.12.13/work/go'
Comment 5 Nuno 2020-03-12 16:20:36 UTC
dev-lang/go-1.13.8 (current stable) still affected.


build.log:

 * Package:    dev-lang/go-1.13.8
 * Repository: gentoo
 * Maintainer: williamh@gentoo.org
 * USE:        arm elibc_glibc kernel_linux userland_GNU
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking go1.13.8.src.tar.gz to /var/tmp/portage/dev-lang/go-1.13.8/work
>>> Source unpacked in /var/tmp/portage/dev-lang/go-1.13.8/work
>>> Preparing source in /var/tmp/portage/dev-lang/go-1.13.8/work/go ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-lang/go-1.13.8/work/go ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-lang/go-1.13.8/work/go ...
Building Go cmd/dist using /usr/lib/go.
 * ERROR: dev-lang/go-1.13.8::gentoo failed (compile phase):
 *   build failed
 * 
 * Call stack:
 *     ebuild.sh, line 125:  Called src_compile
 *   environment, line 1135:  Called die
 * The specific snippet of code:
 *       ./make.bash || die "build failed"
 * 
 * If you need support, post the output of `emerge --info '=dev-lang/go-1.13.8::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-lang/go-1.13.8::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-lang/go-1.13.8/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-lang/go-1.13.8/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-lang/go-1.13.8/work/go/src'
 * S: '/var/tmp/portage/dev-lang/go-1.13.8/work/go'
Comment 6 William Hubbs gentoo-dev 2020-04-18 18:29:10 UTC
*** Bug 653394 has been marked as a duplicate of this bug. ***
Comment 7 William Hubbs gentoo-dev 2020-04-18 18:40:18 UTC
I have spoken with the arm team and been advised that this issue must be
related to hardware. They are unable to reproduce it.

So, can you assist us by telling us what arm hardware you are using?

Thanks,

William
Comment 8 Nuno 2020-04-18 22:01:24 UTC
Hello, William,

The hardware is a Banana Pi M1 (Allwinner A20).

banana:~$ lscpu 
Architecture:        armv7l
Byte Order:          Little Endian
CPU(s):              2
On-line CPU(s) list: 0,1
Thread(s) per core:  1
Core(s) per socket:  2
Socket(s):           1
Vendor ID:           ARM
Model:               4
Model name:          Cortex-A7
Stepping:            r0p4
CPU max MHz:         1008.0000
CPU min MHz:         60.0000
BogoMIPS:            1436.46
Flags:               swp half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt

banana:~$ cat /proc/cpuinfo 
Processor	: ARMv7 Processor rev 4 (v7l)
processor	: 0
BogoMIPS	: 1436.46

processor	: 1
BogoMIPS	: 1436.46

Features	: swp half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xc07
CPU revision	: 4

Hardware	: sun7i
Revision	: 0000
Serial		: 0000000000000000


It's running the sunxi-3.4 kernel https://github.com/linux-sunxi/linux-sunxi/tree/sunxi-3.4

The board has been running 24/7 for 4 years now, so I won't be totally surprised if it's a hardware problem. However, I don't remember having issues with it that would make me suspect a hardware problem.

I am happy to follow additional steps to debug the problem, but unfortunately I don't know what to try and the lack of an error message does not help.


Thanks,
Nuno
Comment 9 Larry the Git Cow gentoo-dev 2020-05-09 18:20:38 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=715c2f4a2fd537e86490a18a1df5729bdf471fbb

commit 715c2f4a2fd537e86490a18a1df5729bdf471fbb
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2020-05-09 18:16:00 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2020-05-09 18:19:38 +0000

    dev-lang/go: turn on bash tracing for build step
    
    Add the "-x" option when we run make.bash.
    This will hopefully allow us to solve why go isn't building on some arm
    hardware.
    
    Bug: https://bugs.gentoo.org/681740
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 dev-lang/go/go-1.12.17.ebuild | 2 +-
 dev-lang/go/go-1.13.10.ebuild | 2 +-
 dev-lang/go/go-1.14.2.ebuild  | 2 +-
 dev-lang/go/go-9999.ebuild    | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
Comment 10 William Hubbs gentoo-dev 2020-05-09 18:23:10 UTC
Please re-sync your tree in the next hour or so and try again.
The build step will now be much more verbose, so attach the build log
when it fails.

Thanks,

William
Comment 11 Nuno 2020-05-10 02:25:43 UTC
Created attachment 637220 [details]
go-1.13.10/temp/build.log

build.log for dev-lang/go-1.13.10 as of portage tree commit
ff847fd1b212359109b301db4e349a433ad604d3 1589050231 2020-05-09T18:50:31+00:00


It seems "./cmd/dist/dist env -p" is failing but doesn't give any error message.

But if I run it as portage, it works:

portage@banana:~/dev-lang/go-1.13.10/work/go/src$ GOROOT=/var/tmp/portage/dev-lang/go-1.13.10/work/go ./cmd/dist/dist env -p
GOARCH="arm"
GOBIN="/var/tmp/portage/dev-lang/go-1.13.10/work/go/bin"
GOCACHE="/var/tmp/portage/dev-lang/go-1.13.10/work/go/pkg/obj/go-build"
GODEBUG=""
GOHOSTARCH="arm"
GOHOSTOS="linux"
GOOS="linux"
GOPROXY=""
GOROOT="/var/tmp/portage/dev-lang/go-1.13.10/work/go"
GOTMPDIR=""
GOTOOLDIR="/var/tmp/portage/dev-lang/go-1.13.10/work/go/pkg/tool/linux_arm"
GOARM="7"
PATH="/var/tmp/portage/dev-lang/go-1.13.10/work/go/bin:/usr/lib/llvm/8/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin"
portage@banana:~/dev-lang/go-1.13.10/work/go/src$ echo $?
0

If I run "bash -x ./make.bash" as portage (in "su - portage -s /bin/bash") it also works. Maybe some env variable is missing? Any suggestions?

Thanks,
Nuno
Comment 12 Nuno 2020-05-10 02:26:36 UTC
Created attachment 637222 [details]
environment
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-09-01 01:52:03 UTC
I can't for the life of me reproduce this. Is this still happening?
Comment 14 Nuno 2020-09-24 04:30:23 UTC
Was not able to reproduce using dev-lang/go-1.14.7 and dev-lang/go-1.15.2 :)
Both compiled and installed fine!

I guess whatever the problem was, it's gone.