Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install; error with go-redis #26

Open
wolfy1339 opened this issue Jun 25, 2020 · 7 comments
Open

Unable to install; error with go-redis #26

wolfy1339 opened this issue Jun 25, 2020 · 7 comments

Comments

@wolfy1339
Copy link

wolfy1339 commented Jun 25, 2020

Hapens with Go 1.14 (can build it manually) and 1.10

# go get github.com/alice-lg/birdwatcher
# github.com/alice-lg/birdwatcher/bird
go/src/github.com/alice-lg/birdwatcher/bird/redis_cache.go:25:23: not enough arguments in call to client.cmdable.Ping
	have ()
	want (context.Context)
go/src/github.com/alice-lg/birdwatcher/bird/redis_cache.go:39:30: not enough arguments in call to self.client.cmdable.Get
	have (string)
	want (context.Context, string)
go/src/github.com/alice-lg/birdwatcher/bird/redis_cache.go:71:27: not enough arguments in call to self.client.cmdable.Set
	have (string, []byte, time.Duration)
	want (context.Context, string, interface {}, time.Duration)
@wolfy1339
Copy link
Author

There's an issue about this upstream in the module: redis/go-redis#1333

@wolfy1339
Copy link
Author

This also happens when trying to manually build it with Go 1.10

cd ~/go/src/github.com/alice-lg/birdwatcher && make linux
GO111MODULE=on GOARCH=amd64 GOOS=linux go build -o birdwatcher-linux-amd64
# github.com/alice-lg/birdwatcher/bird
bird/redis_cache.go:25:23: not enough arguments in call to client.cmdable.Ping
	have ()
	want (context.Context)
bird/redis_cache.go:39:30: not enough arguments in call to self.client.cmdable.Get
	have (string)
	want (context.Context, string)
bird/redis_cache.go:71:27: not enough arguments in call to self.client.cmdable.Set
	have (string, []byte, time.Duration)
	want (context.Context, string, interface {}, time.Duration)
Makefile:37: recipe for target 'linux' failed
make: *** [linux] Error 2

@annikahannig
Copy link
Member

Hey! Thanks for the issue report!
I was on vacation - let's have a look :)

@annikahannig
Copy link
Member

annikahannig commented Jun 30, 2020

So, golang 1.10 does not work. I just tried building it using a docker golang:1.10 image.
However the issue on my side is not even the redis client library but with:

root@81d6122402a2:/go/src/github.com/alice-lg/birdwatcher# go build
# golang.org/x/exp/rand                                                                                                
/go/src/golang.org/x/exp/rand/rng.go:63:19: undefined: bits.Add64
/go/src/golang.org/x/exp/rand/rng.go:64:16: undefined: bits.Add64
/go/src/golang.org/x/exp/rand/rng.go:68:12: undefined: bits.Mul64

@annikahannig
Copy link
Member

Same with 1.11 though... Interesting.

@linuxgemini
Copy link

linuxgemini commented Jul 1, 2020

You need to use the command with GO111MODULE=on. Nowhere except build files mention it:

GO111MODULE=on GOARCH=$(ARCH) GOOS=linux go build -o $(PROG)-linux-$(ARCH)

So your command would be: GO111MODULE=on go get github.com/alice-lg/birdwatcher.

As the variable name suggests, this wildness starts at golang 1.11; anything before won't build. And starting at 1.11 you need to have this. (as go-redis requires it)

Adding: I have built birdwatcher multiple times without issues as of writing.

@wolfy1339
Copy link
Author

For reference, the go 1.10 install is the package provided in Ubuntu 18.04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants