release.2010-01-27

78 views
Skip to first unread message

Russ Cox

unread,
Jan 27, 2010, 10:53:39 PM1/27/10
to golang-nuts
We've just tagged a new Go release, release.2010-01-27. As usual, you
can update by running:

hg pull
hg update release

There are two small language changes: the meaning of chan <- chan int
is now defined, and functions returning functions do not need to
parenthesize the result type.

There is one significant implementation change: the compilers can
handle multiple packages using the same name in a single binary. In
the gc compilers, this comes at the cost of ensuring that you always
import a particular package using a consistent import path. In the
gccgo compiler, the cost is that you must use the -fgo-prefix flag to
pass a unique prefix (like the eventual import path). More here:
https://groups.google.com/group/golang-nuts/t/e2dca00fd59f5c1f
https://groups.google.com/group/golang-nuts/t/374b2ff08c14410e

5a/6a/8a: avoid use of fixed-size buffers (thanks Dean Prichard)
5g, 6g, 8g: many minor bug fixes
bufio: give Writer.WriteString same signature as bytes.Buffer.WriteString.
container/list: PushFrontList, PushBackList (thanks Jan Hosang)
godoc: trim spaces from search query (thanks Christopher Wedgwood)
hash: document that Sum does not change state, fix crypto hashes
http: bug fixes, revision of Request/Response (thanks Petar Maymounkov)
math: more handling of IEEE 754 special cases (thanks Charles Dorian)
misc/dashboard: new build dashboard
net: allow UDP broadcast,
use /etc/hosts to resolve names (thanks Yves Junqueira, Michael Hoisie)
netchan: beginnings of new package for connecting channels across a network
os: allow FQDN in Hostname test (thanks Icarus Sparry)
reflect: garbage collection bug in Call
runtime: demo of Go on raw (emulated) hw in runtime/pchw,
performance fix on OS X
spec: clarify meaning of chan <- chan int,
func() func() int is allowed now,
define ... T (not yet implemented)
template: can use interface values
time: fix for +0000 time zone,
more robust tick.Stop.
xgb: support for authenticated connections (thanks Firmansyah Adiputra)
xml: add Escape (thanks Stephen Weinberg)

My apologies if I have missed anyone's contributions in the above list.
We appreciate all the help.

To see all changes from the last release to this one, you can,
after updating, run

hg log -r release.2009-01-13:release.2010-01-27

Have fun!

Russ


P.S. This release also pushes out the new LICENSE file that adds the
patent grant clause that Ian posted about last week. More here:
https://groups.google.com/group/golang-nuts/t/8f881ceab22cd1b7

yunhui song

unread,
Jan 28, 2010, 12:03:36 AM1/28/10
to r...@golang.org, golang-nuts
I just update the realease:
   hg pull
   hg update release
and
   cd /root/go/src
   ../all.sh

Then I use new version to compile our old code, it says:

hello.go:4: fatal error: can't find import: web

my project layout is here
   
   web
       Makefile
       web.go
       Examples
         Makefile
         hello.go

Anything changed for the "import" statement syntax?

Thanks,
Sammi

Russ Cox

unread,
Jan 28, 2010, 12:08:08 AM1/28/10
to yunhui song, golang-nuts
> Then I use new version to compile our old code, it says:
> hello.go:4: fatal error: can't find import: web

did you recompile web? one of the things that all.bash
does is delete all the installed package binaries so that
you are guaranteed a fresh set.

russ

yunhui song

unread,
Jan 28, 2010, 12:17:12 AM1/28/10
to r...@golang.org, golang-nuts
no, I just compile my local code, not built-in lib. here is the steps:


cd web.go
make

cd examples
make

Then it says:  hello.go:4: fatal error: can't find import: web

It is only displayed after I updated the new release.

Thanks,
Sammi





On Wed, Jan 27, 2010 at 7:53 PM, Russ Cox <r...@golang.org> wrote:

Nigel Tao

