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

An unset GOPATH breaks peerswapd binary installation #141

Open
grubles opened this issue Oct 9, 2022 · 2 comments
Open

An unset GOPATH breaks peerswapd binary installation #141

grubles opened this issue Oct 9, 2022 · 2 comments

Comments

@grubles
Copy link
Collaborator

grubles commented Oct 9, 2022

It seems GOPATH is not set when installing go via a distro's package manager (at least on Ubuntu). When building peerswapd, there is an attempt to install the binary to the GOPATH but it seems to silently fail if GOPATH is not set. The binary is also not placed in out/, so I'm not sure where it ends up now.

user@armbox:~/builds/peerswap$ echo $GOPATH

user@armbox:~/builds/peerswap$ make lnd-release
# PeerSwap LND builds
rm -f out/peerswapd
rm -f out/pscli
go install -ldflags "-X main.GitCommit=c99c266c64ee8c353ce6d65fc804d54d5c5e376b" ./cmd/peerswaplnd/peerswapd
go install -ldflags "-X main.GitCommit=c99c266c64ee8c353ce6d65fc804d54d5c5e376b" ./cmd/peerswaplnd/pscli
user@armbox:~/builds/peerswap$ whereis peerswapd
peerswapd:
user@armbox:~/builds/peerswap$ ls out/
user@armbox:~/builds/peerswap$ 
@wtogami
Copy link
Contributor

wtogami commented Oct 9, 2022

I don't know golang conventions but IMO "build" and "install" should really be separate steps.

@raucao
Copy link

raucao commented Dec 25, 2022

For me it ended up in /root/go/bin/ when building as root user for example (with no GOPATH set). I think it should go to ./out in that case.

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