Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go 1.6 on Darwin doesn't build #18223

Closed
grahamc opened this issue Sep 2, 2016 · 15 comments
Closed

Go 1.6 on Darwin doesn't build #18223

grahamc opened this issue Sep 2, 2016 · 15 comments

Comments

@grahamc
Copy link
Member

grahamc commented Sep 2, 2016

Issue description

Building 1.6.3 on Darwin doesn't work ... full build log:

these derivations will be built:
  /nix/store/s8cqlvlpzdwm3jfx12gq8z82rxa05wvm-go-1.6.3.drv
  /nix/store/v4d4wqvdqcqfhjpkmahsxp31zx4j4adv-go1.6-hound-20160422-ed547ac.drv
  /nix/store/kv91jhgg5hmgirkqri2w56wgmfyd19p1-nix.houndd.plist.drv
  /nix/store/9xrql065pxznlnllxrbz8hq48xkx581s-Graham.drv
building path(s) ‘/nix/store/aiy9iy5ifap1g3a71aacd5k6dpyjnkd2-go-1.6.3’
unpacking sources
unpacking source archive /nix/store/hqfv16y5yxf2gpvws67q6x6lyj0f5i8w-go1.6.3.tar.gz
source root is go-go1.6.3
setting SOURCE_DATE_EPOCH to timestamp 1468856186 of file go-go1.6.3/test/zerodivide.go
patching sources
patching script interpreter paths in ./
./doc/articles/wiki/test.bash: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/bash"
./doc/codewalk/run: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/bash"
./lib/time/update.bash: interpreter directive changed from "/bin/sh" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/sh"
./misc/arm/a: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/bash"
./misc/benchcmp: interpreter directive changed from "/bin/bash" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/bash"
./misc/cgo/errors/test.bash: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/bash"
./misc/cgo/testcarchive/test.bash: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/bash"
./misc/cgo/testcshared/test.bash: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/bash"
./misc/cgo/testgodefs/test.bash: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/bash"
./misc/cgo/testsanitizers/test.bash: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/bash"
./misc/git/pre-commit: interpreter directive changed from "/bin/sh" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/sh"
./misc/ios/clangwrap.sh: interpreter directive changed from "/bin/sh" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/sh"
./misc/nacl/go_nacl_386_exec: interpreter directive changed from "/bin/bash" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/bash"
./misc/nacl/go_nacl_amd64p32_exec: interpreter directive changed from "/bin/bash" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/bash"
./misc/nacl/go_nacl_arm_exec: interpreter directive changed from "/bin/bash" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/bash"
./src/all.bash: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/bash"
./src/androidtest.bash: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/bash"
./src/bootstrap.bash: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/bash"
./src/buildall.bash: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/bash"
./src/clean.bash: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/bash"
./src/cmd/compile/internal/big/vendor.bash: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/bash"
./src/cmd/dist/mkdeps.bash: interpreter directive changed from "/bin/bash" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/bash"
./src/cmd/go/mkalldocs.sh: interpreter directive changed from "/bin/bash" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/bash"
./src/cmd/go/testdata/failssh/ssh: interpreter directive changed from "/bin/sh" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/sh"
./src/iostest.bash: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/bash"
./src/make.bash: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/bash"
./src/nacltest.bash: interpreter directive changed from "/bin/bash" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/bash"
./src/net/http/cgi/testdata/test.cgi: interpreter directive changed from "/usr/bin/perl" to "/nix/store/j51fs5851a9cdrl61mldar08z3i4l93q-perl-5.22.2/bin/perl"
./src/race.bash: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/bash"
./src/regexp/syntax/make_perl_groups.pl: interpreter directive changed from "/usr/bin/perl" to "/nix/store/j51fs5851a9cdrl61mldar08z3i4l93q-perl-5.22.2/bin/perl"
./src/run.bash: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/bash"
./src/syscall/mkall.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/bash"
./src/syscall/mkerrors.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/bash"
./src/syscall/mksyscall.pl: interpreter directive changed from "/usr/bin/env perl" to "/nix/store/j51fs5851a9cdrl61mldar08z3i4l93q-perl-5.22.2/bin/perl"
./src/syscall/mksyscall_solaris.pl: interpreter directive changed from "/usr/bin/env perl" to "/nix/store/j51fs5851a9cdrl61mldar08z3i4l93q-perl-5.22.2/bin/perl"
./src/syscall/mksysctl_openbsd.pl: interpreter directive changed from "/usr/bin/env perl" to "/nix/store/j51fs5851a9cdrl61mldar08z3i4l93q-perl-5.22.2/bin/perl"
./src/syscall/mksysnum_darwin.pl: interpreter directive changed from "/usr/bin/env perl" to "/nix/store/j51fs5851a9cdrl61mldar08z3i4l93q-perl-5.22.2/bin/perl"
./src/syscall/mksysnum_dragonfly.pl: interpreter directive changed from "/usr/bin/env perl" to "/nix/store/j51fs5851a9cdrl61mldar08z3i4l93q-perl-5.22.2/bin/perl"
./src/syscall/mksysnum_freebsd.pl: interpreter directive changed from "/usr/bin/env perl" to "/nix/store/j51fs5851a9cdrl61mldar08z3i4l93q-perl-5.22.2/bin/perl"
./src/syscall/mksysnum_linux.pl: interpreter directive changed from "/usr/bin/env perl" to "/nix/store/j51fs5851a9cdrl61mldar08z3i4l93q-perl-5.22.2/bin/perl"
./src/syscall/mksysnum_netbsd.pl: interpreter directive changed from "/usr/bin/env perl" to "/nix/store/j51fs5851a9cdrl61mldar08z3i4l93q-perl-5.22.2/bin/perl"
./src/syscall/mksysnum_openbsd.pl: interpreter directive changed from "/usr/bin/env perl" to "/nix/store/j51fs5851a9cdrl61mldar08z3i4l93q-perl-5.22.2/bin/perl"
./src/syscall/mksysnum_plan9.sh: interpreter directive changed from "/bin/sh" to "/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/sh"
./test/errchk: interpreter directive changed from "/usr/bin/env perl" to "/nix/store/j51fs5851a9cdrl61mldar08z3i4l93q-perl-5.22.2/bin/perl"
applying patch /nix/store/279xr9ckma2n2wv1xxfrz90bd45p00b8-remove-tools-1.5.patch
patching file src/cmd/go/pkg.go
Hunk #1 succeeded at 717 (offset 39 lines).
patching file src/go/build/build.go
Hunk #1 succeeded at 1504 (offset 116 lines).
patching file src/runtime/extern.go
Hunk #1 succeeded at 218 with fuzz 1 (offset 24 lines).
configuring
no configure script, doing nothing
building
no Makefile, doing nothing
installing
Building
##### Building Go bootstrap tool.
cmd/dist

