Go 1.10 works for me on FreeBSD-CURRENT / arm, but I’d love an arm64 port.
I will plus this
I made an attempt: https://github.com/myfreeweb/go/commit/04a920776cbee1428cb698503e1c99784475cf53
It compiles, and even does some syscalls, but crashes when starting the first thread.
I wonder if it's possible to take my patches to the standard library and use gccgo with them?
@myfreeweb Patches like adding build tags here and there are likely the same for gccgo and gc. But gccgo has no equivalent to runtime/sys_freebsd_arm64.s.
Anyone working on this?
I'm also interested in this but haven't looked to see how much effort would be involved.
I try.
"go version" is work, but src/make.bash not work.
# uname -a
FreeBSD pine64-01.os-hackers.jp 13.0-CURRENT FreeBSD 13.0-CURRENT r340361 GENERIC arm64
# go version
go version devel +04a920776c Mon Jul 16 19:43:23 2018 +0300 freebsd/arm64
````
my fixes are,
diff --git a/src/runtime/sys_freebsd_arm64.s b/src/runtime/sys_freebsd_arm64.s
index 887c4a3ef1..d637e21a3a 100644
--- a/src/runtime/sys_freebsd_arm64.s
+++ b/src/runtime/sys_freebsd_arm64.s
@@ -13,7 +13,7 @@
#define AT_FDCWD -100
#define CLOCK_REALTIME 0
-#define CLOCK_MONOTONIC 1
+#define CLOCK_MONOTONIC 4
#define SYS_exit 1
#define SYS_read 3
@@ -57,27 +57,31 @@ TEXT runtime揃sys_umtx_op(SB),NOSPLIT,$0
TEXT runtime揃thr_new(SB),NOSPLIT,$0
MOVD param+0(FP), R0
TEXT runtime揃thr_start(SB),NOSPLIT,$0
// set up g
MOVD R8, (R8)
RET
TEXT runtime揃exit(SB),NOSPLIT|NOFRAME,$0-4
MOVW code+0(FP), R0
MOVD $SYS_exit, R8
SVC
MOVD R8, (R8)
RET
// func exitThread(wait *uint32)
```
I fix to pass argc/argv.
current diff:
diff --git a/src/runtime/rt0_freebsd_arm64.s b/src/runtime/rt0_freebsd_arm64.s
index db0e16886f..8745e922b8 100644
--- a/src/runtime/rt0_freebsd_arm64.s
+++ b/src/runtime/rt0_freebsd_arm64.s
@@ -5,8 +5,8 @@
#include "textflag.h"
TEXT _rt0_arm64_freebsd(SB),NOSPLIT|NOFRAME,$0
- MOVD 0(RSP), R0 // argc
- ADD $8, RSP, R1 // argv
+ ADD $8, R0, R1 // argv
+ MOVW 0(R0), R0 // argc
BL main(SB)
// When building with -buildmode=c-shared, this symbol is called when the shared
@@ -35,7 +35,7 @@ TEXT _rt0_arm64_freebsd_lib(SB),NOSPLIT,$184
// Initialize g as null in case of using g later e.g. sigaction in cgo_sigaction.go
MOVD ZR, g
- MOVD R0, _rt0_arm64_freebsd_lib_argc<>(SB)
+ MOVW R0, _rt0_arm64_freebsd_lib_argc<>(SB)
MOVD R1, _rt0_arm64_freebsd_lib_argv<>(SB)
// Synchronous initialization.
@@ -82,13 +82,13 @@ restore:
RET
TEXT _rt0_arm64_freebsd_lib_go(SB),NOSPLIT,$0
- MOVD _rt0_arm64_freebsd_lib_argc<>(SB), R0
+ MOVW _rt0_arm64_freebsd_lib_argc<>(SB), R0
MOVD _rt0_arm64_freebsd_lib_argv<>(SB), R1
MOVD $runtime揃rt0_go(SB),R4
B (R4)
-DATA _rt0_arm64_freebsd_lib_argc<>(SB)/8, $0
-GLOBL _rt0_arm64_freebsd_lib_argc<>(SB),NOPTR, $8
+DATA _rt0_arm64_freebsd_lib_argc<>(SB)/4, $0
+GLOBL _rt0_arm64_freebsd_lib_argc<>(SB),NOPTR, $4
DATA _rt0_arm64_freebsd_lib_argv<>(SB)/8, $0
GLOBL _rt0_arm64_freebsd_lib_argv<>(SB),NOPTR, $8
diff --git a/src/runtime/sys_freebsd_arm64.s b/src/runtime/sys_freebsd_arm64.s
index 887c4a3ef1..e0509457ca 100644
--- a/src/runtime/sys_freebsd_arm64.s
+++ b/src/runtime/sys_freebsd_arm64.s
@@ -13,7 +13,7 @@
#define AT_FDCWD -100
#define CLOCK_REALTIME 0
-#define CLOCK_MONOTONIC 1
+#define CLOCK_MONOTONIC 4
#define SYS_exit 1
#define SYS_read 3
@@ -56,28 +56,30 @@ TEXT runtime揃sys_umtx_op(SB),NOSPLIT,$0
RET
TEXT runtime揃thr_new(SB),NOSPLIT,$0
- MOVD param+0(FP), R0
- MOVD size+8(FP), R1
- MOVW $SYS_thr_new, R8
+ MOVD param+0(FP), R0
+ MOVW size+8(FP), R1
+ MOVD $SYS_thr_new, R8
SVC
MOVW R0, ret+16(FP)
RET
TEXT runtime揃thr_start(SB),NOSPLIT,$0
// set up g
- MOVD R10, g_m(R11)
- MOVD R11, g
+ MOVD m_g0(R0), g
+ MOVD R0, g_m(g)
//BL runtime揃stackcheck(SB)
BL runtime揃mstart(SB)
- MOVW $2, R8 // crash (not reached)
- MOVW R8, (R8)
+ MOVD $2, R8 // crash (not reached)
+ MOVD R8, (R8)
RET
TEXT runtime揃exit(SB),NOSPLIT|NOFRAME,$0-4
MOVW code+0(FP), R0
MOVD $SYS_exit, R8
SVC
+ MOVD $0, R8 // crash (not reached)
+ MOVD R8, (R8)
RET
// func exitThread(wait *uint32)
@tklauser what's the status here? do these patches enable cross compilation for freebsd-arm64 already?
@ziprandom yes, building a bootstrap toolchain should already work.
nice! and what's missing before this can be merged?
@ziprandom I think we'll need to get Go building completely on freebsd/arm64
first. Also, as per https://golang.org/wiki/PortingPolicy we'd need someone to maintain the port, a builder for https://build.golang.org and someone willing to maintain that builder.
Change https://golang.org/cl/155978 mentions this issue: unix: add support for freebsd/arm64
Change https://golang.org/cl/156499 mentions this issue: route: add support for freebsd/arm64
golang 1.12 is released.
Anyone work to update patches, from 1.10 to 1.12 ?
With @tklauser freebsd-arm64
branch rebased on current master and a few more tweaks (https://github.com/dmgk/go), I was able to build the compiler/standard lib and run a few simple programs.
% uname -a
FreeBSD rpi3.localdomain 13.0-CURRENT FreeBSD 13.0-CURRENT r346544 GENERIC arm64
% go version
go version devel +271222c098 Fri Apr 26 12:51:33 2019 -0500 freebsd/arm64
Known issues:
"Should not have claimed to be relaxable"
- I don't know if there errors are specific to 13.0-CURRENT only:# cmd/pprof
/usr/home/dmgk/go/pkg/tool/freebsd_arm64/link: running clang failed: exit status 254
Should not have claimed to be relaxable
UNREACHABLE executed at /home/dmgk/freebsd/current/contrib/llvm/tools/lld/ELF/Target.cpp:17 6!
clang: error: unable to execute command: Abort trap (core dumped)
clang: error: linker command failed due to signal (use -v to see invocation)
# cmd/trace
/usr/home/dmgk/go/pkg/tool/freebsd_arm64/link: running clang failed: exit status 254
Should not have claimed to be relaxable
UNREACHABLE executed at /home/dmgk/freebsd/current/contrib/llvm/tools/lld/ELF/Target.cpp:17 6!
clang: error: unable to execute command: Abort trap (core dumped)
clang: error: linker command failed due to signal (use -v to see invocation)
# cmd/go
/usr/home/dmgk/go/pkg/tool/freebsd_arm64/link: running clang failed: exit status 254
Should not have claimed to be relaxable
UNREACHABLE executed at /home/dmgk/freebsd/current/contrib/llvm/tools/lld/ELF/Target.cpp:17 6!
clang: error: unable to execute command: Abort trap (core dumped)
clang: error: linker command failed due to signal (use -v to see invocation)
go tool dist: FAILED: /usr/home/dmgk/go/pkg/tool/freebsd_arm64/go_bootstrap install -gcflag s=all= -ldflags=all= std cmd: exit status 2
--- FAIL: TestDisableAllCapabilities (0.03s)
cpu_test.go:56: TestAllCapabilitiesDisabled with GODEBUG=cpu.all=off: want PASS, got FAIL
FAIL
FAIL internal/cpu 0.079s
FWIW, I'm also working on it :) https://github.com/MikaelUrankar/go/tree/freebsd-aarch64
It's based on the work of myfreeweb, bsd-hacker and coypoop (netbsd)
I'm able to natively build go and pass the test suite.
I see the same error as dmgk with cgo and clang (it compiles fine with gcc8)
Todo:
Change https://golang.org/cl/181618 mentions this issue: internal/socket: add support for freebsd/arm64
Now I clone dmgk's branch, freebsd-arm64 of https://github.com/dmgk/go.git.
I fix some bugs, and push my branch, issue/24715/porting_go_to_freebsd_arm64 of https://github.com/bsd-hacker/go.git.
I already merge master of https://github.com/golang/go.git to my branch.
--- FAIL: TestDisableAllCapabilities (0.05s)
cpu_test.go:56: TestAllCapabilitiesDisabled with GODEBUG=cpu.all=off: want PASS, got FAIL
FAIL
FAIL internal/cpu 0.133s
go test proxy running at GOPROXY=http://127.0.0.1:62327/mod
--- FAIL: TestScript (0.07s)
--- FAIL: TestScript/std_vendor (1.09s)
script_test.go:191:
# 'go list' should report imports from _test.go in the TestImports field. (0.312s)
# 'go list' should report standard-vendored packages by path. (0.724s)
> go list -f '{{.Dir}}' vendor/golang.org/x/net/http2/hpack
[signal: interrupt]
FAIL: testdata/script/std_vendor.txt:10: test timed out while running command
--- FAIL: TestScript/mod_std_vendor (0.90s)
script_test.go:191:
# 'go list' should report imports from _test.go in the TestImports field. (0.786s)
> go list -f '{{.TestImports}}'
[signal: interrupt]
FAIL: testdata/script/mod_std_vendor.txt:7: test timed out while running command
--- FAIL: TestScript/script_wait (0.07s)
script_test.go:191:
> env GO111MODULE=off
> [!exec:echo] skip
> [!exec:false] skip
> exec echo foo
[signal: interrupt]
FAIL: testdata/script/script_wait.txt:6: test timed out while running command
--- FAIL: TestScript/mod_run_path (0.07s)
script_test.go:191:
# Test that go run does not get confused by conflict
# between go.mod's module path and what you'd
# expect from GOPATH. golang.org/issue/26046. (0.034s)
> env GO111MODULE=on
> cd $GOPATH/src/example.com/hello
$WORK/gopath/src/example.com/hello
> go run main.go
[signal: interrupt]
FAIL: testdata/script/mod_run_path.txt:8: test timed out while running command
--- FAIL: TestScript/mod_vendor_replace (0.13s)
script_test.go:191:
# Before vendoring, we expect to see the original directory. (0.067s)
> go list -f '{{.Version}} {{.Dir}}' -m rsc.io/quote/v3
[signal: interrupt]
FAIL: testdata/script/mod_vendor_replace.txt:4: test timed out while running command
--- FAIL: TestScript/sum_readonly (1.91s)
script_test.go:191:
# Test that go.sum does not get updated when -mod=readonly flag is set (1.662s)
> env GO111MODULE=on
> go get -d rsc.io/quote
[stderr]
go: finding rsc.io/quote v1.5.2
go: downloading rsc.io/quote v1.5.2
go: extracting rsc.io/quote v1.5.2
go: downloading rsc.io/sampler v1.3.0
go: extracting rsc.io/sampler v1.3.0
go: downloading golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
go: extracting golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
[signal: interrupt]
FAIL: testdata/script/sum_readonly.txt:4: test timed out while running command
--- FAIL: TestScript/run_wildcard (0.08s)
script_test.go:191:
# Fix for https://github.com/golang/go/issues/28696:
# go run x/... should not panic when directory x doesn't exist. (0.055s)
> ! go run nonexistent/...
[signal: interrupt]
FAIL: testdata/script/run_wildcard.txt:6: test timed out while running command
--- FAIL: TestScript/mod_vendor_nodeps (0.07s)
script_test.go:191:
> env GO111MODULE=on
> go mod vendor
[signal: interrupt]
FAIL: testdata/script/mod_vendor_nodeps.txt:3: test timed out while running command
--- FAIL: TestScript/mod_require_exclude (0.09s)
script_test.go:191:
# build with no newer version to satisfy exclude (0.028s)
> env GO111MODULE=on
> ! go list -m all
[signal: interrupt]
FAIL: testdata/script/mod_require_exclude.txt:3: test timed out while running command
--- FAIL: TestScript/mod_run_internal (0.13s)
script_test.go:191:
> env GO111MODULE=on
> go list -e -f '{{.Incomplete}}' runbad1.go
[signal: interrupt]
FAIL: testdata/script/mod_run_internal.txt:3: test timed out while running command
--- FAIL: TestScript/run_hello (0.06s)
script_test.go:191:
# hello world (0.033s)
> go run hello.go
[signal: interrupt]
FAIL: testdata/script/run_hello.txt:4: test timed out while running command
--- FAIL: TestScript/mod_sum_replaced (4.67s)
script_test.go:191:
# After 'go get -d', the go.sum file should contain the sum for the module. (2.024s)
# If we replace the module and run 'go mod tidy', we should get a sum for the replacement. (2.236s)
> go mod edit -replace rsc.io/[email protected]=rsc.io/[email protected]
> go mod tidy
[stderr]
go: downloading rsc.io/quote v1.5.1
go: extracting rsc.io/quote v1.5.1
go: finding rsc.io/testonly v1.0.0
go: downloading rsc.io/testonly v1.0.0
go: extracting rsc.io/testonly v1.0.0
[signal: interrupt]
FAIL: testdata/script/mod_sum_replaced.txt:9: test timed out while running command
--- FAIL: TestScript/prevent_sys_unix_import (0.05s)
script_test.go:191:
# Policy decision: we shouldn't vendor golang.org/x/sys/unix in std
# See https://golang.org/issue/32102 (0.028s)
> env GO111MODULE=on
> go list std
[signal: interrupt]
FAIL: testdata/script/prevent_sys_unix_import.txt:5: test timed out while running command
--- FAIL: TestScript/pattern_syntax_error (0.06s)
script_test.go:191:
# patterns match directories with syntax errors (0.027s)
> ! go list ./...
[signal: interrupt]
FAIL: testdata/script/pattern_syntax_error.txt:4: test timed out while running command
--- FAIL: TestScript/mod_replace_import (0.21s)
script_test.go:191:
# 'go list -mod=readonly' should not add requirements even if they can be
# resolved locally. (0.042s)
> cp go.mod go.mod.orig
> ! go list -mod=readonly all
[signal: interrupt]
FAIL: testdata/script/mod_replace_import.txt:6: test timed out while running command
--- FAIL: TestScript/mod_tidy_sum (0.08s)
script_test.go:191:
# go.sum should list directly used modules and dependencies (0.045s)
> go get -d rsc.io/[email protected]
[signal: interrupt]
FAIL: testdata/script/mod_tidy_sum.txt:4: test timed out while running command
--- FAIL: TestScript/mod_query_exclude (0.07s)
script_test.go:191:
# get excluded version (0.031s)
> cp go.mod1 go.mod
> ! go get rsc.io/[email protected]
[signal: interrupt]
FAIL: testdata/script/mod_query_exclude.txt:6: test timed out while running command
--- FAIL: TestScript/mod_versions (0.07s)
script_test.go:191:
# Test rejection of pkg@version in GOPATH mode. (0.029s)
> env GO111MODULE=off
> ! go get rsc.io/[email protected]
[signal: interrupt]
FAIL: testdata/script/mod_versions.txt:3: test timed out while running command
--- FAIL: TestScript/mod_query (0.05s)
script_test.go:191:
> env GO111MODULE=on
> go list -m -versions rsc.io/quote
[signal: interrupt]
FAIL: testdata/script/mod_query.txt:3: test timed out while running command
--- FAIL: TestScript/mod_vendor (0.42s)
script_test.go:191:
> env GO111MODULE=on
> go list -m all
[signal: interrupt]
FAIL: testdata/script/mod_vendor.txt:3: test timed out while running command
--- FAIL: TestScript/mod_tidy_quote (0.07s)
script_test.go:191:
# Check that mod tidy does not introduce repeated
# require statements when input go.mod has quoted requirements. (0.031s)
> env GO111MODULE=on
> go mod tidy
[signal: interrupt]
FAIL: testdata/script/mod_tidy_quote.txt:5: test timed out while running command
--- FAIL: TestScript/mod_proxy_list (0.08s)
script_test.go:191:
# Proxy that can't serve should fail. (0.038s)
> env GOPROXY=$proxy/404
> ! go get rsc.io/[email protected]
[signal: interrupt]
FAIL: testdata/script/mod_proxy_list.txt:6: test timed out while running command
--- FAIL: TestScript/mod_sumdb_proxy (0.09s)
script_test.go:191:
# basic fetch (through proxy) works (0.052s)
> cp go.mod.orig go.mod
> go get -d rsc.io/[email protected] # note: must use test proxy, does not exist in real world
[signal: interrupt]
FAIL: testdata/script/mod_sumdb_proxy.txt:8: test timed out while running command
--- FAIL: TestScript/mod_symlink (0.10s)
script_test.go:191:
# 'go list' should resolve modules of imported packages. (0.052s)
> go list -deps -f '{{.Module}}' .
[signal: interrupt]
FAIL: testdata/script/mod_symlink.txt:5: test timed out while running command
--- FAIL: TestScript/mod_tidy (0.18s)
script_test.go:191:
# tidy removes unused y, but everything else is used (0.049s)
> go mod tidy -v
[signal: interrupt]
FAIL: testdata/script/mod_tidy.txt:4: test timed out while running command
--- FAIL: TestScript/mod_proxy_https (0.10s)
script_test.go:191:
# GOPROXY file paths must provide the "file://" prefix explicitly. (0.032s)
> env GOPROXY=$WORK/proxydir
> ! go list -versions -m golang.org/x/text
[signal: interrupt]
FAIL: testdata/script/mod_proxy_https.txt:5: test timed out while running command
--- FAIL: TestScript/mod_sumdb_golang (0.07s)
script_test.go:191:
# Test default GOPROXY and GOSUMDB (0.045s)
> env GOPROXY=
> env GOSUMDB=
> go env GOPROXY
[signal: interrupt]
FAIL: testdata/script/mod_sumdb_golang.txt:4: test timed out while running command
--- FAIL: TestScript/mod_test_files (0.11s)
script_test.go:191:
# Testing an explicit source file should use the same import visibility as the
# package in the same directory. (0.030s)
> go list -test -deps
[signal: interrupt]
FAIL: testdata/script/mod_test_files.txt:7: test timed out while running command
--- FAIL: TestScript/mod_patterns_vendor (0.10s)
script_test.go:191:
> env GO111MODULE=on
> go list -mod=vendor example.com/...
[signal: interrupt]
FAIL: testdata/script/mod_patterns_vendor.txt:3: test timed out while running command
--- FAIL: TestScript/vet_deps (0.10s)
script_test.go:191:
# Issue 30296. Verify that "go vet" uses only immediate dependencies.
# First run fills the cache. (0.035s)
> go vet a
[signal: interrupt]
FAIL: testdata/script/vet_deps.txt:6: test timed out while running command
--- FAIL: TestScript/mod_off_init (0.07s)
script_test.go:191:
# 'go mod init' should refuse to initialize a module if it will be
# ignored anyway due to GO111MODULE=off. (0.040s)
> env GO111MODULE=off
> ! go mod init
[signal: interrupt]
FAIL: testdata/script/mod_off_init.txt:4: test timed out while running command
--- FAIL: TestScript/mod_off (0.07s)
script_test.go:191:
# This script tests that running go mod with
# GO111MODULE=off when outside of GOPATH will fatal
# with an error message, even with some source code in the directory and a go.mod. (0.029s)
> ! go mod init
[signal: interrupt]
FAIL: testdata/script/mod_off.txt:6: test timed out while running command
--- FAIL: TestScript/mod_convert_vendor_manifest (0.10s)
script_test.go:191:
# We should not create a go.mod file unless the user ran 'go mod init' explicitly.
# However, we should suggest 'go mod init' if we can find an alternate config file. (0.048s)
> cd $WORK/test/x
$WORK/test/x
> ! go list .
[signal: interrupt]
FAIL: testdata/script/mod_convert_vendor_manifest.txt:6: test timed out while running command
--- FAIL: TestScript/mod_nomod (0.08s)
script_test.go:191:
# Test go commands with no module. (0.000s)
# go mod edit fails unless given explicit mod file argument (0.041s)
> ! go mod edit -json
[signal: interrupt]
FAIL: testdata/script/mod_nomod.txt:5: test timed out while running command
--- FAIL: TestScript/mod_convert_vendor_json (0.12s)
script_test.go:191:
# We should not create a go.mod file unless the user ran 'go mod init' explicitly.
# However, we should suggest 'go mod init' if we can find an alternate config file. (0.061s)
> cd $WORK/test/x
$WORK/test/x
> ! go list .
[signal: interrupt]
FAIL: testdata/script/mod_convert_vendor_json.txt:6: test timed out while running command
--- FAIL: TestScript/vendor_complex (0.21s)
script_test.go:191:
# smoke test for complex build configuration (0.037s)
> go build -o complex.exe complex
[signal: interrupt]
FAIL: testdata/script/vendor_complex.txt:4: test timed out while running command
--- FAIL: TestScript/mod_convert_vendor_conf (0.10s)
script_test.go:191:
# We should not create a go.mod file unless the user ran 'go mod init' explicitly.
# However, we should suggest 'go mod init' if we can find an alternate config file. (0.045s)
> cd $WORK/test/x
$WORK/test/x
> ! go list .
[signal: interrupt]
FAIL: testdata/script/mod_convert_vendor_conf.txt:6: test timed out while running command
--- FAIL: TestScript/mod_get_upgrade_pseudo (0.08s)
script_test.go:191:
# For this test module there are three versions:
# * v0.1.1-0.20190429073117-b5426c86b553
# * v0.1.0
# * v0.0.0-20190430073000-30950c05d534
# Only v0.1.0 is tagged.
#
# The v0.1.1 pseudo-version is semantically higher than the latest tag.
# The v0.0.0 pseudo-version is chronologically newer.
# 'get -u' should not downgrade to the (lower) tagged version. (0.044s)
> go get -d example.com/pseudoupgrade@b5426c8
[signal: interrupt]
FAIL: testdata/script/mod_get_upgrade_pseudo.txt:13: test timed out while running command
--- FAIL: TestScript/mod_getmode_vendor (0.11s)
script_test.go:191:
> env GO111MODULE=on
> go get -d rsc.io/[email protected]
[signal: interrupt]
FAIL: testdata/script/mod_getmode_vendor.txt:3: test timed out while running command
--- FAIL: TestScript/mod_convert_tsv (0.11s)
script_test.go:191:
# We should not create a go.mod file unless the user ran 'go mod init' explicitly.
# However, we should suggest 'go mod init' if we can find an alternate config file. (0.039s)
> cd $WORK/test/x
$WORK/test/x
> ! go list .
[signal: interrupt]
FAIL: testdata/script/mod_convert_tsv.txt:6: test timed out while running command
--- FAIL: TestScript/mod_get_upgrade (0.10s)
script_test.go:191:
> env GO111MODULE=on
> go get rsc.io/[email protected]
[signal: interrupt]
FAIL: testdata/script/mod_get_upgrade.txt:3: test timed out while running command
--- FAIL: TestScript/mod_multirepo (0.11s)
script_test.go:191:
# initial standalone module should use no downloaded modules (0.039s)
> go list -deps -f {{.Dir}}
[signal: interrupt]
FAIL: testdata/script/mod_multirepo.txt:4: test timed out while running command
--- FAIL: TestScript/mod_convert_godeps (0.11s)
script_test.go:191:
# We should not create a go.mod file unless the user ran 'go mod init' explicitly.
# However, we should suggest 'go mod init' if we can find an alternate config file. (0.039s)
> cd $WORK/test/x
$WORK/test/x
> ! go list .
[signal: interrupt]
FAIL: testdata/script/mod_convert_godeps.txt:6: test timed out while running command
--- FAIL: TestScript/mod_modinfo (0.10s)
script_test.go:191:
# Test to ensure runtime/debug.ReadBuildInfo parses
# the modinfo embedded in a binary by the go tool
# when module is enabled. (0.031s)
> env GO111MODULE=on
> cd x
$WORK/gopath/src/x
> go mod edit -require=rsc.io/[email protected]
[signal: interrupt]
FAIL: testdata/script/mod_modinfo.txt:7: test timed out while running command
--- FAIL: TestScript/mod_convert_glockfile (0.09s)
script_test.go:191:
# We should not create a go.mod file unless the user ran 'go mod init' explicitly.
# However, we should suggest 'go mod init' if we can find an alternate config file. (0.048s)
> cd $WORK/test/x
$WORK/test/x
> ! go list .
[signal: interrupt]
FAIL: testdata/script/mod_convert_glockfile.txt:6: test timed out while running command
--- FAIL: TestScript/mod_missingpkg_prerelease (0.07s)
script_test.go:191:
> env GO111MODULE=on
> ! go list use.go
[signal: interrupt]
FAIL: testdata/script/mod_missingpkg_prerelease.txt:3: test timed out while running command
--- FAIL: TestScript/mod_get_test (0.12s)
script_test.go:191:
# By default, 'go get' should ignore tests (0.043s)
> cp go.mod.empty go.mod
> go get m/a
[signal: interrupt]
FAIL: testdata/script/mod_get_test.txt:5: test timed out while running command
--- FAIL: TestScript/mod_convert_glide (0.11s)
script_test.go:191:
# We should not create a go.mod file unless the user ran 'go mod init' explicitly.
# However, we should suggest 'go mod init' if we can find an alternate config file. (0.041s)
> cd $WORK/test/x
$WORK/test/x
> ! go list .
[signal: interrupt]
FAIL: testdata/script/mod_convert_glide.txt:6: test timed out while running command
--- FAIL: TestScript/mod_local_replace (0.11s)
script_test.go:191:
# Test that local replacements work even with dummy module names.
# golang.org/issue/24100. (0.030s)
> env GO111MODULE=on
> cd x/y
$WORK/gopath/src/x/y
> go list -f '{{.Dir}}' zz
[signal: interrupt]
FAIL: testdata/script/mod_local_replace.txt:7: test timed out while running command
--- FAIL: TestScript/mod_load_badzip (0.06s)
script_test.go:191:
# Zip files with unexpected file names inside should be rejected. (0.029s)
> env GO111MODULE=on
> ! go get -d rsc.io/badzip
[signal: interrupt]
FAIL: testdata/script/mod_load_badzip.txt:4: test timed out while running command
--- FAIL: TestScript/mod_convert_git (0.10s)
script_test.go:191:
# We should not create a go.mod file unless the user ran 'go mod init' explicitly.
# However, we should suggest 'go mod init' if we can find an alternate config file. (0.044s)
> cd $WORK/test/x
$WORK/test/x
> ! go list .
[signal: interrupt]
FAIL: testdata/script/mod_convert_git.txt:6: test timed out while running command
--- FAIL: TestScript/mod_load_badmod (0.15s)
script_test.go:191:
# Unknown lines should be ignored in dependency go.mod files. (0.045s)
> env GO111MODULE=on
> go list -m all
[signal: interrupt]
FAIL: testdata/script/mod_load_badmod.txt:3: test timed out while running command
--- FAIL: TestScript/mod_concurrent (0.17s)
script_test.go:191:
# Concurrent builds should succeed, even if they need to download modules. (0.067s)
> go build ./x &
> go build ./y
[signal: interrupt]
FAIL: testdata/script/mod_concurrent.txt:5: test timed out while running command
--- FAIL: TestScript/mod_convert_dep (0.22s)
script_test.go:191:
# We should not create a go.mod file unless the user ran 'go mod init' explicitly.
# However, we should suggest 'go mod init' if we can find an alternate config file. (0.079s)
> cd $WORK/test/x
$WORK/test/x
> ! go list .
[signal: interrupt]
FAIL: testdata/script/mod_convert_dep.txt:6: test timed out while running command
--- FAIL: TestScript/mod_list_upgrade_pseudo (0.09s)
script_test.go:191:
# For this test module there are three versions:
# * v0.1.1-0.20190429073117-b5426c86b553
# * v0.1.0
# * v0.0.0-20190430073000-30950c05d534
# Only v0.1.0 is tagged.
#
# The v0.1.1 pseudo-version is semantically higher than the latest tag.
# The v0.0.0 pseudo-version is chronologically newer.
# The latest pseudo-version is semantically higher than the latest tag.
# 'list -u' should not suggest a lower version as an upgrade. (0.047s)
> go get -d example.com/pseudoupgrade@b5426c8
[signal: interrupt]
FAIL: testdata/script/mod_list_upgrade_pseudo.txt:15: test timed out while running command
--- FAIL: TestScript/mod_clean_cache (0.13s)
script_test.go:191:
# 'mod download' should download the module to the cache. (0.056s)
> go mod download rsc.io/[email protected]
[signal: interrupt]
FAIL: testdata/script/mod_clean_cache.txt:4: test timed out while running command
--- FAIL: TestScript/mod_list_upgrade (0.09s)
script_test.go:191:
> env GO111MODULE=on
> go list -m -u all
[signal: interrupt]
FAIL: testdata/script/mod_list_upgrade.txt:3: test timed out while running command
--- FAIL: TestScript/mod_case (0.10s)
script_test.go:191:
> env GO111MODULE=on
> go get rsc.io/QUOTE
[signal: interrupt]
FAIL: testdata/script/mod_case.txt:3: test timed out while running command
--- FAIL: TestScript/mod_list_test (0.09s)
script_test.go:191:
# go list -compiled -test must handle test-only packages
# golang.org/issue/27097. (0.030s)
> go list -compiled -test
[signal: interrupt]
FAIL: testdata/script/mod_list_test.txt:5: test timed out while running command
--- FAIL: TestScript/mod_get_none (0.06s)
script_test.go:191:
> env GO111MODULE=on
> go mod init example.com/foo
[signal: interrupt]
FAIL: testdata/script/mod_get_none.txt:3: test timed out while running command
--- FAIL: TestScript/mod_get_newcycle (0.07s)
script_test.go:191:
# Download modules to avoid stderr chatter (0.033s)
> go mod download example.com/newcycle/[email protected]
[signal: interrupt]
FAIL: testdata/script/mod_get_newcycle.txt:4: test timed out while running command
--- FAIL: TestScript/mod_list_replace_dir (0.07s)
script_test.go:191:
# Test that "go list" succeeds when given a directory in a replacement
# module within the module cache.
# Verifies golang.org/issue/29548 (0.030s)
> env GO111MODULE=on
> go mod download
[signal: interrupt]
FAIL: testdata/script/mod_list_replace_dir.txt:6: test timed out while running command
--- FAIL: TestScript/mod_get_latest_pseudo (0.06s)
script_test.go:191:
# Check that we can build a module with no tagged versions by querying
# "@latest" through a proxy.
# Verifies golang.org/issue/32636 (0.036s)
> env GO111MODULE=on
> go mod init m
[signal: interrupt]
FAIL: testdata/script/mod_get_latest_pseudo.txt:7: test timed out while running command
--- FAIL: TestScript/mod_list_bad_import (0.12s)
script_test.go:191:
# This test matches list_bad_import, but in module mode.
# Please keep them in sync. (0.001s)
# Without -e, listing an otherwise-valid package with an unsatisfied direct import should fail.
# BUG: Today it succeeds. (0.040s)
> go list -f '{{if .Error}}error{{end}} {{if .Incomplete}}incomplete{{end}} {{range .DepsErrors}}bad dep: {{.Err}}{{end}}' example.com/direct
[signal: interrupt]
FAIL: testdata/script/mod_list_bad_import.txt:9: test timed out while running command
--- FAIL: TestScript/mod_get_incompatible (0.08s)
script_test.go:191:
> env GO111MODULE=on
> go list x
[signal: interrupt]
FAIL: testdata/script/mod_get_incompatible.txt:3: test timed out while running command
--- FAIL: TestScript/mod_install_versioned (0.07s)
script_test.go:191:
> env GO111MODULE=on
> go list -f '{{.Target}}' rsc.io/fortune
[signal: interrupt]
FAIL: testdata/script/mod_install_versioned.txt:3: test timed out while running command
--- FAIL: TestScript/mod_init_empty (0.06s)
script_test.go:191:
> env GO111MODULE=on
> env GOPATH=$devnull
> go list -m
[signal: interrupt]
FAIL: testdata/script/mod_init_empty.txt:5: test timed out while running command
--- FAIL: TestScript/mod_import_v1suffix (0.10s)
script_test.go:191:
> env GO111MODULE=on
> ! go get -d example.com/invalidpath/v1
[signal: interrupt]
FAIL: testdata/script/mod_import_v1suffix.txt:3: test timed out while running command
--- FAIL: TestScript/mod_import_mod (0.09s)
script_test.go:191:
# Test that GOPATH/pkg/mod is excluded (0.033s)
> env GO111MODULE=off
> ! go list mod/foo
[signal: interrupt]
FAIL: testdata/script/mod_import_mod.txt:3: test timed out while running command
--- FAIL: TestScript/mod_fs_patterns (0.14s)
script_test.go:191:
# File system pattern searches should skip sub-modules and vendor directories. (0.001s)
# all packages (0.028s)
> go list all
[signal: interrupt]
FAIL: testdata/script/mod_fs_patterns.txt:8: test timed out while running command
--- FAIL: TestScript/mod_find (0.16s)
script_test.go:191:
# Derive module path from import comment. (0.038s)
> cd $WORK/x
$WORK/x
> exists x.go
> go mod init
[signal: interrupt]
FAIL: testdata/script/mod_find.txt:6: test timed out while running command
--- FAIL: TestScript/mod_import (0.08s)
script_test.go:191:
# latest rsc.io/quote should be v1.5.2 not v1.5.3-pre1 (0.034s)
> go list
[signal: interrupt]
FAIL: testdata/script/mod_import.txt:4: test timed out while running command
--- FAIL: TestScript/mod_help (0.09s)
script_test.go:191:
# go help get shows usage for get (0.047s)
> go help get
[signal: interrupt]
FAIL: testdata/script/mod_help.txt:4: test timed out while running command
--- FAIL: TestScript/mod_edit_go (0.09s)
script_test.go:191:
# Test support for go mod -edit to set language version. (0.046s)
> env GO111MODULE=on
> ! go build
[signal: interrupt]
FAIL: testdata/script/mod_edit_go.txt:4: test timed out while running command
--- FAIL: TestScript/mod_graph (0.06s)
script_test.go:191:
> env GO111MODULE=on
> go mod graph
[signal: interrupt]
FAIL: testdata/script/mod_graph.txt:3: test timed out while running command
--- FAIL: TestScript/mod_enabled (0.18s)
script_test.go:191:
# GO111MODULE=auto should trigger any time a go.mod exists in a parent directory. (0.057s)
> env GO111MODULE=auto
> cd $GOPATH/src/x/y/z
$WORK/gopath/src/x/y/z
> go env GOMOD
[signal: interrupt]
FAIL: testdata/script/mod_enabled.txt:5: test timed out while running command
--- FAIL: TestScript/mod_gopkg_unstable (0.08s)
script_test.go:191:
> env GO111MODULE=on
> cp go.mod.empty go.mod
> go get -d gopkg.in/dummy.v2-unstable
[signal: interrupt]
FAIL: testdata/script/mod_gopkg_unstable.txt:4: test timed out while running command
--- FAIL: TestScript/mod_edit (0.16s)
script_test.go:191:
# Test that go mod edits and related mod flags work.
# Also test that they can use a dummy name that isn't resolvable. golang.org/issue/24100
# go mod init (0.030s)
> ! go mod init
[signal: interrupt]
FAIL: testdata/script/mod_edit.txt:7: test timed out while running command
--- FAIL: TestScript/mod_download (0.08s)
script_test.go:191:
# download with version should print nothing (0.033s)
> go mod download rsc.io/[email protected]
[signal: interrupt]
FAIL: testdata/script/mod_download.txt:5: test timed out while running command
--- FAIL: TestScript/mod_gonoproxy (0.09s)
script_test.go:191:
# disagree with sumdb fails (0.054s)
> cp go.mod.orig go.mod
> env GOSUMDB=$sumdb' '$proxy/sumdb-wrong
> ! go get rsc.io/quote
[signal: interrupt]
FAIL: testdata/script/mod_gonoproxy.txt:10: test timed out while running command
--- FAIL: TestScript/mod_gofmt_invalid (0.09s)
script_test.go:191:
# Test for a crash in go fmt on invalid input when using modules.
# Issue 26792. (0.027s)
> env GO111MODULE=on
> ! go fmt x.go
[signal: interrupt]
FAIL: testdata/script/mod_gofmt_invalid.txt:5: test timed out while running command
--- FAIL: TestScript/mod_domain_root (0.07s)
script_test.go:191:
# Module paths that are domain roots should resolve.
# (example.com not example.com/something) (0.033s)
> env GO111MODULE=on
> go build
[signal: interrupt]
FAIL: testdata/script/mod_domain_root.txt:5: test timed out while running command
--- FAIL: TestScript/mod_dir (0.08s)
script_test.go:191:
# The directory named go.mod should be ignored (0.039s)
> env GO111MODULE=on
> cd $WORK/sub
$WORK/sub
> go list .
[signal: interrupt]
FAIL: testdata/script/mod_dir.txt:7: test timed out while running command
--- FAIL: TestScript/mod_go_version (0.16s)
script_test.go:191:
# Test support for declaring needed Go version in module. (0.036s)
> env GO111MODULE=on
> go list
[signal: interrupt]
FAIL: testdata/script/mod_go_version.txt:5: test timed out while running command
--- FAIL: TestScript/mod_convert_vendor_yml (0.10s)
script_test.go:191:
# We should not create a go.mod file unless the user ran 'go mod init' explicitly.
# However, we should suggest 'go mod init' if we can find an alternate config file. (0.040s)
> cd $WORK/test/x
$WORK/test/x
> ! go list .
[signal: interrupt]
FAIL: testdata/script/mod_convert_vendor_yml.txt:6: test timed out while running command
--- FAIL: TestScript/cache_unix (0.08s)
script_test.go:191:
# Integration test for cache directory calculation (cmd/go/internal/cache). (0.004s)
# Set GOCACHE, XDG_CACHE_HOME, and HOME. (0.000s)
# With all three set, we should prefer GOCACHE. (0.029s)
> go env GOCACHE
[signal: interrupt]
FAIL: testdata/script/cache_unix.txt:19: test timed out while running command
--- FAIL: TestScript/mod_bad_filenames (0.07s)
script_test.go:191:
> env GO111MODULE=on
> ! go get rsc.io/badfile1 rsc.io/badfile2 rsc.io/badfile3 rsc.io/badfile4 rsc.io/badfile5
[signal: interrupt]
FAIL: testdata/script/mod_bad_filenames.txt:3: test timed out while running command
--- FAIL: TestScript/mod_bad_domain (0.09s)
script_test.go:191:
# explicit get should report errors about bad names (0.032s)
> ! go get appengine
[signal: interrupt]
FAIL: testdata/script/mod_bad_domain.txt:4: test timed out while running command
--- FAIL: TestScript/get_brace (0.12s)
script_test.go:191:
# Set up some empty repositories. (0.045s)
> cd $WORK/_origin/foo
$WORK/_origin/foo
> exec git init
[signal: interrupt]
FAIL: testdata/script/get_brace.txt:7: test timed out while running command
--- FAIL: TestScript/mod_alt_goroot (0.08s)
script_test.go:191:
# If the working directory is a different GOROOT, then the 'std' module should be
# treated as an ordinary module (with an ordinary module prefix).
# It should not override packages in GOROOT, but should not fail the command.
# See golang.org/issue/30756. (0.033s)
> go list -e -deps -f '{{.ImportPath}} {{.Dir}}' ./bytes
[signal: interrupt]
FAIL: testdata/script/mod_alt_goroot.txt:7: test timed out while running command
--- FAIL: TestScript/list_test_non_go_files (0.07s)
script_test.go:191:
# issue 29899: handling files with non-Go extension (0.027s)
> go list -e -test -json -- c.c x.go
[signal: interrupt]
FAIL: testdata/script/list_test_non_go_files.txt:4: test timed out while running command
--- FAIL: TestScript/fileline (0.10s)
script_test.go:191:
# look for short, relative file:line in error message (0.035s)
> ! go run ../../gopath/x/y/z/err.go
[signal: interrupt]
FAIL: testdata/script/fileline.txt:4: test timed out while running command
--- FAIL: TestScript/env_write (0.07s)
script_test.go:191:
# go env should default to the right places (0.039s)
> env AppData=$HOME/windowsappdata
> env home=$HOME/plan9home
> go env GOENV
[signal: interrupt]
FAIL: testdata/script/env_write.txt:6: test timed out while running command
--- FAIL: TestScript/list_test_imports (0.11s)
script_test.go:191:
# issue 26880: list with tests has wrong variant in imports (0.033s)
> go list -test -f '{{.ImportPath}}:{{with .Imports}} {{join . ", "}}{{end}}' a b
[signal: interrupt]
FAIL: testdata/script/list_test_imports.txt:4: test timed out while running command
--- FAIL: TestScript/list_test_e (0.08s)
script_test.go:191:
# issue 25980: crash in go list -e -test (0.040s)
> go list -e -test -deps -f '{{.Error}}' p
[signal: interrupt]
FAIL: testdata/script/list_test_e.txt:4: test timed out while running command
--- FAIL: TestScript/list_tags (0.09s)
script_test.go:191:
# go list supports -tags (0.040s)
> go list -tags=thetag ./my...
[signal: interrupt]
FAIL: testdata/script/list_tags.txt:4: test timed out while running command
--- FAIL: TestScript/list_test_err (0.16s)
script_test.go:191:
# issue 28491: errors in test source files should not prevent
# "go list -test" from returning useful information.
# go list prints information for package, internal test,
# external test, but not testmain package when there is a
# syntax error in test sources. (0.031s)
> ! go list -test -deps syntaxerr
[signal: interrupt]
FAIL: testdata/script/list_test_err.txt:9: test timed out while running command
--- FAIL: TestScript/list_find (0.09s)
script_test.go:191:
# go list -find should not report imports (0.032s)
> go list -f {{.Incomplete}} x/y/z... # should probably exit non-zero but never has
[signal: interrupt]
FAIL: testdata/script/list_find.txt:5: test timed out while running command
--- FAIL: TestScript/list_importmap (0.10s)
script_test.go:191:
# gccgo does not have standard packages. (0.000s)
# fmt should have no rewritten imports.
# The import from a/b should map c/d to a's vendor directory. (0.039s)
> go list -f '{{.ImportPath}}: {{.ImportMap}}' fmt a/b
[signal: interrupt]
FAIL: testdata/script/list_importmap.txt:8: test timed out while running command
--- FAIL: TestScript/linkname (0.08s)
script_test.go:191:
# check for linker name in error message about linker crash (0.048s)
> [!gc] skip
> ! go build -ldflags=-crash_for_testing x.go
[signal: interrupt]
FAIL: testdata/script/linkname.txt:5: test timed out while running command
--- FAIL: TestScript/install_cross_gobin (0.08s)
script_test.go:191:
> env GO111MODULE=off
> [!short] skip # rebuilds std for alternate architecture
> cd mycmd
$WORK/gopath/src/mycmd
> go build mycmd
[signal: interrupt]
FAIL: testdata/script/install_cross_gobin.txt:5: test timed out while running command
--- FAIL: TestScript/install_rebuild_removed (0.11s)
script_test.go:191:
# go command should detect package staleness as source file set changes (0.049s)
> go install mypkg
[signal: interrupt]
FAIL: testdata/script/install_rebuild_removed.txt:4: test timed out while running command
--- FAIL: TestScript/install_rebuild_gopath (0.13s)
script_test.go:191:
# GOPATH with p1 in d1, p2 in d2 (0.000s)
# build & install p1 (0.049s)
> go install -i p1
[signal: interrupt]
FAIL: testdata/script/install_rebuild_gopath.txt:7: test timed out while running command
--- FAIL: TestScript/mod_build_tags (0.07s)
script_test.go:191:
# Test that build tags are used.
# golang.org/issue/24053. (0.031s)
> env GO111MODULE=on
> cd x
$WORK/gopath/src/x
> ! go list -f {{.GoFiles}}
[signal: interrupt]
FAIL: testdata/script/mod_build_tags.txt:7: test timed out while running command
--- FAIL: TestScript/build_cache_trimpath (0.08s)
script_test.go:191:
# Set up fresh GOCACHE. (0.029s)
> env GOCACHE=$WORK/gocache
> mkdir $GOCACHE
> cd $WORK
$WORK
> go build -o a.out
[signal: interrupt]
FAIL: testdata/script/build_cache_trimpath.txt:8: test timed out while running command
--- FAIL: TestScript/build_relative_tmpdir (0.07s)
script_test.go:191:
# If GOTMPDIR is relative, 'go build' should derive an absolute $WORK directory. (0.030s)
> cd $WORK
$WORK
> mkdir tmp
> env GOTMPDIR=tmp
> go build -work a
[signal: interrupt]
FAIL: testdata/script/build_relative_tmpdir.txt:7: test timed out while running command
--- FAIL: TestScript/build_nocache (0.09s)
script_test.go:191:
# As of Go 1.12, the module cache is required.
# If none of the variables we use to locate GOCACHE are set, the cache is off
# and we cannot build. (0.035s)
> env GOCACHE=
> env XDG_CACHE_HOME=
> env HOME=
> [plan9] env home=
> [windows] env LocalAppData=
> ! go build -o triv triv.go
[signal: interrupt]
FAIL: testdata/script/build_nocache.txt:12: test timed out while running command
--- FAIL: TestScript/goflags (0.08s)
script_test.go:191:
# GOFLAGS sets flags for commands (0.045s)
> env GOFLAGS='-e -f={{.Dir}} --test.benchtime=1s -count=10'
> go list asdfasdfasdf # succeeds because of -e
[signal: interrupt]
FAIL: testdata/script/goflags.txt:6: test timed out while running command
--- FAIL: TestScript/install_cmd_gobin (0.10s)
script_test.go:191:
# Check that commands in cmd are install to $GOROOT/bin, not $GOBIN.
# Verifies golang.org/issue/32674. (0.056s)
> env GOBIN=gobin
> mkdir gobin
> go list -f '{{.Target}}' cmd/go
[signal: interrupt]
FAIL: testdata/script/install_cmd_gobin.txt:5: test timed out while running command
--- FAIL: TestScript/build_multi_main (0.16s)
script_test.go:191:
# Verify build -o can output multiple executables to a directory. (0.032s)
> mkdir $WORK/bin
> go build -o $WORK/bin ./cmd/c1 ./cmd/c2
[signal: interrupt]
FAIL: testdata/script/build_multi_main.txt:4: test timed out while running command
--- FAIL: TestScript/help (0.07s)
script_test.go:191:
# go help shows overview. (0.039s)
> go help
[signal: interrupt]
FAIL: testdata/script/help.txt:4: test timed out while running command
--- FAIL: TestScript/gopath_std_vendor (0.10s)
script_test.go:191:
> env GO111MODULE=off
> [!gc] skip
> go list -f '{{.Dir}}' vendor/golang.org/x/net/http2/hpack
[signal: interrupt]
FAIL: testdata/script/gopath_std_vendor.txt:5: test timed out while running command
FAIL
FAIL cmd/go 560.942s
I set 'GO_TEST_TIMEOUT_SCALE=10', and try to do 'all.bash'.
Now, 'all.bash' is passed.
GOROOT_BOOTSTRAP=~/git/github.com/bsd-hacker/00-go-freebsd-arm64-bootstrap GO_TEST_TIMEOUT_SCALE=10 bash all.bash
Building Go cmd/dist using /home/shigeru/git/github.com/bsd-hacker/00-go-freebsd-arm64-bootstrap.
Building Go toolchain1 using /home/shigeru/git/github.com/bsd-hacker/00-go-freebsd-arm64-bootstrap.
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 freebsd/arm64.
##### Testing packages.
ok archive/tar 1.081s
ok archive/zip 0.456s
ok bufio 0.513s
ok bytes 1.575s
ok compress/bzip2 0.741s
ok compress/flate 3.344s
ok compress/gzip 0.233s
ok compress/lzw 0.133s
ok compress/zlib 0.195s
ok container/heap 0.131s
ok container/list 0.089s
ok container/ring 0.135s
ok context 1.182s
ok crypto 0.153s
ok crypto/aes 0.225s
ok crypto/cipher 0.157s
ok crypto/des 0.130s
ok crypto/dsa 0.094s
ok crypto/ecdsa 1.038s
ok crypto/ed25519 0.647s
ok crypto/elliptic 0.282s
ok crypto/hmac 0.091s
ok crypto/internal/subtle 0.106s
ok crypto/md5 0.121s
ok crypto/rand 0.232s
ok crypto/rc4 0.509s
ok crypto/rsa 0.702s
ok crypto/sha1 0.167s
ok crypto/sha256 0.108s
ok crypto/sha512 0.107s
ok crypto/subtle 0.100s
ok crypto/tls 7.732s
ok crypto/x509 5.970s
ok database/sql 1.103s
ok database/sql/driver 0.128s
ok debug/dwarf 0.370s
ok debug/elf 0.540s
ok debug/gosym 0.220s
ok debug/macho 0.168s
ok debug/pe 0.213s
ok debug/plan9obj 0.185s
ok encoding/ascii85 0.127s
ok encoding/asn1 0.126s
ok encoding/base32 0.244s
ok encoding/base64 0.390s
ok encoding/binary 0.155s
ok encoding/csv 0.166s
ok encoding/gob 0.253s
ok encoding/hex 0.110s
ok encoding/json 0.650s
ok encoding/pem 0.177s
ok encoding/xml 0.270s
ok errors 0.132s
ok expvar 0.127s
ok flag 0.155s
ok fmt 0.866s
ok go/ast 0.154s
ok go/build 8.596s
ok go/constant 0.112s
ok go/doc 0.739s
ok go/format 0.173s
ok go/importer 2.630s
ok go/internal/gccgoimporter 0.366s
ok go/internal/gcimporter 2.662s
ok go/internal/srcimporter 14.364s
ok go/parser 0.307s
ok go/printer 3.101s
ok go/scanner 0.109s
ok go/token 0.225s
ok go/types 7.242s
ok hash 0.105s
ok hash/adler32 0.156s
ok hash/crc32 0.127s
ok hash/crc64 0.109s
ok hash/fnv 0.116s
ok html 0.099s
ok html/template 0.446s
ok image 0.984s
ok image/color 0.235s
ok image/draw 0.501s
ok image/gif 2.873s
ok image/jpeg 1.684s
ok image/png 0.435s
ok index/suffixarray 3.157s
ok internal/cpu 0.122s
ok internal/fmtsort 0.484s
ok internal/poll 0.239s
ok internal/reflectlite 0.122s
ok internal/singleflight 0.146s
ok internal/trace 0.698s
ok internal/xcoff 0.277s
ok io 0.194s
ok io/ioutil 0.145s
ok log 0.130s
ok log/syslog 1.458s
ok math 0.122s
ok math/big 2.708s
ok math/bits 0.124s
ok math/cmplx 0.128s
ok math/rand 1.275s
ok mime 0.121s
ok mime/multipart 2.240s
ok mime/quotedprintable 0.478s
ok net 5.331s
ok net/http 11.186s
ok net/http/cgi 0.409s
ok net/http/cookiejar 0.128s
ok net/http/fcgi 0.125s
ok net/http/httptest 0.291s
ok net/http/httptrace 0.107s
ok net/http/httputil 0.458s
ok net/http/internal 0.103s
ok net/http/pprof 2.424s
ok net/internal/socktest 0.097s
ok net/mail 0.127s
ok net/rpc 0.295s
ok net/rpc/jsonrpc 0.193s
ok net/smtp 0.180s
ok net/textproto 0.103s
ok net/url 0.129s
ok os 0.447s
ok os/exec 2.281s
ok os/signal 5.106s
ok os/user 0.169s
ok path 0.137s
ok path/filepath 2.617s
ok plugin 0.106s
ok reflect 3.031s
ok regexp 1.115s
ok regexp/syntax 4.429s
ok runtime 35.921s
ok runtime/debug 3.357s
ok runtime/internal/atomic 0.191s
ok runtime/internal/math 0.102s
ok runtime/internal/sys 0.259s
ok runtime/pprof 13.416s
ok runtime/pprof/internal/profile 0.103s
ok runtime/trace 2.774s
ok sort 0.508s
ok strconv 5.230s
ok strings 1.320s
ok sync 1.251s
ok sync/atomic 0.271s
ok syscall 0.509s
ok testing 0.524s
ok testing/quick 0.374s
ok text/scanner 0.156s
ok text/tabwriter 0.109s
ok text/template 0.362s
ok text/template/parse 0.173s
ok time 4.398s
ok unicode 0.138s
ok unicode/utf16 0.098s
ok unicode/utf8 0.115s
ok cmd/addr2line 21.759s
ok cmd/api 0.592s
ok cmd/asm/internal/asm 6.175s
ok cmd/asm/internal/lex 0.124s
ok cmd/compile 0.125s
ok cmd/compile/internal/gc 149.190s
ok cmd/compile/internal/ssa 3.878s
ok cmd/compile/internal/syntax 0.212s
ok cmd/compile/internal/test 0.093s [no tests to run]
ok cmd/compile/internal/types 0.148s
ok cmd/cover 39.566s
ok cmd/doc 2.833s
ok cmd/fix 0.284s
ok cmd/go 641.291s
ok cmd/go/internal/auth 0.110s
ok cmd/go/internal/cache 12.609s
ok cmd/go/internal/dirhash 0.147s
ok cmd/go/internal/generate 0.263s
ok cmd/go/internal/get 0.216s
ok cmd/go/internal/imports 0.272s
ok cmd/go/internal/load 0.137s
ok cmd/go/internal/lockedfile 0.138s
ok cmd/go/internal/lockedfile/internal/filelock 0.157s
ok cmd/go/internal/modconv 0.365s
ok cmd/go/internal/modfetch 0.254s
ok cmd/go/internal/modfetch/codehost 0.110s
ok cmd/go/internal/modfile 0.175s
ok cmd/go/internal/modload 0.157s
ok cmd/go/internal/module 0.100s
ok cmd/go/internal/mvs 0.124s
ok cmd/go/internal/note 0.216s
ok cmd/go/internal/par 0.246s
ok cmd/go/internal/renameio 0.637s
ok cmd/go/internal/search 0.118s
ok cmd/go/internal/semver 0.242s
ok cmd/go/internal/sumweb 0.224s
ok cmd/go/internal/tlog 3.095s
ok cmd/go/internal/txtar 0.104s
ok cmd/go/internal/web 0.190s
ok cmd/go/internal/work 0.190s
ok cmd/gofmt 0.892s
ok cmd/internal/buildid 1.200s
ok cmd/internal/dwarf 0.096s
ok cmd/internal/edit 0.098s
ok cmd/internal/goobj 2.375s
ok cmd/internal/obj 0.122s
ok cmd/internal/obj/arm64 0.250s
ok cmd/internal/obj/x86 26.500s
ok cmd/internal/objabi 0.118s
ok cmd/internal/src 0.152s
ok cmd/internal/test2json 0.854s
ok cmd/link 54.453s
ok cmd/link/internal/ld 29.713s
ok cmd/link/internal/sym 0.100s
ok cmd/nm 28.616s
ok cmd/objdump 20.537s
ok cmd/pack 16.967s
ok cmd/trace 0.182s
ok cmd/vet 55.945s
##### os/user with tag osusergo
ok os/user 0.075s
##### GOMAXPROCS=2 runtime -cpu=1,2,4 -quick
ok runtime 3.905s
##### Testing without libgcc.
ok crypto/x509 4.220s
ok net 0.119s
ok os/user 0.046s
##### sync -cpu=10
ok sync 1.047s
##### ../test/bench/go1
##### ../test
##### API check
+pkg debug/elf, type Symbol struct, Library string
+pkg debug/elf, type Symbol struct, Version string
ALL TESTS PASSED
---
Installed Go for freebsd/arm64 in /home/shigeru/git/github.com/bsd-hacker/go
Installed commands in /home/shigeru/git/github.com/bsd-hacker/go/bin
*** You need to add /home/shigeru/git/github.com/bsd-hacker/go/bin to your PATH.
now doing 'all.bash' is successed in my working branch.
what is next step?
@bsd-hacker Thanks for working on this. The next step is to set up a builder, as described at https://golang.org/wiki/PortingPolicy.
Then send in changes as described at https://golang.org/doc/contribute.html. Send the changes grouped by functionality for easy review.
btw if you're looking for a place to host a VPS with FreeBSD/aarch64 for the builder, pretty much the only publicly available option right now is Amazon EC2. AMIs are listed in freebsd-snapshots mails e.g.: https://lists.freebsd.org/pipermail/freebsd-snapshots/2019-August/000576.html
current status:
requirement to porting golang/FreeBSD/arm64:
my status:
Can you enable cgo and use the Virtual Timer Count register / vdso for timecounting?
I'm not check cgo enabled and using the Virtual Timer Count register / vdso for timecounting.
My work branch is based on https://github.com/dmgk/go freebsd-arm64 branch.
I only clone https://github.com/golang/go master, make new branch, merge https://github.com/dmgk/go freebsd-arm64 branch, and fix errors.
i just got an arm64 board to work on this. i didn't know there was already so much work towards this effort. i'd be happy to contribute and maintain this port.
Current my work status:
* need help!
What do you need help with ? can you perhaps make a list so other people can help?
It seems to be almost OK on my branch, what problems do you have? I can probably help.
Hi @MikaelUrankar , I check out your branch and do bootstrap.bash.
result in my environment:
<shigeru@freebsd-02>: git clone https://github.com/MikaelUrankar/go.git
Cloning into 'go'...
remote: Enumerating objects: 388741, done.
remote: Total 388741 (delta 0), reused 0 (delta 0), pack-reused 388741
Receiving objects: 100% (388741/388741), 187.74 MiB | 6.17 MiB/s, done.
Resolving deltas: 100% (308966/308966), done.
Updating files: 100% (8711/8711), done.
<shigeru@freebsd-02>: cd go/src/
<shigeru@freebsd-02>: git checkout -b freebsd-aarch64 origin/freebsd-aarch64
Branch 'freebsd-aarch64' set up to track remote branch 'freebsd-aarch64' from 'origin'.
Switched to a new branch 'freebsd-aarch64'
<shigeru@freebsd-02>: rm -fr ../bin ../pkg ../../go-freebsd-arm64-bootstrap* ; GOROOT_BOOTSTRAP=/usr/local/go GOOS=freebsd GOARCH=arm64 TAR=gtar bash bootstrap.bash >& ../../go.bootstrap.log &
[1] 9977
<shigeru@freebsd-02>:
[1]+ Exit 2 GOROOT_BOOTSTRAP=/usr/local/go GOOS=freebsd GOARCH=arm64 TAR=gtar bash bootstrap.bash &> ../../go.bootstrap.log
<shigeru@freebsd-02>:
<shigeru@freebsd-02>: tail ../../go.bootstrap.log
runtime.badmorestackgsignal: relocation target runtime.write not defined
runtime.needm: relocation target runtime.write not defined
runtime.badsystemstack: relocation target runtime.write not defined
# cmd/vet
runtime.gwrite: relocation target runtime.write not defined
runtime.badmorestackg0: relocation target runtime.write not defined
runtime.badmorestackgsignal: relocation target runtime.write not defined
runtime.needm: relocation target runtime.write not defined
runtime.badsystemstack: relocation target runtime.write not defined
go tool dist: FAILED: /home/shigeru/git/github.com/MikaelUrankar/go-freebsd-arm64-bootstrap/pkg/tool/freebsd_amd64/go_bootstrap install -gcflags=all= -ldflags=all= std cmd: exit status 2
<shigeru@freebsd-02>:
I tested https://github.com/MikaelUrankar/go/tree/freebsd-aarch64 branch rebased on recent master on FreeBSD freebsd 12.1-STABLE r352947 GENERIC arm64
and although there are some cgo issues with ld.ldd, all.bash
is all green with ld.bfs from binutils-2.32_1,1.
To help this moving forward, I'm willing to setup and maintain a FreeBSD arm64 builder.
I am sure lld developers will be interested in addressing issues with cgo and lld - do you have details?
Change https://golang.org/cl/198597 mentions this issue: dashboard: add FreeBSD arm64 builder
Change https://golang.org/cl/198542 mentions this issue: cmd/dist: add support for freebsd/arm64
Change https://golang.org/cl/198543 mentions this issue: cmd/link/internal/arm64: add support for freebsd/arm64
Change https://golang.org/cl/198544 mentions this issue: runtime: add support for freebsd/arm64
@dmgk Thanks a lot for volunteering to run a builder!
I folded in the changes from https://github.com/MikaelUrankar/go/tree/freebsd-aarch64 into my branch and started sending CLs to get them into master. Reviews appreciated :smiley:
Change https://golang.org/cl/198545 mentions this issue: syscall: add support for freebsd/arm64
Change https://golang.org/cl/199919 mentions this issue: cmd/nm, runtime/cgo: add cgo support for freebsd/arm64
Change https://golang.org/cl/199920 mentions this issue: cmd/api: add support for freebsd/arm64
Change https://golang.org/cl/203420 mentions this issue: dashboard: only build tip on freebsd-arm64-dmgk builder
Change https://golang.org/cl/203421 mentions this issue: dashboard: add SlowBot alias for freebsd-arm64-dmgk
There still seem to be some issues with cgo, see https://golang.org/cl/199919:
--- FAIL: TestSigStackSwapping (12.99s)
crash_test.go:95: testprogcgo SigStack exit status: signal: segmentation fault (core dumped)
crash_cgo_test.go:480: expected "OK\n" got
--- FAIL: TestCgoNumGoroutine (12.93s)
crash_test.go:95: testprogcgo NumGoroutine exit status: signal: segmentation fault (core dumped)
crash_cgo_test.go:411: expected "OK\n" got
--- FAIL: TestEnsureDropM (21.49s)
crash_test.go:95: testprogcgo EnsureDropM exit status: signal: segmentation fault (core dumped)
crash_cgo_test.go:174: expected "OK\n", got
--- FAIL: TestCgoExternalThreadSignal (26.27s)
crash_cgo_test.go:129: exit status: signal: segmentation fault (core dumped)
--- FAIL: TestCgoExternalThreadPanic (11.53s)
crash_test.go:95: testprogcgo CgoExternalThreadPanic exit status: signal: segmentation fault (core dumped)
crash_cgo_test.go:82: want failure containing "panic: BOOM". output:
--- FAIL: TestCgoExternalThreadSIGPROF (26.92s)
crash_cgo_test.go:106: exit status: signal: segmentation fault (core dumped)
--- FAIL: TestCgoCallbackGC (12.73s)
crash_test.go:95: testprogcgo CgoCallbackGC exit status: signal: segmentation fault (core dumped)
crash_cgo_test.go:70: expected "OK\n", but got:
FAIL
FAIL runtime 101.212s
FAIL
Not sure whether these are the same as the cgo issues @dmgk and @MikaelUrankar saw. Or maybe these are some changes I forgot to pick up during rebase of https://golang.org/cl/198544.
Yes, it looks similar to the ld.lld issue. We need a linker from binutils (bfd or gold) or from llvm trunk.
I'll try tomorrow to confirm.
It's ok with lld10 :
ALL TESTS PASSED
ld -v
LLD 10.0.0 (https://github.com/llvm/llvm-project 95b5d459a0eb18d3a563f8ef84489635d85cdecd) (compatible with GNU linkers)
The respective CLs have been submitted and the freebsd-arm64-dmgk
builder has been passing for some time now. Let's close this and deal with any follow-up action in separate issues.
Thanks to everybody who contributed!
Change https://golang.org/cl/205798 mentions this issue: dashboard: add misc-compile builder for freebsd/arm64
Change https://golang.org/cl/210119 mentions this issue: doc/go1.14: document freebsd/arm64 port
Change https://golang.org/cl/220426 mentions this issue: doc/go1.14: freebsd/arm64 requires FreeBSD 12.0 or later
Change https://golang.org/cl/220427 mentions this issue: doc/go1.14: document that freebsd/arm64 requires FreeBSD 12.0 or later
Most helpful comment
I tested https://github.com/MikaelUrankar/go/tree/freebsd-aarch64 branch rebased on recent master on
FreeBSD freebsd 12.1-STABLE r352947 GENERIC arm64
and although there are some cgo issues with ld.ldd,all.bash
is all green with ld.bfs from binutils-2.32_1,1.To help this moving forward, I'm willing to setup and maintain a FreeBSD arm64 builder.