unread,
Jan 28, 2010, 12:23:16 AM1/28/10
to yunhui song, golang-nuts
2010/1/28 yunhui song <songyun...@gmail.com>:

>> > Then I use new version to compile our old code, it says:
>> > hello.go:4: fatal error: can't find import: web
>>
>> did you recompile web?  one of the things that all.bash
>> does is delete all the installed package binaries so that
>> you are guaranteed a fresh set.
>
> no, I just compile my local code, not built-in lib. here is the steps:
> git clone git://github.com/hoisie/web.go.git
> cd web.go
> make

Do you need to "make install"?

Tao Yinqing

unread,
Jan 28, 2010, 12:45:37 AM1/28/10
to r...@golang.org, golang-nuts
I just recheckout the source code ,run ./all.bash and run "godoc
--http=:6060" but i'm see that log
===================================================================
2010/01/28 00:39:43 parser.parseDir: found 0 packages
2010/01/28 00:39:47 parser.parseDir: found 0 packages
2010/01/28 00:39:49 parser.parseDir: found 0 packages
===================================================================
when i explore package documentation


Sean Lin

unread,
Jan 28, 2010, 12:51:30 AM1/28/10
to golang-nuts
Overture compiled with LANG=en_US
some version of bison will make a local output.

On Jan 28, 11:53 am, Russ Cox <r...@golang.org> wrote:
> We've just tagged a new Go release, release.2010-01-27.  As usual, you
> can update by running:
>
>         hg pull
>         hg update release
>
> There are two small language changes: the meaning of chan <- chan int
> is now defined, and functions returning functions do not need to
> parenthesize the result type.
>
> There is one significant implementation change: the compilers can
> handle multiple packages using the same name in a single binary.  In
> the gc compilers, this comes at the cost of ensuring that you always
> import a particular package using a consistent import path.  In the
> gccgo compiler, the cost is that you must use the -fgo-prefix flag to

> pass a unique prefix (like the eventual import path).  More here:https://groups.google.com/group/golang-nuts/t/e2dca00fd59f5c1fhttps://groups.google.com/group/golang-nuts/t/374b2ff08c14410e

wuqq

unread,
Jan 28, 2010, 1:10:38 AM1/28/10
to golang-nuts
Oh, It couldn't compile in my machine. When I run "./all.bash", It
stopped here:

%%%% making gc %%%%
...
cat y.tab.c | sed '/ int yystate;/d; s/int yychar;/int yychar,
yystate;/; s/static const char \*const yytname/const char *yytname/'
>y1.tab.c
/home/bin/quietgcc -ggdb -I"/home/go"/include -O2 -fno-inline -c "/
home/go/src/cmd/gc"/y1.tab.c
/home/go/src/cmd/gc/yerr.h:17: error: ‘loadsys’ undeclared here (not
in a function)

On 1月28日, 上午11时53分, Russ Cox <r...@golang.org> wrote:
> We've just tagged a new Go release, release.2010-01-27.  As usual, you
> can update by running:
>
>         hg pull
>         hg update release
>
> There are two small language changes: the meaning of chan <- chan int
> is now defined, and functions returning functions do not need to
> parenthesize the result type.
>
> There is one significant implementation change: the compilers can
> handle multiple packages using the same name in a single binary.  In
> the gc compilers, this comes at the cost of ensuring that you always
> import a particular package using a consistent import path.  In the
> gccgo compiler, the cost is that you must use the -fgo-prefix flag to

> pass a unique prefix (like the eventual import path).  More here:https://groups.google.com/group/golang-nuts/t/e2dca00fd59f5c1fhttps://groups.google.com/group/golang-nuts/t/374b2ff08c14410e

Ian Lance Taylor

unread,
Jan 28, 2010, 1:13:52 AM1/28/10
to wuqq, golang-nuts
wuqq <wuq...@gmail.com> writes:

> Oh, It couldn't compile in my machine. When I run "./all.bash", It
> stopped here:
>
> %%%% making gc %%%%
> ...
> cat y.tab.c | sed '/ int yystate;/d; s/int yychar;/int yychar,
> yystate;/; s/static const char \*const yytname/const char *yytname/'
>>y1.tab.c
> /home/bin/quietgcc -ggdb -I"/home/go"/include -O2 -fno-inline -c "/
> home/go/src/cmd/gc"/y1.tab.c
> /home/go/src/cmd/gc/yerr.h:17: error: ‘loadsys’ undeclared here (not
> in a function)

Do you have the awk program installed?

What are the contents of the generated file src/cmd/gc/yerr.h?

Ian

Bian Jiang

unread,
Jan 28, 2010, 1:17:27 AM1/28/10
to wuqq, golang-nuts
You can try:
hg pull
hg update release
 ./clean.bash
./all.bash

On Thu, Jan 28, 2010 at 2:10 PM, wuqq <wuq...@gmail.com> wrote:
Oh, It couldn't compile in my machine. When I run "./all.bash", It
stopped here:

%%%% making gc %%%%
...
cat y.tab.c | sed '/ int yystate;/d; s/int yychar;/int yychar,
yystate;/; s/static const char \*const yytname/const char *yytname/'
>y1.tab.c
/home/bin/quietgcc -ggdb -I"/home/go"/include -O2 -fno-inline -c "/
home/go/src/cmd/gc"/y1.tab.c
/home/go/src/cmd/gc/yerr.h:17: error: ‘loadsys’ undeclared here (not
in a function)
 
--
Bian Jiang
Blog:  http://www.wifihack.net/

Russ Cox

unread,
Jan 28, 2010, 1:18:47 AM1/28/10
to wuqq, golang-nuts
On Wed, Jan 27, 2010 at 22:10, wuqq <wuq...@gmail.com> wrote:
> Oh, It couldn't compile in my machine. When I run "./all.bash", It
> stopped here:
>
> %%%% making gc %%%%
> ...
> cat y.tab.c | sed '/ int yystate;/d; s/int yychar;/int yychar,
> yystate;/; s/static const char \*const yytname/const char *yytname/'
>>y1.tab.c
> /home/bin/quietgcc -ggdb -I"/home/go"/include -O2 -fno-inline -c "/
> home/go/src/cmd/gc"/y1.tab.c
> /home/go/src/cmd/gc/yerr.h:17: error: ‘loadsys’ undeclared here (not
> in a function)

please create an issue on the issue tracker.
in addition to the information it asks for,
please include the output of the command: bison -V.

thanks.
russ

Sean Lin

unread,
Jan 28, 2010, 1:20:16 AM1/28/10
to golang-nuts
LANG=en_US ./all.bash

On Jan 28, 2:10 pm, wuqq <wuqq...@gmail.com> wrote:
> Oh, It couldn't compile in my machine. When I run "./all.bash", It
> stopped here:
>
> %%%% making gc %%%%
> ...
> cat y.tab.c | sed '/ int yystate;/d; s/int yychar;/int yychar,
> yystate;/; s/static const char \*const yytname/const char *yytname/'>y1.tab.c
>
> /home/bin/quietgcc -ggdb -I"/home/go"/include -O2 -fno-inline -c "/
> home/go/src/cmd/gc"/y1.tab.c
> /home/go/src/cmd/gc/yerr.h:17: error: ‘loadsys’ undeclared here (not
> in a function)
>
> On 1月28日, 上午11时53分, Russ Cox <r...@golang.org> wrote:
>
> > We've just tagged a new Go release, release.2010-01-27.  As usual, you
> > can update by running:
>
> >         hg pull
> >         hg update release
>
> > There are two small language changes: the meaning of chan <- chan int
> > is now defined, and functions returning functions do not need to
> > parenthesize the result type.
>
> > There is one significant implementation change: the compilers can
> > handle multiple packages using the same name in a single binary.  In
> > the gc compilers, this comes at the cost of ensuring that you always
> > import a particular package using a consistent import path.  In the
> > gccgo compiler, the cost is that you must use the -fgo-prefix flag to