##### Building Go toolchain using /nix/store/v2mk4rzf56b9sba56ykdjcvnxzs611cf-go-bootstrap/share/go.
bootstrap/internal/obj
bootstrap/asm/internal/flags
bootstrap/compile/internal/big
bootstrap/internal/gcprog
bootstrap/internal/obj/arm
bootstrap/internal/obj/arm64
bootstrap/internal/obj/mips
bootstrap/internal/obj/ppc64
bootstrap/internal/obj/x86
bootstrap/asm/internal/lex
bootstrap/link/internal/ld
bootstrap/compile/internal/gc
bootstrap/asm/internal/arch
bootstrap/asm/internal/asm
bootstrap/asm
bootstrap/link/internal/amd64
bootstrap/link/internal/arm
bootstrap/link/internal/arm64
bootstrap/link/internal/mips64
bootstrap/link/internal/ppc64
bootstrap/link/internal/x86
bootstrap/link
bootstrap/compile/internal/amd64
bootstrap/compile/internal/arm
bootstrap/compile/internal/arm64
bootstrap/compile/internal/mips64
bootstrap/compile/internal/ppc64
bootstrap/compile/internal/x86
bootstrap/compile

##### Building go_bootstrap for host, darwin/amd64.
runtime/internal/sys
runtime/internal/atomic
runtime
encoding
errors
internal/race
internal/syscall/windows/sysdll
math
sort
sync/atomic
unicode
unicode/utf16
unicode/utf8
sync
container/heap
internal/singleflight
io
syscall
hash
hash/adler32
strconv
bytes
strings
internal/syscall/windows
internal/syscall/windows/registry
time
bufio
path
reflect
encoding/base64
crypto
regexp/syntax
crypto/sha1
os
regexp
os/signal
path/filepath
encoding/binary
fmt
io/ioutil
os/exec
flag
go/token
log
net/url
text/template/parse
compress/flate
encoding/json
debug/dwarf
go/scanner
go/ast
compress/zlib
text/template
debug/macho
debug/elf
go/parser
go/doc
go/build
cmd/go

