<p dir="auto">by <strong>ianremmler</strong>:</p>
<pre class="notranslate">What does 'go version' print?

go version go1.3 linux/amd64

What steps reproduce the problem?
If possible, include a link to a program on play.golang.org.

<a href="http://play.golang.org/p/gQM33-crSr" rel="nofollow">http://play.golang.org/p/gQM33-crSr</a>

Running go build will, about 15% of the time, produce a seemingly spurious error.

What happened?

ian@tau:~/devel/go/src/github.com/ianremmler/foobar% go build
# github.com/ianremmler/foobar
./foobar.go:31: cannot use f (type *C.foo) as type *C.struct_foo in argument to toGo
./foobar.go:32: cannot use gf.toC() (type *C.struct_foo) as type *C.foo in argument to
_Cfunc_foofunc

What should have happened instead?

No error.

Please provide any additional information below.

This is a pared down example based on a wrapper for the chipmunk physics library that I
forked and have been (mildy) maintaining:

<a href="https://github.com/ianremmler/chipmunk">https://github.com/ianremmler/chipmunk</a>

The error did not occur in earlier Go versions.  The cyclically dependent C structs seem
to be implicated as the error goes away if the bar pointer is removed from foo, or vice
versa.</pre>
<p dir="auto">by <strong>ninkendo</strong>:</p>
<pre class="notranslate">This is on a University server (I'm the admin) and I'm trying to get Go 
working on an NFS mount so all our Ubuntu servers can have the go compiler 
on it (so students can play around with it.)

I can consistently compile Go from a directory like /tmp or /usr/src, but 
cloning the hg tree to a NFS-mounted direcory always results in a segfault.

What steps will reproduce the problem?
1. Clone the mercurial tree to an NFS filesystem
2. Set GOBIN to any directory, on or off NFS
3. cd to $GOROOT/src and run ./all.bash

What is the expected output? What do you see instead?

Expected build to perform the same as it does on non-nfs filesystems.

Instead, get the following:

gopack grc _obj/runtime.a _go_.6 asm.6 cgocall.6 chan.6 closure.6 float.6 
hashmap.6 iface.6 malloc.6 mcache.6 mcentral.6 mem.6 mfixalloc.6 mgc0.6 
mheap.6 mheapmap64.6 msize.6 print.6 proc.6 reflect.6 rune.6 runtime.6 
rt0.6 sema.6 signal.6 slice.6 string.6 symtab.6 sys.6 thread.6 traceback.6
make[1]: *** [_obj/runtime.a] Segmentation fault
rm reflect.c string.c sema.c malloc.c
make[1]: Leaving directory `/nfs/apps/go/src/pkg/runtime'
make: *** [runtime.install] Error 2

I can reliably reproduce the segfault from $GOROOT/src/pkg/runtime and 
running the above gopack command.


What is your $GOOS?  $GOARCH?
linux, amd64

(Ubuntu 8.04.3 LTS, kernel 2.6.24-24-server)

Which revision are you sync'ed to?  (hg log -l 1)

changeset:   3975:b51fd2d6c160

Please provide any additional information below.

strace dump is included.  It looks like it's segfaulting trying to talk to 
winbind for user authentication?  Not sure if gopack is doing any of this, 
or if it's library code... but it reliably works when $GOROOT is on a local 
filesystem.</pre>
<p dir="auto">Attachments:</p>
<ol dir="auto">
<li><a href="https://storage.googleapis.com/go-attachment/48/0/strace.txt" rel="nofollow">strace.txt</a> (9011 bytes)</li>
</ol>