> > pass a unique prefix (like the eventual import path).  More here:https://groups.google.com/group/golang-nuts/t/e2dca00fd59f5c1fhttps:/...

Russ Cox

unread,
Jan 28, 2010, 1:20:15 AM1/28/10
to Sean Lin, golang-nuts
On Wed, Jan 27, 2010 at 21:51, Sean Lin <nets...@gmail.com> wrote:
> Overture compiled with LANG=en_US
> some version of bison will make a local output.

Are you saying that we need to set LANG=en_US
to force the right bison output? What is "Overture"?

Russ

Sean Lin

unread,
Jan 28, 2010, 1:36:11 AM1/28/10
to golang-nuts
In my PC with Ubuntu 9.10, LANG=zh_CN.UTF8,
Bison would make a y.output containing Chinese.
It makes
awk -f bisonerrors y.output go.errors >yerr.h
fail .

On Jan 28, 2:20 pm, Russ Cox <r...@golang.org> wrote:

Bian Jiang

unread,
Jan 28, 2010, 1:53:33 AM1/28/10
to Sean Lin, golang-nuts
ubuntu 8.04
border@ubuntu:~/go/src$ locale
LANG=zh_CN.UTF-8
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=

border@ubuntu:~/go/src/cmd/gc$ bison -V
bison (GNU Bison) 2.3
Written by Robert Corbett and Richard Stallman.

./clear.bash
./all.bash
/home/border/bin/quietgcc -ggdb -I"/home/border/go"/include -O2 -fno-inline -c "/home/border/go/src/cmd/gc"/y1.tab.c
/home/border/go/src/cmd/gc/yerr.h:17:5: 错误:‘loadsys’ undeclared here (not in a function)
make: *** [subr.o] 错误 1
make: *** 正在等待未完成的任务....

when changed the LC_ALL=C, it's work fine.
export LC_ALL=C
./all.bash

wuqq

unread,
Jan 28, 2010, 2:45:14 AM1/28/10
to golang-nuts
Yes, I use "LANG=en_US ./all.bash". It does work.
BTW, my bison version is 2.3

Russ Cox

unread,
Jan 28, 2010, 3:46:01 PM1/28/10
to wuqq, golang-nuts
2010/1/27 wuqq <wuq...@gmail.com>:

> Yes, I use "LANG=en_US ./all.bash". It does work.
> BTW, my bison version is 2.3

Thanks for the report. I'll change it to say LANG=C
which I think is even more likely to be installed than
LANG=en_US.

Russ

zhang xi

unread,
Jan 29, 2010, 1:04:40 AM1/29/10
to golang-nuts
hi exports,

Problem met.

I use bison 2.4.1 and latest release of GO, met an error while i am
running "all.bash" both with and without "LANG=en_US"

make[1]: Entering directory `/home/raul/GO/src/pkg/debug/gosym'
/home/raul/GO/bin/gotest
sh: 6a: not found
make[1]: *** [test] Error 1
make[1]: Leaving directory `/home/raul/GO/src/pkg/debug/gosym'
make: *** [debug/gosym.test] Error 2

since the issue has been closed as "FIXED", please share some info how
it fixed.

Br,
Zhang Raul

On Jan 28, 3:46 pm, Russ Cox <r...@golang.org> wrote:
> 2010/1/27 wuqq <wuqq...@gmail.com>:

Russ Cox

unread,
Jan 29, 2010, 1:36:32 AM1/29/10
to zhang xi, golang-nuts
> since the issue has been closed as "FIXED", please share some info how
> it fixed.

it's fixed but there hasn't been a release yet that includes the fix.
for now

cd $GOROOT/src
hg pull -u
./all.bash

should get you going.

sorry for the trouble.
russ

Miguel Pignatelli