##### Building packages and commands for darwin/amd64.
runtime/internal/sys
runtime/internal/atomic
runtime
errors
internal/race
sync/atomic
unicode
unicode/utf8
math
sync
sort
io
syscall
hash
hash/adler32
hash/crc32
container/heap
container/list
container/ring
crypto/subtle
crypto/cipher
bytes
bufio
time
strings
strconv
text/tabwriter
compress/bzip2
path
math/rand
crypto/hmac
internal/singleflight
reflect
regexp/syntax
crypto
crypto/aes
crypto/sha512
os
crypto/md5
crypto/rc4
crypto/sha1
crypto/sha256
regexp
encoding/base64
path/filepath
encoding/pem
encoding
encoding/ascii85
encoding/base32
io/ioutil
os/exec
unicode/utf16
hash/crc64
hash/fnv
html
image/color
image
encoding/binary
fmt
image/color/palette
crypto/des
index/suffixarray
internal/syscall/windows/sysdll
runtime/debug
image/internal/imageutil
runtime/trace
math/cmplx
os/signal
image/draw
image/jpeg
runtime/race
cmd/pprof/internal/svg
cmd/vet/internal/whitelist
flag
log
cmd/internal/unvendor/golang.org/x/arch/arm/armasm
cmd/internal/unvendor/golang.org/x/arch/x86/x86asm
cmd/internal/obj
compress/flate
debug/dwarf
compress/zlib
debug/gosym
debug/plan9obj
cmd/internal/goobj
archive/tar
archive/zip
compress/gzip
compress/lzw
debug/elf
debug/macho
debug/pe
math/big
encoding/hex
go/token
database/sql/driver
go/scanner
database/sql
go/ast
cmd/internal/objfile
encoding/csv
encoding/gob
crypto/dsa
cmd/addr2line
crypto/elliptic
encoding/asn1
crypto/rand
crypto/rsa
crypto/ecdsa
crypto/x509/pkix
go/parser
go/printer
encoding/json
encoding/xml
internal/golang.org/x/net/http2/hpack
cmd/cgo
mime
mime/quotedprintable
net/http/internal
net/url
text/template/parse
go/constant
go/format
go/types
text/scanner
text/template
image/gif
image/png
runtime/pprof
go/doc
html/template
go/build
testing
internal/trace
internal/testenv
net/internal/socktest
testing/iotest
testing/quick
cmd/internal/obj/arm
cmd/internal/obj/arm64
cmd/internal/obj/mips
runtime/cgo
go/internal/gccgoimporter
go/internal/gcimporter
cmd/api
cmd/internal/obj/ppc64
go/importer
cmd/internal/obj/x86
net
os/user
cmd/asm/internal/arch
cmd/asm/internal/flags
cmd/asm/internal/lex
cmd/compile/internal/big
cmd/asm/internal/asm
cmd/internal/gcprog
cmd/cover
cmd/asm
cmd/compile/internal/gc
cmd/dist
crypto/x509
net/textproto
mime/multipart
log/syslog
net/mail
cmd/doc
cmd/fix
crypto/tls
cmd/gofmt
net/http
net/smtp
cmd/link/internal/ld
cmd/nm
cmd/objdump
cmd/pack
cmd/link/internal/amd64
cmd/link/internal/arm
expvar
net/http/cgi
net/http/cookiejar
net/http/fcgi
net/http/httptest
net/http/httputil
net/http/pprof
net/rpc
cmd/go
cmd/link/internal/arm64
cmd/link/internal/mips64
net/rpc/jsonrpc
cmd/link/internal/ppc64
cmd/link/internal/x86
cmd/pprof/internal/profile
cmd/link
cmd/compile/internal/amd64
cmd/compile/internal/arm
cmd/compile/internal/arm64
cmd/compile/internal/mips64
cmd/compile/internal/ppc64
cmd/compile/internal/x86
cmd/pprof/internal/plugin
cmd/pprof/internal/report
cmd/pprof/internal/tempfile
cmd/pprof/internal/fetch
cmd/pprof/internal/symbolizer
cmd/pprof/internal/symbolz
cmd/trace
cmd/compile
cmd/pprof/internal/commands
cmd/pprof/internal/driver
cmd/pprof
cmd/vet
cmd/yacc


