blevesearch / bleve

A modern text/numeric/geo-spatial/vector indexing library for go
Apache License 2.0
10.02k stars 680 forks source link

Unable to install #1437

Open mauidude opened 4 years ago

mauidude commented 4 years ago

Trying to run go get on a project with go modules and I keep getting this error from gopherjs:

$ go get github.com/blevesearch/bleve
go: github.com/blevesearch/bleve upgrade => v1.0.9
go get: github.com/blevesearch/bleve@v1.0.9 requires
        github.com/RoaringBitmap/roaring@v0.4.21 requires
        github.com/gopherjs/gopherjs@v0.0.0-20190910122728-9d188e94fb99/go.mod: verifying module: github.com/gopherjs/gopherjs@v0.0.0-20190910122728-9d188e94fb99/go.mod: malformed record data

Here's the output of my go env:

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/foo/Library/Caches/go-build"
GOENV="/Users/foo/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/foo/workspace/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.14.6/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.14.6/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/foo/workspace/geodb/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/b6/_lh00d755j1bk699kvs79vbm0000gn/T/go-build368027566=/tmp/go-build -gno-record-gcc-switches -fno-common"
mschoch commented 4 years ago

I'm not sure what to suggest, I tried creating a simple sample program using bleve and it works fine:

$ mkdir test
$ cd test
... create main.go...
$ cat main.go
package main

import (
    "fmt"

    "github.com/blevesearch/bleve"
)

func main() {
    m := bleve.NewIndexMapping()
    fmt.Println(m)
}

$ go mod init github.com/mschoch/test
go: creating new go.mod: module github.com/mschoch/test
$ go build
go: finding module for package github.com/blevesearch/bleve
go: found github.com/blevesearch/bleve in github.com/blevesearch/bleve v1.0.9
$ cat go.mod
module github.com/mschoch/test

go 1.14

require github.com/blevesearch/bleve v1.0.9

I see you were running go get so I tried a variant with that as well:

$ rm go.mod                          
$ go mod init github.com/mschoch/test
go: creating new go.mod: module github.com/mschoch/test
$ go get github.com/blevesearch/bleve
go: github.com/blevesearch/bleve upgrade => v1.0.9

Go modules are still mostly a mystery to me, so I don't have anything else to suggest.