Open ghost opened 8 years ago
sorry for the late response
I just tried this on the httpd example and it is working for me - have you tried building any of the examples in the examples directory?
this is what I put into the httpd dir =>
➜ httpd git:(sfix) ✗ tree vendor
vendor
└── bob
└── bob.go
1 directory, 1 file
➜ httpd git:(sfix) ✗ cat vendor/bob/bob.go
package bob
import (
"fmt"
)
func Yo() {
fmt.Println("yo")
}
➜ httpd git:(sfix) ✗ strings httpd.bin | grep bob.Yo
github.com/deferpanic/gorump/examples/httpd/vendor/bob.Yo
github.com/deferpanic/gorump/examples/httpd/vendor/bob.Yo
github.com/deferpanic/gorump/examples/httpd/vendor/bob.Yo
github.com/deferpanic/gorump/examples/httpd/vendor/bob.Yo
offhand I spot a few things wrong w/the compilation flags you have
1) you'll need to specify the GOOS env var to 'rumprun'
2) for right now we build these into c-archives and call from there - so that would need to be specified as well
from the httpd example you can do something like =>
CC=x86_64-rumprun-netbsd-gcc CGO_ENABLED=1 GO15VENDOREXPERIMENT=1 GOOS=rumprun ../../go/bin/go build -buildmode=c-archive -v -a -x *.go
lmk if you can build the examples as-is and then lmk if you can build w/vendoring
Hi,
Well, I get farther with these instructions (I think). Now I'm getting a different error:
import cycle not allowed
package bitbucket.org/XXX/alerts/cmd/web
imports bitbucket.org/XXX/alerts
imports bitbucket.org/XXX/isosws
imports bytes
imports errors
imports runtime
imports runtime/internal/atomic
imports runtime
Here are some sample commands:
1043)internationalsos/alerts % PATH=~/go-rump/gorump/go/bin:~/go-rump/rumprun/rumprun/bin:$PATH CC=x86_64-rumprun-netbsd-gcc CGO_ENABLED=1 GO15VENDOREXPERIMENT=1 GOOS=rumprun which go
/home/ser/go-rump/gorump/go/bin/go
1044)internationalsos/alerts % PATH=~/go-rump/gorump/go/bin:~/go-rump/rumprun/rumprun/bin:$PATH CC=x86_64-rumprun-netbsd-gcc CGO_ENABLED=1 GO15VENDOREXPERIMENT=1 GOOS=rumprun go version
go version go1.5.1 linux/amd64
so I think I'm using the right go.
were you able to get any of the examples working before diving into this one? it might be looping in something from a diff GOROOT/GOPATH
the import cycle error is def. something I exp. from time to time when I am using the wrong go build - I'd try to get one of the hello world examples working first and then dive into this one - I'd def. use the v/a/x build flags as well
GO15VENDOREXPERIMENT is enabled; I'm in the right GOPATH; there's a vendor directory. The
gorump
binary appears to either ignore the environment variable, or has broken vendor experiment code. Or, more likely, I'm doing something wrong, and would appreciate the pointer (this works with a non-go-rump go 1.5 as well as go 1.6 and 1.7).