##### Testing packages.
ok      archive/tar 0.028s
ok      archive/zip 0.070s
ok      bufio   0.081s
ok      bytes   0.104s
ok      compress/bzip2  0.078s
ok      compress/flate  0.241s
ok      compress/gzip   0.019s
ok      compress/lzw    0.013s
ok      compress/zlib   0.024s
ok      container/heap  0.012s
ok      container/list  0.011s
ok      container/ring  0.020s
ok      crypto/aes  0.035s
ok      crypto/cipher   0.012s
ok      crypto/des  0.022s
ok      crypto/dsa  0.013s
ok      crypto/ecdsa    0.043s
ok      crypto/elliptic 0.051s
ok      crypto/hmac 0.012s
ok      crypto/md5  0.013s
ok      crypto/rand 0.037s
ok      crypto/rc4  0.129s
ok      crypto/rsa  0.096s
ok      crypto/sha1 0.012s
ok      crypto/sha256   0.012s
ok      crypto/sha512   0.012s
ok      crypto/subtle   0.013s
ok      crypto/tls  0.897s
fatal error: unexpected signal during runtime execution
[signal 0xb code=0x1 addr=0x50 pc=0x48d128]

runtime stack:
runtime.throw(0x2c7a80, 0x2a)
    /nix/store/aiy9iy5ifap1g3a71aacd5k6dpyjnkd2-go-1.6.3/share/go/src/runtime/panic.go:547 +0x90
runtime.sigpanic()
    /nix/store/aiy9iy5ifap1g3a71aacd5k6dpyjnkd2-go-1.6.3/share/go/src/runtime/sigpanic_unix.go:12 +0x5a

goroutine 6 [syscall, locked to thread]:
runtime.cgocall(0x1c2fb0, 0xc8204b5910, 0x100000000000000)
    /nix/store/aiy9iy5ifap1g3a71aacd5k6dpyjnkd2-go-1.6.3/share/go/src/runtime/cgocall.go:123 +0x11b fp=0xc8204b58d8 sp=0xc8204b58a8
crypto/x509._Cfunc_FetchPEMRoots(0xc820090040, 0xc800000000)
    crypto/x509/_test/_obj_test/_cgo_gotypes.go:103 +0x3d fp=0xc8204b5910 sp=0xc8204b58d8
crypto/x509.initSystemRoots()
    /nix/store/aiy9iy5ifap1g3a71aacd5k6dpyjnkd2-go-1.6.3/share/go/src/crypto/x509/root_cgo_darwin.go:70 +0x23c fp=0xc8204b59e0 sp=0xc8204b5910
sync.(*Once).Do(0x3f1648, 0x2e3dc0)
    /nix/store/aiy9iy5ifap1g3a71aacd5k6dpyjnkd2-go-1.6.3/share/go/src/sync/once.go:44 +0xe4 fp=0xc8204b5a08 sp=0xc8204b59e0
crypto/x509.systemRootsPool(0x2f59a0)
    /nix/store/aiy9iy5ifap1g3a71aacd5k6dpyjnkd2-go-1.6.3/share/go/src/crypto/x509/root.go:15 +0x2f fp=0xc8204b5a20 sp=0xc8204b5a08
