


























/home/simona/.cache/yay/lefthook/PKGBUILD: riga 15: cd: lefthook-1.10.0: File o directory non esistente
Thanks for the links! Applied build command from the current Go package guidelines.
Lefthook builds started failing for me recently. Running makepkg gives the following:
flag provided but not defined: -flto
usage: link [options] main.o
I was able to fix this with the following diff
diff --git a/PKGBUILD b/PKGBUILD
index 2e36120..6b1684b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -13,11 +13,14 @@ sha256sums=('5fbd046e2ac1c6b9b2a966ad6d174827f36e0f1dd82a20b609cb8c23a0d81632')
build() {
cd "$pkgname-$pkgver"
- go build \
- -gcflags "all=-trimpath=${PWD}" \
- -asmflags "all=-trimpath=${PWD}" \
- -ldflags "-extldflags ${LDFLAGS}" \
- .
+
+ 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=readonly -modcacherw"
+
+ go build -o .
}
Based on the Arch Wiki's Go Package Guidelines. Seems some other packages have occasionally had similar errors and done similar things to resolve:
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。
Thank you for reporting! The issues must be fixed with 1.10.0-3 revision.