[Question] Go mod vendoring
Author: kiefernforstCreated Sep 7, 2026Updated Sep 7, 2026
Labelsquestion
croc version
2af12a2dd5d0de20d015cbb17d9a8b4f55ccc6b4
Issue
When building croc with
export CGO_CPPFLAGS="$CPPFLAGS"
export CGO_CFLAGS="$CFLAGS"
export CGO_CXXFLAGS="$CXXFLAGS"
export CGO_LDFLAGS="$LDFLAGS"
export GOFLAGS='-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=vendor -modcacherw -buildvcs=false'
go buildit fails due to
go: inconsistent vendoring in ./croc:
github.com/cespare/xxhash/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
[..]my years-old command however works:
go build \
-o croc \
main.goWhy does go complain about the vendoring in case (1)?
Operating System
ArchLinux
Follow-up acknowledgment
- I understand that I must respond to follow-up questions within 24 hours. Otherwise, my issue may be deleted and my account may be blocked.
PS: I haven't known about https://github.com/schollz/croc/issues/1269 – I only use your great tool in LAN.
Source: schollz/croc