You are not logged in.
While being in my home directory, I executed:
sudo pacman -S --needed git base-devel
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
And got this output:
==> Making package: yay 11.3.1-1 (Thu 05 Jan 2023 02:55:55 PM CET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Downloading yay-11.3.1.tar.gz...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 390k 100 390k 0 0 450k 0 --:--:-- --:--:-- --:--:-- 3953k
==> Validating source files with sha256sums...
yay-11.3.1.tar.gz ... Passed
==> Extracting sources...
-> Extracting yay-11.3.1.tar.gz with bsdtar
==> Starting build()...
go build -trimpath -mod=readonly -modcacherw pacman-git -ldflags '-X "main.yayVersion=11.3.1" -X "main.localePath=/usr/share/locale/" -linkmode=external' -buildmode=pie -o yay
panic: path "-X \"main.yayVersion=11.3.1\" -X \"main.localePath=/usr/share/locale/\" -linkmode=external" not in error "invalid import path \"-X \\\"main.yayVersion=11.3.1\\\" -X \\\"main.localePath=/usr/share/locale/\\\" -linkmode=external\"" [recovered]
panic: path "-X \"main.yayVersion=11.3.1\" -X \"main.localePath=/usr/share/locale/\" -linkmode=external" not in error "invalid import path \"-X \\\"main.yayVersion=11.3.1\\\" -X \\\"main.localePath=/usr/share/locale/\\\" -linkmode=external\""
goroutine 1 [running]:
cmd/go/internal/load.(*preload).flush(0xc0001c77c0)
/usr/lib/go/src/cmd/go/internal/load/pkg.go:1086 +0x78
panic({0x97d480, 0xc0001c7990})
/usr/lib/go/src/runtime/panic.go:884 +0x212
cmd/go/internal/load.ImportErrorf({0x7ffe2773333f, 0x56}, {0xa2f4ae?, 0x56?}, {0xc000139630?, 0xc000139b18?, 0x0?})
/usr/lib/go/src/cmd/go/internal/load/pkg.go:523 +0x199
cmd/go/internal/load.(*Package).load(0xc000028680, {0xb2e7d0, 0xc00002a190}, {0x0, 0x0, 0x0, 0x1, 0x0, 0x0}, {0x7ffe2773333f, ...}, ...)
/usr/lib/go/src/cmd/go/internal/load/pkg.go:1894 +0x147d
cmd/go/internal/load.loadImport({0xb2e7d0, 0xc00002a190}, {0x0, 0x0, 0x0, 0x1, 0x0, 0x0}, 0xc0001c77c0, {0x7ffe2773333f, ...}, ...)
/usr/lib/go/src/cmd/go/internal/load/pkg.go:744 +0x570
cmd/go/internal/load.PackagesAndErrors({0xb2e7d0?, 0xc00002a190?}, {0x0, 0x0, 0x0, 0x1, 0x0, 0x0}, {0xc000024100, 0x6, ...})
/usr/lib/go/src/cmd/go/internal/load/pkg.go:2794 +0x87b
cmd/go/internal/work.runBuild({0xb2e7d0, 0xc00002a190}, 0xc000030528?, {0xc000024100, 0x6, 0x6})
/usr/lib/go/src/cmd/go/internal/work/build.go:408 +0xba
main.invoke(0xe298e0, {0xc0000240c0, 0xa, 0xa})
/usr/lib/go/src/cmd/go/main.go:225 +0x34e
main.main()
/usr/lib/go/src/cmd/go/main.go:179 +0x7d1
make: *** [Makefile:113: yay] Error 2
==> ERROR: A failure occurred in build().
Aborting...
How can I fix it?
Last edited by bokip (2023-01-06 18:50:55)
Offline
This looks like an issue in the upstream source. The maintainer has requested that all issues with yay itself go to the github issue tracker:
https://github.com/Jguer/yay/issues
EDIT: scratch that - I'm not able to replicate the problem here. I did not let it run to completion, but the build went by that step smoothly. Perhaps there is some go-specific configuration interfering: my build does not include the "pacman-git" parameter that is shown in your go command that fails. Though the error message from 'go' seems quite unclear - it looks like it's actually saying there was an error in reporting the error!
Last edited by Trilby (2023-01-05 14:08:37)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
FWIW, I could not reproduce the issue either, but yay has just been updated 15 minutes ago, so try again?
Offline
I have got the same problem on fresh install arch
==> Starting build()...
go build -trimpath -mod=readonly -modcacherw pacman-git -ldflags '-X "main.yayVersion=11.3.1" -X "main.localePath=/usr/share/locale/" -linkmode=external' -buildmode=pie -o yay
panic: path "-X \"main.yayVersion=11.3.1\" -X \"main.localePath=/usr/share/locale/\" -linkmode=external" not in error "invalid import path \"-X \\\"main.yayVersion=11.3.1\\\" -X \\\"main.localePath=/usr/share/locale/\\\" -linkmode=external\"" [recovered]
panic: path "-X \"main.yayVersion=11.3.1\" -X \"main.localePath=/usr/share/locale/\" -linkmode=external" not in error "invalid import path \"-X \\\"main.yayVersion=11.3.1\\\" -X \\\"main.localePath=/usr/share/locale/\\\" -linkmode=external\""
goroutine 1 [running]:
cmd/go/internal/load.(*preload).flush(0xc00020ca20)
/usr/lib/go/src/cmd/go/internal/load/pkg.go:1086 +0x78
panic({0x97d480, 0xc00009ce00})
/usr/lib/go/src/runtime/panic.go:884 +0x212
cmd/go/internal/load.ImportErrorf({0x7fffbd002736, 0x56}, {0xa2f4ae?, 0x56?}, {0xc000135630?, 0xc000135b18?, 0x0?})
/usr/lib/go/src/cmd/go/internal/load/pkg.go:523 +0x199
cmd/go/internal/load.(*Package).load(0xc0000dab00, {0xb2e7d0, 0xc00002a110}, {0x0, 0x0, 0x0, 0x1, 0x0, 0x0}, {0x7fffbd002736, ...}, ...)
/usr/lib/go/src/cmd/go/internal/load/pkg.go:1894 +0x147d
cmd/go/internal/load.loadImport({0xb2e7d0, 0xc00002a110}, {0x0, 0x0, 0x0, 0x1, 0x0, 0x0}, 0xc00020ca20, {0x7fffbd002736, ...}, ...)
/usr/lib/go/src/cmd/go/internal/load/pkg.go:744 +0x570
cmd/go/internal/load.PackagesAndErrors({0xb2e7d0?, 0xc00002a110?}, {0x0, 0x0, 0x0, 0x1, 0x0, 0x0}, {0xc000024100, 0x6, ...})
/usr/lib/go/src/cmd/go/internal/load/pkg.go:2794 +0x87b
cmd/go/internal/work.runBuild({0xb2e7d0, 0xc00002a110}, 0xc000028438?, {0xc000024100, 0x6, 0x6})
/usr/lib/go/src/cmd/go/internal/work/build.go:408 +0xba
main.invoke(0xe298e0, {0xc0000240c0, 0xa, 0xa})
/usr/lib/go/src/cmd/go/main.go:225 +0x34e
main.main()
/usr/lib/go/src/cmd/go/main.go:179 +0x7d1
make: *** [Makefile:113: yay] Error 2
==> ERROR: A failure occurred in build().
Aborting...
Last edited by Gogoch (2023-01-05 17:03:46)
Offline
my build does not include the "pacman-git" parameter that is shown in your go command that fails
So if you get that, I'd check
pacman -Qs pacman
Also
echo $SHELL
There seems to be some over-escaping in the error string (but that could be a red herring)
Offline
https://github.com/Jguer/yay/issues/1886
https://github.com/Jguer/yay/commit/c40 … fa99d872c8
Possibly the update to make changed piping?
Offline
Yeah, it worked after i re-cloned the repo.
Offline