unread,
Feb 1, 2010, 9:32:38 AM2/1/10
to golang-nuts
Hi all,

Sorry if the solution to this problem is embarrassingly simple or has
been discussed before.
After the last release update (01/27) I am not able to compile some
programs using the standard bufio package.
For example, this doesn't work:

package main

import (
"fmt"
"bufio"
"os"
"io"
)

func main (){
nf,_ := os.Open("xx.txt",os.O_RDONLY,0444)
buff := bufio.NewReader(io.Reader(nf))
firstLine,_ := buff.ReadString('\n')
fmt.Println(firstLine)
}

$ 6g test.go
$ 6l test.6
main.main: undefined: bufio.NewReader
main.main: undefined: bufio.*Reader·ReadString
main.init: undefined: bufio.Init·
MHeapMap_Preallocate: type.*bufio.Reader: not defined

The update seemed to work without problems (ended with the normal "2
known bugs; 0 unexpected bugs")

Any idea?

Thanks in advance,

M;

Bian Jiang

unread,
Feb 1, 2010, 9:59:45 AM2/1/10
to pignate...@gva.es, golang-nuts
2010/2/1 Miguel Pignatelli <miguel.p...@uv.es>

Hi all,

Sorry if the solution to this problem is embarrassingly simple or has been discussed before.
After the last release update (01/27) I am not able to compile some programs using the standard bufio package.
For example, this doesn't work:

package main

import (
       "fmt"
       "bufio"
       "os"
       "io"
)

func main (){
       nf,_ := os.Open("xx.txt",os.O_RDONLY,0444)
       buff := bufio.NewReader(io.Reader(nf))
       firstLine,_ := buff.ReadString('\n')
       fmt.Println(firstLine)
}

$ 6g test.go
$ 6l test.6
main.main: undefined: bufio.NewReader
main.main: undefined: bufio.*Reader·ReadString
main.init: undefined: bufio.Init·
MHeapMap_Preallocate: type.*bufio.Reader: not defined


try to: 
cd src/pkg/bufio/
make install

then compile your example.


--
Bian Jiang
Blog:  http://www.wifihack.net/

MC.Spring

unread,
Feb 1, 2010, 10:04:10 AM2/1/10
to golang-nuts

On Jan 28, 1:17 pm, yunhui song <songyunhui2...@gmail.com> wrote:
> > > Then I use new version to compile our old code, it says:
> > > hello.go:4: fatal error: can't find import: web
>
> > did you recompile web?  one of the things that all.bash
> > does is delete all the installed package binaries so that
> > you are guaranteed a fresh set.
>
> no, I just compile my local code, not built-in lib. here is the steps:
>
> git clone git://github.com/hoisie/web.go.git
>
> cd web.go
> make
>
> cd examples
> make
>
> Then it says:  hello.go:4: fatal error: can't find import: web
>
> It is only displayed after I updated the new release.
>
> Thanks,
> Sammi

You just need to re-compile the web.go framework and re-install it.

That's all~

yunhui song

unread,
Feb 1, 2010, 5:10:05 PM2/1/10
to MC.Spring, golang-nuts
Thanks. I made a stupid mistake. I forgot 

make install

Miguel Pignatelli

unread,
Feb 2, 2010, 4:23:39 AM2/2/10
to Bian Jiang, golang-nuts
Hi,

Thanks for the tip, but the problem persists:

$ cd go/src/pkg/bufio
$ make install
cp _obj/bufio.a "blah/blah/go/pkg/linux_amd64/bufio.a"
$ cd blah...


$ 6g test.go
$ 6l test.6
main.main: undefined: bufio.NewReader
main.main: undefined: bufio.*Reader·ReadString
main.init: undefined: bufio.Init·
MHeapMap_Preallocate: type.*bufio.Reader: not defined

Any other idea?
Thanks in advance,

M;

Bian Jiang wrote:
> 2010/2/1 Miguel Pignatelli <miguel.p...@uv.es
> <mailto:miguel.p...@uv.es>>

Russ Cox

unread,
Feb 2, 2010, 4:44:32 AM2/2/10
to pignate...@gva.es, Bian Jiang, golang-nuts
Please try

    cd go/src
    ./all.bash

I suspect that the bufio.a in that directory is somehow
corrupted and that cleaning everything out and
building the tree afresh will resolve the problem.

If that fails I'd be interested to see the output of

    6nm $GOROOT/pkg/linux_amd64/bufio.a | grep NewReader

Russ

Miguel Pignatelli

unread,
Feb 2, 2010, 5:01:54 AM2/2/10
to r...@golang.org, Bian Jiang, golang-nuts
Hi,

Re-building the tree don't solve the problem, I tried that before and
now one more time:

$ ./all.bash
[...]

--- cd ../test


2 known bugs; 0 unexpected bugs

$ cd blah/blah


$ 6g test.go
$ 6l test.6
main.main: undefined: bufio.NewReader
main.main: undefined: bufio.*Reader·ReadString
main.init: undefined: bufio.Init·
MHeapMap_Preallocate: type.*bufio.Reader: not defined

> If that fails I'd be interested to see the output of
>
> 6nm $GOROOT/pkg/linux_amd64/bufio.a | grep NewReader

This is:

$ 6nm $GOROOT/pkg/linux_amd64/bufio.a | grep NewReader
_go_.6: T "".NewReader
_go_.6: T "".NewReaderSize
_go_.6: D go.string."bufio: NewReader: "
_go_.6: D string."bufio: NewReader: "


Any hint?
Thanks for your help,

M;

Miguel Pignatelli

unread,
Feb 2, 2010, 12:44:52 PM2/2/10
to pignate...@gva.es, r...@golang.org, golang-nuts
A fresh installation (download + install) didn't solve this either.

Should I report an issue?
I don't know where to touch,

Maybe installing a previous version could spot some light?
Does anybody know how to "downgrade"?

Any help would be appreciated,

M;

Russ Cox

unread,
Feb 2, 2010, 1:17:01 PM2/2/10
to pignate...@gva.es, golang-nuts
2010/2/2 Miguel Pignatelli <miguel.p...@uv.es>

A fresh installation (download + install) didn't solve this either.

Should I report an issue?
I don't know where to touch,

Maybe installing a previous version could spot some light?
Does anybody know how to "downgrade"?

Any help would be appreciated,

What do these commands print?

hg identify
ls -l $(which 6g)
ls -l $(which 6l)
ls -l $GOROOT/pkg/linux_amd64/bufio.a

bufio.a looks good which suggests maybe somehow
you're running an older version of the linker.

Russ

Miguel Pignatelli

unread,
Feb 2, 2010, 1:23:59 PM2/2/10
to r...@golang.org, golang-nuts
Hi,

> bufio.a looks good which suggests maybe somehow
> you're running an older version of the linker.

Don't think so, I made a fresh install and both 6g and 6l points to the
new installed versions:

> hg identify
0a2770db06ef tip

> ls -l $(which 6g)
-rwxr-xr-x 1 pignatelli pignatelli 1136685 2010-02-02 17:59
/home/pignatelli/go2/bin/6g

> ls -l $(which 6l)
-rwxr-xr-x 1 pignatelli pignatelli 481962 2010-02-02 17:59
/home/pignatelli/go2/bin/6l

> ls -l $GOROOT/pkg/linux_amd64/bufio.a
-rw-r--r-- 1 pignatelli pignatelli 116972 2010-02-02 18:00
/home/pignatelli/go2/pkg/linux_amd64/bufio.a

Any hint?
I can't spot any reason for that,

Thanks,

M;


Russ Cox wrote:
> 2010/2/2 Miguel Pignatelli <miguel.p...@uv.es
> <mailto:miguel.p...@uv.es>>

Reply all
Reply to author
Forward
0 new messages