Go 1.6 Beta 2 is released

已查看 3,443 次
跳至第一个未读帖子

Chris Broadfoot

未读,
2016年1月13日 20:19:122016/1/13
收件人 golang-nuts
Hello Go nuts,

We have just released go1.6beta2, a beta version of Go 1.6.
It is cut from the master branch at the revision tagged go1.6beta1.

Please help us by testing your Go programs with the release, and report any problems using the issue tracker:

You can download binary and source distributions from the usual place:

To find out what has changed in Go 1.6, read the draft release notes:

Documentation for Go 1.6 is available at:

Our goal is to release the final version of Go 1.6 early February.

Cheers
Chris

kane...@gmail.com

未读,
2016年1月13日 23:39:282016/1/13
收件人 golang-nuts

On Wednesday, January 13, 2016 at 5:19:12 PM UTC-8, Chris Broadfoot wrote:
Hello Go nuts,

We have just released go1.6beta2, a beta version of Go 1.6.
It is cut from the master branch at the revision tagged go1.6beta1.

I think you meant at the revision tagged go1.6beta2 ?

kimh...@gmail.com

未读,
2016年1月13日 23:52:072016/1/13
收件人 golang-nuts

which version of git does this depend on for downloading/deploying packages ?

cheers,

Kim

Andrew Gerrand

未读,
2016年1月14日 17:57:552016/1/14
收件人 kane...@gmail.com、golang-nuts

On 14 January 2016 at 12:21, <kane...@gmail.com> wrote:

I think you meant at the revision tagged go1.6beta2 ?

Yes, that's correct

Parker Evans

未读,
2016年1月17日 22:19:482016/1/17
收件人 golang-nuts
I saw in the new Beta 2 release notes that there is now support in the -buildmode=shared options for linux/arm (which is awesome by the way).  However, I am testing this a bit and I can get it working when building natively on a linux/arm platform, but not when I cross compile from my mac.  When I try to build the standard library as shared for linux/arm, I keep seeing either:

$ GOOS=linux GOARCH=arm GOARM=7 go install -buildmode=shared -linkshared std

load runtime/cgo: package runtime/cgo: C source files not allowed when not using cgo or SWIG: gcc_fatalf.c gcc_libinit.c gcc_linux_arm.c gcc_setenv.c gcc_util.c


Or if I enable CGO (which I didn't think I would have to):

$ GOOS=linux GOARCH=arm GOARM=7 CGO_ENABLED=1 go install -buildmode=shared -linkshared std

# runtime/cgo

clang: error: argument unused during compilation: '-mno-thumb'


I am probably just doing something wrong, but I do wanted to check.  Is cross compilation to linux/arm supported in go1.6 with -buildmode=shared??


Thanks,

Parker

Michael Hudson-Doyle

未读,
2016年1月17日 22:21:582016/1/17
收件人 Parker Evans、golang-nuts
Yes, you need to enable cgo, and also you to point CC to a
cross-toolchain targeting linux/arm (-buildmode=shared support depends
on external linking).

Cheers,
mwh
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.

bruno.c...@gmail.com

未读,
2016年2月19日 09:40:152016/2/19
收件人 golang-nuts

On Monday, January 18, 2016 at 11:19:48 AM UTC+8, Parker Evans wrote:
$ GOOS=linux GOARCH=arm GOARM=7 CGO_ENABLED=1 go install -buildmode=shared -linkshared std

# runtime/cgo

clang: error: argument unused during compilation: '-mno-thumb'


Go 1.6, latest OSX, latest Xcode:

$ CGO_ENABLED=1 GOARM=7 GOARCH=arm GOOS=darwin go build -v -x
[...]
mkdir -p $WORK/runtime/cgo/_obj/
mkdir -p $WORK/runtime/
cd /usr/local/Cellar/go/1.6/libexec/src/runtime/cgo
CGO_LDFLAGS="-g" "-O2" "-framework" "CoreFoundation" /usr/local/Cellar/go/1.6/libexec/pkg/tool/darwin_amd64/cgo -objdir $WORK/runtime/cgo/_obj/ -importpath runtime/cgo -import_runtime_cgo=false -import_syscall=false -- -I $WORK/runtime/cgo/_obj/ -Wall -Werror cgo.go
# runtime/cgo
clang: error: argument unused during compilation: '-mno-thumb'
[...]

I can cross compile code that don't requires CGO.

I can't find any reference to `mno-thumb` in Go source.

How can we pass on to runtime/cgo a CFLAG to make it ignore that flag? change runtime/cgo/ itself?

Dave Cheney

未读,
2016年2月19日 09:44:392016/2/19
收件人 golang-nuts、bruno.c...@gmail.com
Cross compilation disables cgo by default. If you want to enable it with CGO_ENABLED you will need to have on your host machine a C toolchain that is capable of cross compiling to arm. From a mac, this is likely to be quite difficult.

bruno.c...@gmail.com

未读,
2016年2月19日 09:47:332016/2/19
收件人 golang-nuts、bruno.c...@gmail.com
I had been able to compile properly with Xcode:

GOARCH=arm GOARM=7 GOOS=darwin CC=$GOROOT/misc/ios/clangwrap.sh CGO_ENABLED=1 go build

I guess that GOOS=darwin isn't necessary, as it's a Mac already.
回复全部
回复作者
转发
0 个新帖子