On Tue, Jun 09, 2015 at 09:43:48AM +0200, Antoine Jacoutot wrote:
> websocketd is broken for me:
...
> cd /exopi-obj/pobj/websocketd-0.2.10/go/src/golang.org/x/net/websocket
> sh: <stdin>[4]: cd: 
> /exopi-obj/pobj/websocketd-0.2.10/go/src/golang.org/x/net/websocket - No such 
> file or directory
> /usr/local/go/pkg/tool/openbsd_amd64/6g -o 
> /exopi-obj/pobj/websocketd-0.2.10/build-amd64/golang.org/x/net/websocket.a 
> -trimpath /exopi-obj/pobj/websocketd-0.2.10/build-amd64 -p 
> golang.org/x/net/websocket -complete -D 
> _/usr/local/go/src/golang.org/x/net/websocket -I 
> /exopi-obj/pobj/websocketd-0.2.10/build-amd64 -pack ./client.go ./hybi.go 
> ./server.go ./websocket.go
> open ./client.go: No such file or directory
> mkdir -p 
> /exopi-obj/pobj/websocketd-0.2.10/go/pkg/openbsd_amd64/golang.org/x/net/
> cp /exopi-obj/pobj/websocketd-0.2.10/build-amd64/golang.org/x/net/websocket.a 
> /exopi-obj/pobj/websocketd-0.2.10/go/pkg/openbsd_amd64/golang.org/x/net/websocket.a
> cp: 
> /exopi-obj/pobj/websocketd-0.2.10/build-amd64/golang.org/x/net/websocket.a: 
> No such file or directory
> go install golang.org/x/net/websocket: open 
> /exopi-obj/pobj/websocketd-0.2.10/go/pkg/openbsd_amd64/golang.org/x/net/websocket.a:
>  permission denied
> can't load package: package golang.org/x/net/websocket:: cannot find package 
> "golang.org/x/net/websocket:" in any of:
>         /usr/local/go/src/golang.org/x/net/websocket: (from $GOROOT)
>         /exopi-obj/pobj/websocketd-0.2.10/go/src/golang.org/x/net/websocket: 
> (from $GOPATH)

Below is the quickest fix.  Ok?

I believe the problem Dmitrij was trying to solve by adding the -a
switch is that you can't repackage net/go-websocket when the package
is already installed.  Go sees the up-to-date websocket.a in GOPATH
so it skips the build altogether, and then our do-install target
fails.  The -a flag means "force rebuilding of packages that are
already up-to-date" which fixes that problem, but causes the
net/websocketd failure you saw because now its build is trying to
rebuild the Go websocket library.  :(

Index: lang/go/go.port.mk
===================================================================
RCS file: /work/cvsroot/ports/lang/go/go.port.mk,v
retrieving revision 1.2
diff -p -u -r1.2 go.port.mk
--- lang/go/go.port.mk  8 Jun 2015 09:17:04 -0000       1.2
+++ lang/go/go.port.mk  10 Jun 2015 21:37:28 -0000
@@ -21,7 +21,7 @@ MODGO_SUBDIR ?=               ${WRKDIST}
 MODGO_TYPE ?=          bin
 MODGO_WORKSPACE ?=     ${WRKDIR}/go
 MODGO_CMD ?=           unset GOPATH; export GOPATH="${MODGO_WORKSPACE}"; go
-MODGO_FLAGS +=         -a -x -work
+MODGO_FLAGS +=         -x -work
 MODGO_BUILD_CMD =      ${MODGO_CMD} install ${MODGO_FLAGS}
 MODGO_TEST_CMD =       ${MODGO_CMD} test ${MODGO_FLAGS}

Reply via email to