<pre class="notranslate">import (
-  //  "bytes";
-  "fmt";
-  //   "strings";
-  "time";
+  "fmt" //  "bytes";
+  ;
+
+  "time" //  "strings";
+  ;
   "testing";

What steps will reproduce the problem?
1. comment out a few line items in an import statement
2. run gofmt on the file, my incantation:

gofmt -w -spaces -tabwidth=2 `find . -name '*.go'`

3. attempt to compile - i get syntax errors

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

gofmt generates this:

package cache                                                                           
                                                                      
                                                                                                                                                               
import (                                                                                
                                                                      
  "fmt" //  "bytes";                                                                                                                                           
  ;                                                                                                                                                            

the compiler says:
perf_test.go:5: syntax error near uint8

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

Which revision are you using?  (hg identify)
683ed10f7832 tip

This was introduced within the last 2 calendar days.</pre>
<p dir="auto">by <strong><a href="mailto:kballard@apple.com">kballard@apple.com</a></strong>:</p>
<pre class="notranslate">When attempting to compile Go on OS X 10.7 Developer Preview 3 (11A459e), on a Mac Pro
running the 64-bit kernel, with an appropriate version of the pre-release Lion dev tools
installed, go fails to compile the net package.


INSTALL FAIL net
CGOPKGPATH= cgo --  cgo_bsd.go cgo_unix.go 
touch _obj/_cgo_run
6g  -o _go_.6 dial.go dnsmsg.go fd_darwin.go hosts.go ip.go ipsock.go iprawsock.go
lookup.go net.go parse.go pipe.go sock.go tcpsock.go udpsock.go unixsock.go 
dnsclient.go dnsconfig.go fd.go file.go newpollserver.go port.go sendfile_stub.go
sock_bsd.go  _obj/cgo_bsd.cgo1.go _obj/cgo_unix.cgo1.go _obj/_cgo_gotypes.go
6c -FVw -I/Volumes/Greenholm/Users/kevin/go/pkg/darwin_amd64 -I . -o
"_cgo_defun.6" _obj/_cgo_defun.c
gcc -m64 -I . -g -fPIC -O2 -o _cgo_main.o -c   _obj/_cgo_main.c
gcc -m64 -I . -g -fPIC -O2 -o cgo_bsd.cgo2.o -c   _obj/cgo_bsd.cgo2.c
gcc -m64 -I . -g -fPIC -O2 -o cgo_unix.cgo2.o -c   _obj/cgo_unix.cgo2.c
gcc -m64 -I . -g -fPIC -O2 -o _cgo_export.o -c   _obj/_cgo_export.c
gcc -m64 -g -fPIC -O2 -o _cgo1_.o _cgo_main.o cgo_bsd.cgo2.o cgo_unix.cgo2.o
_cgo_export.o  
cgo -dynimport _cgo1_.o &gt;_obj/_cgo_import.c_ &amp;&amp; mv -f _obj/_cgo_import.c_
_obj/_cgo_import.c
6c -FVw -I . -o "_cgo_import.6" _obj/_cgo_import.c
cgo_bsd.go:5[_obj/cgo_bsd.cgo1.go:8]: undefined: _Cconst_AI_MASK
cgo_unix.go:69[_obj/cgo_unix.cgo1.go:72]: undefined: _Cconst_AI_ALL
cgo_unix.go:69[_obj/cgo_unix.cgo1.go:72]: undefined: _Cconst_AI_V4MAPPED
cgo_unix.go:69[_obj/cgo_unix.cgo1.go:72]: undefined: _Cconst_AI_CANONNAME
make[1]: *** [_go_.6] Error 1
make: *** [net.install] Error 1

I've attached the output of

cd $GOROOT/src/pkg/net
make
tar c . | gzip &gt;net.tgz

Oddly enough, on my iMac running the same build of 10.7 with the 32-bit kernel with a
different version of the dev tools installed, go builds without a problem.</pre>
<p dir="auto">Attachments:</p>
<ol dir="auto">
<li><a href="https://storage.googleapis.com/go-attachment/1881/0/net.tgz" rel="nofollow">net.tgz</a> (73959 bytes)</li>
</ol>