crypto/x509.testVerify(0xc8200ae120, 0xc802225700)
    /nix/store/aiy9iy5ifap1g3a71aacd5k6dpyjnkd2-go-1.6.3/share/go/src/crypto/x509/verify_test.go:346 +0xc39 fp=0xc8204b5f30 sp=0xc8204b5a20
crypto/x509.TestGoVerify(0xc8200ae120)
    /nix/store/aiy9iy5ifap1g3a71aacd5k6dpyjnkd2-go-1.6.3/share/go/src/crypto/x509/verify_test.go:399 +0x26 fp=0xc8204b5f48 sp=0xc8204b5f30
testing.tRunner(0xc8200ae120, 0x3d3970)
    /nix/store/aiy9iy5ifap1g3a71aacd5k6dpyjnkd2-go-1.6.3/share/go/src/testing/testing.go:473 +0x98 fp=0xc8204b5f80 sp=0xc8204b5f48
runtime.goexit()
    /nix/store/aiy9iy5ifap1g3a71aacd5k6dpyjnkd2-go-1.6.3/share/go/src/runtime/asm_amd64.s:1998 +0x1 fp=0xc8204b5f88 sp=0xc8204b5f80
created by testing.RunTests
    /nix/store/aiy9iy5ifap1g3a71aacd5k6dpyjnkd2-go-1.6.3/share/go/src/testing/testing.go:582 +0x892

goroutine 1 [chan receive]:
testing.RunTests(0x2e3e00, 0x3d38e0, 0x22, 0x22, 0x1)
    /nix/store/aiy9iy5ifap1g3a71aacd5k6dpyjnkd2-go-1.6.3/share/go/src/testing/testing.go:583 +0x8d2
testing.(*M).Run(0xc820069ef8, 0x0)
    /nix/store/aiy9iy5ifap1g3a71aacd5k6dpyjnkd2-go-1.6.3/share/go/src/testing/testing.go:515 +0x81
main.main()
    crypto/x509/_test/_testmain.go:122 +0x117

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /nix/store/aiy9iy5ifap1g3a71aacd5k6dpyjnkd2-go-1.6.3/share/go/src/runtime/asm_amd64.s:1998 +0x1
FAIL    crypto/x509 0.188s
ok      database/sql    0.053s
ok      database/sql/driver 0.011s
ok      debug/dwarf 0.016s
ok      debug/elf   0.034s
ok      debug/gosym 0.365s
ok      debug/macho 0.012s
ok      debug/pe    0.023s
ok      debug/plan9obj  0.011s
ok      encoding/ascii85    0.011s
ok      encoding/asn1   0.014s
ok      encoding/base32 0.013s
ok      encoding/base64 0.012s
ok      encoding/binary 0.012s
ok      encoding/csv    0.012s
ok      encoding/gob    0.050s
ok      encoding/hex    0.011s
ok      encoding/json   0.167s
ok      encoding/pem    0.022s
ok      encoding/xml    0.021s
ok      errors  0.011s
ok      expvar  0.018s
ok      flag    0.012s
ok      fmt 0.192s
ok      go/ast  0.013s
ok      go/build    0.089s
ok      go/constant 0.016s
ok      go/doc  0.047s
ok      go/format   0.018s
ok      go/internal/gccgoimporter   0.012s
ok      go/internal/gcimporter  0.264s
ok      go/parser   0.041s
ok      go/printer  0.557s
ok      go/scanner  0.013s
ok      go/token    0.036s
ok      go/types    0.646s
ok      hash/adler32    0.015s
ok      hash/crc32  0.011s
ok      hash/crc64  0.012s
ok      hash/fnv    0.011s
ok      html    0.012s
ok      html/template   0.048s
ok      image   0.157s
ok      image/color 0.125s
ok      image/draw  0.121s
ok      image/gif   0.086s
ok      image/jpeg  0.168s
ok      image/png   0.046s
ok      index/suffixarray   0.018s
ok      internal/golang.org/x/net/http2/hpack   0.013s
ok      internal/singleflight   0.021s
ok      internal/trace  0.011s
ok      io  0.028s
ok      io/ioutil   0.012s
ok      log 0.012s
ok      log/syslog  2.061s
ok      math    0.012s
ok      math/big    0.440s
ok      math/cmplx  0.012s
ok      math/rand   0.066s
ok      mime    0.019s
ok      mime/multipart  0.385s
ok      mime/quotedprintable    0.126s
ok      net 1.973s
ok      net/http    10.806s
ok      net/http/cgi    0.502s
ok      net/http/cookiejar  0.021s
ok      net/http/fcgi   0.019s
ok      net/http/httptest   0.020s
ok      net/http/httputil   0.042s
ok      net/http/internal   0.013s
ok      net/internal/socktest   0.011s
ok      net/mail    0.017s
ok      net/rpc 0.034s
ok      net/rpc/jsonrpc 0.021s
ok      net/smtp    0.056s
ok      net/textproto   0.015s
ok      net/url 0.020s
ok      os  0.399s
ok      os/exec 0.612s
ok      os/signal   1.632s
ok      os/user 0.027s
ok      path    0.009s
ok      path/filepath   0.030s
ok      reflect 0.074s
ok      regexp  0.115s
ok      regexp/syntax   0.510s
ok      runtime 37.354s
ok      runtime/debug   0.015s
ok      runtime/internal/atomic 0.140s
ok      runtime/pprof   2.171s
ok      runtime/trace   2.191s
ok      sort    0.080s
ok      strconv 1.209s
ok      strings 0.122s
ok      sync    0.121s
ok      sync/atomic 1.249s
ok      syscall 0.109s
ok      testing 1.897s
ok      testing/quick   0.048s
ok      text/scanner    0.012s
ok      text/tabwriter  0.012s
ok      text/template   0.033s
ok      text/template/parse 0.015s
ok      time    2.449s
ok      unicode 0.013s
ok      unicode/utf16   0.010s
ok      unicode/utf8    0.014s
ok      cmd/addr2line   1.870s
ok      cmd/api 0.016s
ok      cmd/asm/internal/asm    0.156s
ok      cmd/asm/internal/lex    0.012s
ok      cmd/compile/internal/big    0.899s
ok      cmd/compile/internal/gc 0.824s
ok      cmd/cover   2.926s
ok      cmd/doc 0.028s
ok      cmd/fix 0.022s
ok      cmd/go  48.706s
ok      cmd/gofmt   0.040s
ok      cmd/internal/goobj  0.011s
ok      cmd/internal/obj    0.012s
ok      cmd/internal/obj/x86    0.011s
ok      cmd/internal/unvendor/golang.org/x/arch/arm/armasm  0.015s
ok      cmd/internal/unvendor/golang.org/x/arch/x86/x86asm  0.327s
ok      cmd/nm  2.184s
ok      cmd/objdump 2.929s
ok      cmd/pack    2.980s
ok      cmd/pprof/internal/profile  0.012s
ok      cmd/vet 3.770s
2016/09/02 15:46:05 Failed: exit status 1
builder for ‘/nix/store/s8cqlvlpzdwm3jfx12gq8z82rxa05wvm-go-1.6.3.drv’ failed with exit code 1
cannot build derivation ‘/nix/store/v4d4wqvdqcqfhjpkmahsxp31zx4j4adv-go1.6-hound-20160422-ed547ac.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/kv91jhgg5hmgirkqri2w56wgmfyd19p1-nix.houndd.plist.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/9xrql065pxznlnllxrbz8hq48xkx581s-Graham.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/9xrql065pxznlnllxrbz8hq48xkx581s-Graham.drv’ failed

Steps to reproduce

nix-shell -p go_1_6

Technical details

OSX 10.11.6

"16.09pre90369.202d9e2"

nix-env (Nix) 1.11.2

@nixy
Copy link
Contributor

nixy commented Sep 10, 2016

This appears to be the same issue affecting the 1.7 build referenced in #18067.

I don't understand the Go build process that well, but it looks like the issue is that it isn't able to pass the test for the crypto/x509 package as shown in this portion:

