On 05/04/12 18:47, Joel Sing wrote:
On Saturday 05 May 2012, Tobias Sarnowski wrote:
On 05/04/12 15:11, Joel Sing wrote:
The following diff update Go to version 1.0.1. This release pulls several
bug fixes up to the stable branch.

ok?
Basically works for me on openbsd-current/amd64 with one exception:
Thanks.

Using cgo to use system calls does not work. I attached an example
package which works perfectly on linux/amd64 ("go test") but fails on my
openbsd machines. The compiled package (.a file) is empty and does not
contain the function symbols. Seems that the cgo compiler does not get
triggered correctly.

This is not a specific bug of your patch now (its broken in the original
mercurial repository too) but maybe you have a clue where to look at.
cgo is not currently supported/enabled on OpenBSD. Now that rthreads is
enabled we are part of the way to being able to enable it. However, we are
still missing support for PT_TLS program headers, which means that the TLS
memory is eventually corrupted.

If you want to play you can use this change, however expect to see random
segfaults (mostly when using go routines):

http://codereview.appspot.com/5819050

Maybe its the same problem why the syscall[1] package is not implemented
on openbsd?
What do you mean by "not implemented"?

The syscall package is definately implemented for OpenBSB, since it is an
essential part of the Go runtime packages:

$ cat syscall.go
package main

import (
         "fmt"
         "syscall"
)

func main() {
         fmt.Println(syscall.Sysctl("kern.version"))
}

$ go run syscall.go
OpenBSD 5.1-current (GENERIC.MP) #0: Tue Mar 27 20:25:57 EST 2012
     [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
OK, using your port this works great thank you!

[1] http://golang.org/pkg/syscall/

Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/go/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- Makefile    15 Apr 2012 13:37:27 -0000      1.2
+++ Makefile    4 May 2012 12:50:14 -0000
@@ -4,10 +4,9 @@ ONLY_FOR_ARCHS =       amd64 i386

   COMMENT =            Go programming language

-VERSION =              1
-REVISION =             0
+VERSION =              1.0.1
   EXTRACT_SUFX =               .src.tar.gz
-DISTNAME =             go.go${VERSION}
+DISTNAME =             go${VERSION}
   PKGNAME =            go-${VERSION}
   CATEGORIES =         lang

@@ -61,6 +60,8 @@ do-configure:

   do-build:
        @cd ${WRKSRC}&&   \
+               GOROOT=${WRKDIST} \
+               GOBIN=${WRKDIST}/bin \
                GOROOT_FINAL=${GOROOT} ./make.bash --no-banner

   do-regress:
Index: distinfo
===================================================================
RCS file: /cvs/ports/lang/go/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 distinfo
--- distinfo    31 Mar 2012 12:37:16 -0000      1.1.1.1
+++ distinfo    4 May 2012 12:50:14 -0000
@@ -1,5 +1,5 @@
-MD5 (go.go1.src.tar.gz) = eYvPwjm/mC1xlWMMwLQUaw==
-RMD160 (go.go1.src.tar.gz) = Rr015SaZ2zNWmPPUQFShJQRQy4U=
-SHA1 (go.go1.src.tar.gz) = YCNiPQg9sZgJZTNbisT6i0KPpIQ=
-SHA256 (go.go1.src.tar.gz) =
RO1cFmVNAuzZGtO9jlVkG4FVYcTsKATSl1PbvO+6dt4= -SIZE (go.go1.src.tar.gz) =
9637785
+MD5 (go1.0.1.src.tar.gz) = NM1dWSYklvWamIROlMi0tw==
+RMD160 (go1.0.1.src.tar.gz) = Ti2OM1GbL9NWKkwGdi8C7lAU+mY=
+SHA1 (go1.0.1.src.tar.gz) = /IptZyX38r98lGhcX9CIDJt/Z/Y=
+SHA256 (go1.0.1.src.tar.gz) =
Kc26e8kJ33CR2B9SBJ3gI1ArWzNRzSBglPLC2ZYcAxU= +SIZE (go1.0.1.src.tar.gz) =
9617092
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/lang/go/pkg/PLIST,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST
--- pkg/PLIST   15 Apr 2012 13:19:15 -0000      1.2
+++ pkg/PLIST   4 May 2012 12:50:15 -0000
@@ -628,12 +628,6 @@ go/src/cmd/dist/buf.c
   go/src/cmd/dist/build.c
   go/src/cmd/dist/buildgc.c
   go/src/cmd/dist/buildruntime.c
-go/src/cmd/dist/dist.dSYM/
-go/src/cmd/dist/dist.dSYM/Contents/
-go/src/cmd/dist/dist.dSYM/Contents/Info.plist
-go/src/cmd/dist/dist.dSYM/Contents/Resources/
-go/src/cmd/dist/dist.dSYM/Contents/Resources/DWARF/
-go/src/cmd/dist/dist.dSYM/Contents/Resources/DWARF/dist
   go/src/cmd/dist/goc2c.c
   go/src/cmd/dist/main.c
   go/src/cmd/dist/unix.c
@@ -1882,6 +1876,8 @@ go/src/pkg/mime/multipart/formdata.go
   go/src/pkg/mime/multipart/formdata_test.go
   go/src/pkg/mime/multipart/multipart.go
   go/src/pkg/mime/multipart/multipart_test.go
+go/src/pkg/mime/multipart/testdata/
+go/src/pkg/mime/multipart/testdata/nested-mime
   go/src/pkg/mime/multipart/writer.go
   go/src/pkg/mime/multipart/writer_test.go
   go/src/pkg/mime/test.types



Reply via email to