--
You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/HtcZc3wO-rw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
$ env | grep DYLD_INSERT_LIBRARIES
DYLD_INSERT_LIBRARIES=/usr/lib/dgagent/libpreload.dylib
DYLD_INSERT_LIBRARIES=
As you can see the Digital Guardian libraries are automatically set. Then when I tried to install gocart again, this time it worked like a charm. So for me, all I had to do was to set DYLD_INSERT_LIBRARIES to a blank value.
--
The stack trace shows that it is faling in the runtime.goenvs() function which is line 104 in the os_darwin.c. Highlighted line is where it is failing. Since this is my first time ever looking inside the golang source code, can someone with internals knowledge explain reasons why runtime·bsdthread_register() is returning a nonzero value? Understanding that is a key for me to resolve this issue.
go build -ldflags -linkmode=external main.go
# command-line-arguments
fatal error: runtime: bsdthread_register error
runtime stack:
runtime.throw(0x4576a0, 0x21)
/usr/local/go/src/runtime/panic.go:527 +0x90 fp=0x7fff5fbff680 sp=0x7fff5fbff668
runtime.goenvs()
/usr/local/go/src/runtime/os1_darwin.go:73 +0x8d fp=0x7fff5fbff6a8 sp=0x7fff5fbff680
runtime.schedinit()
/usr/local/go/src/runtime/proc1.go:60 +0x83 fp=0x7fff5fbff6f0 sp=0x7fff5fbff6a8
runtime.rt0_go(0x7fff5fbff728, 0x10, 0x7fff5fbff728, 0x0, 0x0, 0x10, 0x7fff5fbff910, 0x7fff5fbff93c, 0x7fff5fbff93f, 0x7fff5fbff99b, ...)
/usr/local/go/src/runtime/asm_amd64.s:109 +0x132 fp=0x7fff5fbff6f8 sp=0x7fff5fbff6f0
My go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/workspace-go/dnsproxy"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GO15VENDOREXPERIMENT=""
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/workspace-go/test"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.5.2/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.5.2/libexec/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"
export DYLD_LIBRARY_PATH=
and then building
go build -ldflags -linkmode=external main.go
I was able to run the test program.
The only difference between both GO ENV is
GO
< GOROOT="/usr/local/go"
< GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
---
BREW GO
> GOROOT="/usr/local/Cellar/go/1.5.2/libexec"
> GOTOOLDIR="/usr/local/Cellar/go/1.5.2/libexec/pkg/tool/darwin_amd64"
Hi ,I am trying to build and run a simple Go prrogram on my mac. I tried with and without the -ldflags. Same issue
go build -ldflags -linkmode=external main.go
# command-line-arguments
fatal error: runtime: bsdthread_register error
runtime stack:
runtime.throw(0x4576a0, 0x21)
/usr/local/go/src/runtime/panic.go:527 +0x90 fp=0x7fff5fbff680 sp=0x7fff5fbff668
runtime.goenvs()
/usr/local/go/src/runtime/os1_darwin.go:73 +0x8d fp=0x7fff5fbff6a8 sp=0x7fff5fbff680
runtime.schedinit()
/usr/local/go/src/runtime/proc1.go:60 +0x83 fp=0x7fff5fbff6f0 sp=0x7fff5fbff6a8
runtime.rt0_go(0x7fff5fbff728, 0x10, 0x7fff5fbff728, 0x0, 0x0, 0x10, 0x7fff5fbff910, 0x7fff5fbff93c, 0x7fff5fbff93f, 0x7fff5fbff99b, ...)
/usr/local/go/src/runtime/asm_amd64.s:109 +0x132 fp=0x7fff5fbff6f8 sp=0x7fff5fbff6f0
My go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/workspace-go/test"
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
Hey All,I could use a little help with my go lang environment. Recently everything was fine. I've definitely done some updates and such. Now I'm getting the following trace no matter what. If I build or even run prebuilt binaries I get the same issue. Has anyone else run into this?
fatal error: runtime: bsdthread_register errorruntime stack:
runtime.throw(0x141f95)/usr/local/go/src/pkg/runtime/panic.c:520 +0x69runtime.goenvs()/usr/local/go/src/pkg/runtime/os_darwin.c:88 +0x62runtime.schedinit()/usr/local/go/src/pkg/runtime/proc.c:164 +0x76_rt0_go()/usr/local/go/src/pkg/runtime/asm_amd64.s:91 +0x114exit status 2
$ go versiongo version go1.3.1 darwin/amd64
$ go envGOARCH="amd64"GOBIN=""GOCHAR="6"
GOEXE=""GOHOSTARCH="amd64"GOHOSTOS="darwin"GOOS="darwin"GOPATH=""
GORACE=""GOROOT="/usr/local/go"GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
CC="clang"GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"CXX="clang++"CGO_ENABLED="1"