Hi Serhat, I just encountered this too, while trying to get started.
The solution in my case was to actually use Cgo in my go program. Simply adding `import "C"` fixed the problem. Hope that helps! - Peter On 3 March 2016 at 21:40, Serhat Şevki Dinçer <jfcga...@gmail.com> wrote: > Hi, > When I do *go build -buildmode=shared* on any package, I get > # /tmp/go-build710315639/libbutter.so > warning: unable to find runtime/cgo.a > sync/atomic.StorePointer: sync/atomic.StoreUintptr: not defined > sync/atomic.SwapPointer: sync/atomic.SwapUintptr: not defined > sync/atomic.CompareAndSwapPointer: sync/atomic.CompareAndSwapUintptr: not > defined > runtime.sync_atomic_CompareAndSwapUintptr·f: > sync/atomic.CompareAndSwapUintptr: not defined > runtime.sync_atomic_StoreUintptr·f: sync/atomic.StoreUintptr: not defined > runtime.sync_atomic_SwapUintptr·f: sync/atomic.SwapUintptr: not defined > sync/atomic.StorePointer: undefined: sync/atomic.StoreUintptr > sync/atomic.SwapPointer: undefined: sync/atomic.SwapUintptr > sync/atomic.CompareAndSwapPointer: undefined: > sync/atomic.CompareAndSwapUintptr > runtime.sync_atomic_CompareAndSwapUintptr·f: undefined: > sync/atomic.CompareAndSwapUintptr > runtime.sync_atomic_StoreUintptr·f: undefined: sync/atomic.StoreUintptr > runtime.sync_atomic_SwapUintptr·f: undefined: sync/atomic.SwapUintptr > > I do have cgo.a file on my go installation, officlal linux/amd64 release > from golang.org/dl > > Also, *go install -buildmode=shared* says I have multiple roots and prints > $GOROOT/pkg/linux_amd64_dynlink > $GOPATH/pkg/linux_amd64_dynlink > > How should build a Go shared library ? > > Note: I have linux Mint 17.3 64-bit > > -- > 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+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.