Skip to content

chore: Use -tags 'netgo' in bulding process to avoid SIGSEGV because of the different version of glibc in dfferent Linux distros#616

Merged
cfc4n merged 2 commits into
gojue:masterfrom
Zheaoli:manjusaka/fix-604
Sep 2, 2024
Merged

chore: Use -tags 'netgo' in bulding process to avoid SIGSEGV because of the different version of glibc in dfferent Linux distros#616
cfc4n merged 2 commits into
gojue:masterfrom
Zheaoli:manjusaka/fix-604

Conversation

@Zheaoli
Copy link
Copy Markdown
Contributor

@Zheaoli Zheaoli commented Sep 2, 2024

Fix #604

Signed-off-by: Manjusaka me@manjusaka.me

…e of the different version of glibc in dfferent Linux distros

Signed-off-by: Manjusaka <me@manjusaka.me>
Comment thread functions.mk Outdated
CGO_LDFLAGS='-O2 -g -L$(CURDIR)/lib/libpcap/ -lpcap -static' \
GOOS=linux GOARCH=$(GOARCH) CC=$(CMD_CC_PREFIX)$(CMD_CC) \
$(CMD_GO) build -tags $(TARGET_TAG) -ldflags "-w -s -X 'github.com/gojue/ecapture/cli/cmd.GitVersion=$(TARGET_TAG)_$(GOARCH):$(VERSION_NUM):$(VERSION_FLAG)' -linkmode=external -extldflags -static " -o $(OUT_BIN)
$(CMD_GO) build -tags '$(TARGET_TAG) netgo' -ldflags "-w -s -X 'github.com/gojue/ecapture/cli/cmd.GitVersion=$(TARGET_TAG)_$(GOARCH):$(VERSION_NUM):$(VERSION_FLAG)' -linkmode=external -extldflags -static " -o $(OUT_BIN)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the new version of Golang, should multiple tags be separated by commas?

go help build

-tags tag,list
		a comma-separated list of additional build tags to consider satisfied
		during the build. For more information about build tags, see
		'go help buildconstraint'. (Earlier versions of Go used a
		space-separated list, and that form is deprecated but still recognized.)

@cfc4n cfc4n self-requested a review September 2, 2024 14:23
Copy link
Copy Markdown
Member

@cfc4n cfc4n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tags is a comma-separated list.

Signed-off-by: Manjusaka <me@manjusaka.me>
@Zheaoli
Copy link
Copy Markdown
Contributor Author

Zheaoli commented Sep 2, 2024

Fixed, comma should be better

@Zheaoli Zheaoli requested a review from cfc4n September 2, 2024 14:35
Copy link
Copy Markdown
Member

@cfc4n cfc4n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

@cfc4n cfc4n added the fix bug fix PR label Sep 2, 2024
@cfc4n cfc4n merged commit 256abbc into gojue:master Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix bug fix PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

based arch linux dist running ecapture crashed: segmentation violation

2 participants