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

Update Compilation Wiki #722

Open
XSAM opened this issue Dec 26, 2019 · 1 comment
Open

Update Compilation Wiki #722

XSAM opened this issue Dec 26, 2019 · 1 comment

Comments

@XSAM
Copy link

@XSAM XSAM commented Dec 26, 2019

The go build command in the Compilation Wiki will throw complaints.

#Compile from source
cd $HOME/gocode/src/github.com/buger/gor
go build LDFLAGS = -ldflags "-extldflags "-static""

$ go build LDFLAGS = -ldflags "-extldflags \"-static\""
can't load package: package LDFLAGS: malformed module path "LDFLAGS": missing dot in first path element
can't load package: package =: malformed module path "=": invalid char '='
can't load package: package -ldflags: malformed module path "-ldflags": leading dash
can't load package: package -extldflags "-static": malformed module path "-extldflags \"-static\"": leading dash

change the command to this will work fine:

go build -ldflags "-extldflags \"-static\""
@porjo
Copy link

@porjo porjo commented Jan 14, 2020

The instructions are old (2016!!) and need updating.

I've been able to compile and use goreplay with dynamic linking rather than static. I use Fedora Linux 31, and these steps worked for me:

$ dnf install golang libpcap libpcap-devel
$ go get github.com/buger/goreplay

That's it! Executable binary is available here: ~/go/bin/goreplay . I can use that executable on any machine that has the libpcap library installed - no static linking required.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.