Open dalanmiller opened 6 years ago
See the last line of the readme:
Requires having the master branch of https://github.com/cockroachdb/cockroach checked out at $GOPATH/src/github.com/cockroachdb/cockroach, and running make in that directory.
Apologies @mjibson, as a post-posting edit, I mentioned that I had done that! š
Those identifiers should appear in a file called tokens.go. I'm not convinced make ran successfully because it would exist otherwise. Other option is to checkout https://github.com/cockroachdb/cockroach-gen at github.com/cockroachdb/cockroach which already has all of the files pregenerated.
That was it! I was getting really variable output when running make
and assumed nothing went wrong. Blew everything away and then properly ensured I had cmake
installed made everything go away.
Now I'm getting different undefined
errors in a couple files when attempting to target WASM:
$ GOOS=js GOARCH=wasm go build -o main.wasm
# github.com/cockroachdb/cockroach/pkg/util/sysutil
../../cockroachdb/cockroach/pkg/util/sysutil/sysutil.go:51:23: undefined: syscall.SIGHUP
../../cockroachdb/cockroach/pkg/util/sysutil/sysutil_unix.go:32:3: undefined: unix.Getuid
../../cockroachdb/cockroach/pkg/util/sysutil/sysutil_unix.go:32:18: undefined: unix.Geteuid
../../cockroachdb/cockroach/pkg/util/sysutil/sysutil_unix.go:32:34: undefined: unix.Getgid
../../cockroachdb/cockroach/pkg/util/sysutil/sysutil_unix.go:32:49: undefined: unix.Getegid
../../cockroachdb/cockroach/pkg/util/sysutil/sysutil_unix.go:38:9: undefined: unix.Statfs_t
../../cockroachdb/cockroach/pkg/util/sysutil/sysutil_unix.go:39:12: undefined: unix.Statfs
# github.com/cockroachdb/cockroach/vendor/github.com/lib/pq
../../cockroachdb/cockroach/vendor/github.com/lib/pq/conn.go:321:13: undefined: userCurrent
Ah yeah. WASM isn't going to work because cockroach uses some unix-only stuff that's only been added for windows. I think I fixed all of them once and the output was still like a 50MB wasm file which is way too huge for any browser or serverless platform to accept.
I've definitely ran
make
in the$GOPATH/src/github.com/cockroachdb/cockroach
dir, but still seem to be getting this undefined errors.