gavv / webrtc-cli

WebRTC command-line peer.
MIT License
225 stars 24 forks source link

Compile/install issue #5

Closed jcrystal closed 4 years ago

jcrystal commented 4 years ago

Hello gavv,

Trying to build this on Debian 9, per the instructions.

Attempt to make yields this error: $ make go build -mod=vendor flag provided but not defined: -mod

And if I try to build it with go get, I get this: $ go get -v github.com/gavv/webrtc-cli package math/bits: unrecognized import path "math/bits" (import path does not begin with hostname)

Thoughts? Thanks! Would love this to work!

gavv commented 4 years ago

Could you post output of go version?

jcrystal commented 4 years ago

go version go1.7.4 linux/amd64, which seems old.

Not Go-fluent, but this is what happens when I installed:

$ sudo add-apt-repository ppa:longsleep/golang-backports
Golang 1.8, 1.9, 1.10, 1.11, 1.12, 1.13 and 1.14 PPA for Ubuntu
More info: https://launchpad.net/~longsleep/+archive/ubuntu/golang-backports
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keybox '/tmp/tmp5gbonr6g/pubring.gpg' created
gpg: failed to start the dirmngr '/usr/bin/dirmngr': No such file or directory
gpg: connecting dirmngr at '/tmp/tmp5gbonr6g/S.dirmngr' failed: No such file or directory
gpg: keyserver receive failed: No dirmngr

...related?

gavv commented 4 years ago

Yes, your Go is too old, at least 1.12 is needed.

Not Go-fluent, but this is what happens when I installed:

Have no idea, but quick googling gave this: https://blog.sleeplessbeastie.eu/2017/11/02/how-to-fix-missing-dirmngr/

gavv commented 4 years ago

You can also build it using docker:

docker run -ti --rm -v `pwd`:`pwd` -w `pwd` golang:1.12 sh -c 'apt update -y && apt install -y gcc make pkg-config libopus-dev libopusfile-dev libpulse-dev && go build .'
jcrystal commented 4 years ago

Brilliant. Thank you! All good to go. Ended up installing Go from the binary rather than package manager.

gavv commented 4 years ago

Great!