opened
NightBlaze
username_0
Project structure
```
.
└── src
    └── main
        └── main.go
```

File main.go

```
package main

import (
	"log"
	"net/http"
)

func main() {
	err := http.ListenAndServe(":8080", nil)
	if err != nil {
		log.Fatal("ListenAndServe: ", err)
	} else {
		log.Print("Server started!")
	}
}
```

Build project with gb build (and gb build all) and get result

```
container/list
unicode/utf8
errors
sort
crypto/subtle
unicode
sync/atomic
Undefined symbols for architecture x86_64:
  "_crosscall_amd64", referenced from:
      _threadentry in gcc_darwin_amd64.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
# runtime/cgo
math
strconv
crypto/rc4
runtime
sync
internal/singleflight
io
math/rand
hash
encoding/base64
bytes
crypto/cipher
crypto
crypto/hmac
strings
hash/crc32
bufio
path
encoding/pem
crypto/aes
crypto/md5
crypto/sha1
crypto/sha256
crypto/sha512
syscall
reflect
encoding/binary
crypto/des
time
os
path/filepath
io/ioutil
os/exec
fmt
encoding/hex
log
net/url
net/http/internal
mime/quotedprintable
mime
compress/flate
compress/gzip
math/big
crypto/dsa
crypto/rand
crypto/elliptic
encoding/asn1
crypto/rsa
crypto/x509/pkix
crypto/ecdsa
FATAL: command "build" failed: exit status 1
```

OS: Mac OS X 10.11.2
Go: go version go1.5.2 darwin/amd64
Error compile: ld: symbol(s) not found for architecture x86_64
issue
created
davecheney
username_1
Thanks for this issue report.

Which version of gb are you using (git revision) ?

Looking at this issue report either your go install is messed up, or you have set GOROOT, or the version of Go that build gb is not the version of Go you are using right now.
comment
created
NightBlaze
username_0
I installed gb few minutes ago using go get github.com/constabulary/gb/... so it should be last revision at this moment.
comment
created
davecheney
username_1
Ok, thanks for that.

Can you double check your go install for me.
comment
created
NightBlaze
username_0
Can you describe how I can check it? I'm iOS developer so all about go are very new for me :)
comment
created
davecheney
username_1
How did you install Go ?
comment
created
NightBlaze
username_0
With *.pkg from official site https://golang.org/dl/

Apple OS X
OS X 10.8 or later, Intel 64-bit processor
go1.5.2.darwin-amd64.pkg (73MB)
SHA1: 102b4e946b7bb40f0e8aa508e41340a696ead752
comment
created
davecheney
username_1
Can you include the output of `go env` for me ?
comment
created
NightBlaze
username_0
MacBook-Pro-Alexander:~ nightblaze$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/nightblaze/Work/_Go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GO15VENDOREXPERIMENT=""
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"
CXX="clang++"
CGO_ENABLED="1"
comment
created
davecheney
username_1
ok, that looks fine. I'm testing 1.5 now. Basically gb thinks your go installation is out of date and is trying to rebuild it.
comment
created
NightBlaze
username_0
Ok. Thanks. I'll try to reinstall go
comment
created
NightBlaze
username_0
I reinstalled go and gb and now I have error

```
container/list
unicode/utf8
errors
sort
crypto/subtle
unicode
Undefined symbols for architecture x86_64:
  "_crosscall_amd64", referenced from:
      _threadentry in gcc_darwin_amd64.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
# runtime/cgo
sync/atomic
math
strconv
crypto/rc4
runtime
sync
io
internal/singleflight
math/rand
hash
encoding/base64
bytes
crypto
crypto/hmac
crypto/cipher
strings
hash/crc32
bufio
path
encoding/pem
crypto/sha256
crypto/sha512
crypto/sha1
crypto/md5
syscall
crypto/aes
reflect
encoding/binary
crypto/des
time
os
path/filepath
io/ioutil
os/exec
fmt
mime/quotedprintable
net/url
log
net/http/internal
encoding/hex
mime
compress/flate
compress/gzip
math/big
crypto/dsa
crypto/rand
crypto/elliptic
encoding/asn1
crypto/rsa
crypto/x509/pkix
crypto/ecdsa
FATAL: command "build" failed: exit status 1
```
comment
created
davecheney
username_1
Thank you. I am trying to reproduce the issue you are seeing. See #516 #517
comment
created
davecheney
username_1
Thank you for your persistence. I've been able to reproduce the issue, and it appears restricted to using the binary osx installer.
comment
created
davecheney
username_1
The bug is being caused by the dl version of Go is incorrect
```
16777220 6554433 -rw-r--r-- 1 root wheel 0 5842 "Dec 29 15:38:18 2015" "Dec  3 02:01:12 2015" "Dec 29 15:29:26 2015" "Dec  3 02:01:12 2015" 4096 16 0 /usr/local/go/pkg/darwin_amd64/errors.a
16777220 6556089 -rw-r--r-- 1 root wheel 0 499 "Dec 29 15:38:29 2015" "Dec  3 02:01:13 2015" "Dec 29 15:29:27 2015" "Dec  3 02:01:13 2015" 4096 8 0 /usr/local/go/src/errors/errors.go
```
comment
created
NightBlaze
username_0
I reinstalled go with archive and now all work correctly
go1.5.2.darwin-amd64.tar.gz	Archive	OS X	64-bit	73MB 4f30332a56e9c8a36daeeff667bab3608e4dffd2
comment
created
davecheney
username_1
Thanks for confirming. I'm sorry you had to hit this. I raised golang/go#13769 and am working on a quick fix to work around the problem in gb for the moment.
comment
closed
davecheney
username_1
issue
reopened
davecheney
username_1
Project structure
```
.
└── src
    └── main
        └── main.go
```

File main.go

```
package main

import (
	"log"
	"net/http"
)

func main() {
	err := http.ListenAndServe(":8080", nil)
	if err != nil {
		log.Fatal("ListenAndServe: ", err)
	} else {
		log.Print("Server started!")
	}
}
```

Build project with gb build (and gb build all) and get result

```
container/list
unicode/utf8
errors
sort
crypto/subtle
unicode
sync/atomic
Undefined symbols for architecture x86_64:
  "_crosscall_amd64", referenced from:
      _threadentry in gcc_darwin_amd64.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
# runtime/cgo
math
strconv
crypto/rc4
runtime
sync
internal/singleflight
io
math/rand
hash
encoding/base64
bytes
crypto/cipher
crypto
crypto/hmac
strings
hash/crc32
bufio
path
encoding/pem
crypto/aes
crypto/md5
crypto/sha1
crypto/sha256
crypto/sha512
syscall
reflect
encoding/binary
crypto/des
time
os
path/filepath
io/ioutil
os/exec
fmt
encoding/hex
log
net/url
net/http/internal
mime/quotedprintable
mime
compress/flate
compress/gzip
math/big
crypto/dsa
crypto/rand
crypto/elliptic
encoding/asn1
crypto/rsa
crypto/x509/pkix
crypto/ecdsa
FATAL: command "build" failed: exit status 1
```

OS: Mac OS X 10.11.2
Go: go version go1.5.2 darwin/amd64
Error compile: ld: symbol(s) not found for architecture x86_64
issue
closed
davecheney
username_1
issue