FAIL crypto/x509 0.188s

Looking at the stack trace with my limited understanding of Go it looks like the test is invoking a function (FetchPEMRoots) written in C using a foreign function interface which then fails, causing the test to fail. I would be interested in what the issue is, but I don't know enough Go to troubleshoot this.

@nixy
Copy link
Contributor

nixy commented Sep 10, 2016

So I did some more digging and it looks like this may be an upstream issue regarding the way Go interacts with the SSL_CERT_FILE environmental variable.

@mstone was trying to address an issue with Go regarding the crypto module in #10875, but his patch seems to resolve the build problems for Go 1.6 and 1.7 as well.

His changes can be found at mstone/nixpkgs@fc28879.

@LnL7
Copy link
Member

LnL7 commented Sep 14, 2016

This can be fixed by porting the patches for 1.7 #18546

@sly010
Copy link

sly010 commented Sep 20, 2016

What happens is go calls into C.FetchPEMRoots() which then supposed to call into some MacOSX framework but instead it segfaults. Interestingly the segfault only happens with go built with nix.
Something very similar happened when I tried to use MacOSX's native fsevents on Darwin/Go/Nix.
I couldn't resolve the issue, but compiling the exact same code with a non-nix go worked.

I am starting to suspect the underlying issue is somewhere around go linking to MacOSX Frameworks, then nix messing up those links. Just a theory.

Of course if go just loads the certs from $SSL_CERT_FILE and avoids calling MacOSX code altogether, that will resolve this issue, but there is still something fishy going on.

@LnL7
Copy link
Member

LnL7 commented Sep 20, 2016

@sly010 I think this is some sort of signing/security issue, probably because of the way the darwin stdenv currently works. There are no issues with x509 when running as root IIRC.

@zimbatm
Copy link
Member

zimbatm commented Mar 10, 2017

This is still an issue with go 1.8 and prevents me from using most go programs

@LnL7
Copy link
Member

LnL7 commented Mar 10, 2017

I'm pretty sure go 1.7 and 1.8 are patched correctly so SSL_CERT_FILE is used, when do you see this?

@zimbatm
Copy link
Member

zimbatm commented Mar 10, 2017

SSL_CERT_FILE has been renamed to NIX_SSL_CERT_FILE recently. If I set export SSL_CERT_FILE=$NIX_SSL_CERT_FILE then it's fine

@zimbatm
Copy link
Member

zimbatm commented Mar 10, 2017

Here is a minimal example to reproduce the issue: https://gist.github.com/zimbatm/8a67bd43242eaaed75924bd25e6fb5c6

@LnL7
Copy link
Member

LnL7 commented Mar 10, 2017

Right, I forgot about that. I probably still set SSL_CERT_FILE somewhere in my dotfiles, I'll take a look and fix it.

@robx
Copy link
Contributor

robx commented Jul 7, 2017

I'm not sure why, but after fixing the go_1_6 build at all on macOS Sierra (#27230), the test crypto/x509 passes fine for me, so it seems this can be closed?

(The minimal example linked by @zimbatm above also works fine (as is, builds, and the executable executes happily), also after changing it to use buildGo16Package.)

@zimbatm
Copy link
Member

zimbatm commented Jul 10, 2017

@robx did you unset SSL_CERT_FILE and NIX_SSL_CERT_FILE? nix-build && SSL_CERT_FILE= NIX_SSL_CERT_FILE= ./result-bin/bin/bar still fails for me on Darwin with the above gist.

@robx
Copy link
Contributor

robx commented Jul 10, 2017

@zimbatm Ah yes that way it fails. Seems like it should be a separate issue though?

@zimbatm
Copy link
Member

zimbatm commented Jul 10, 2017

Maybe. The go compilation error is fixed because we put some lipstick on it but the underlying issue is still there and ugly.

@robx
Copy link
Contributor

robx commented Jul 10, 2017

But this is a ticket explicitly about outdated go1.6 not compiling, while your test case applies to the newer versions, too, right? Here I think it just gets (got) lost...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants