Jguer / yay

Yet another Yogurt - An AUR Helper written in Go
GNU General Public License v3.0
11.17k stars 361 forks source link

Update to yay-10.0.2 fails #1317

Closed JensDA closed 4 years ago

JensDA commented 4 years ago

Affected Version

yay-10.0.2

Issue

Using yay to update to this version fails.

Output

==> Starting build()...
go build -v -trimpath -mod=readonly -modcacherw -ldflags '-s -w -extldflags "-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now" -X "main.yayVersion=10.0.2" -X "main.localePath=/usr/share/locale/"' -buildmode=pie -o yay
go: downloading github.com/leonelquinteros/gotext v1.4.0
go: downloading github.com/Jguer/go-alpm v0.0.0-20200405152916-a3feea4322e9
go: downloading github.com/pkg/errors v0.9.1
go: downloading github.com/Morganamilo/go-pacmanconf v0.0.0-20180910220353-9c5265e1b14f
go: downloading github.com/Morganamilo/go-srcinfo v1.0.0
go: downloading golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9
go: downloading github.com/mikkeloscar/aur v0.0.0-20200113170522-1cb4e2949656
go: downloading golang.org/x/sys v0.0.0-20200610111108-226ff32320da
github.com/Jguer/go-alpm
net
# net
cannot load DWARF output from $WORK/b083//_cgo_.o: decoding dwarf section info at offset 0x0: too short
# github.com/Jguer/go-alpm
cannot load DWARF output from $WORK/b041//_cgo_.o: decoding dwarf section info at offset 0x0: too short
make: *** [Makefile:134: yay] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
error making: %!s(func() string=0x563055714830)
grandchild commented 4 years ago

The update worked for me. Can you show your gcc or clang version? The recent update to GCC 10 had something with dwarf, so this might be related.

JensDA commented 4 years ago
% LC_ALL=C gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++,d --with-isl --with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-install-libiberty --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-libunwind-exceptions --disable-werror gdc_include_dir=/usr/include/dlang/gdc
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.1.0 (GCC) 
% clang -v                                                                                                                                                                                                                                
clang version 10.0.0 
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-pc-linux-gnu/10.1.0
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-pc-linux-gnu/8.4.0
Found candidate GCC installation: /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/10.1.0
Found candidate GCC installation: /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.4.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-pc-linux-gnu/8.4.0
Found candidate GCC installation: /usr/lib64/gcc/x86_64-pc-linux-gnu/10.1.0
Found candidate GCC installation: /usr/lib64/gcc/x86_64-pc-linux-gnu/8.4.0
Selected GCC installation: /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/10.1.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64
Found CUDA installation: /opt/cuda, version 10.1
grandchild commented 4 years ago

Okay, that's the same. Have you tried building in a clean chroot? I just did and it also built just fine. Maybe something with your Go installation, or your GCC setup is broken?

If you do get it to build in the chroot, it would be nice to know what the difference between that and your system setup is.

JensDA commented 4 years ago

I've found the issue. It was the CFLAG/CXXFLAG -flto I've been using. Without it, everything installs successfully. I'm used to some packages not being able to handle it (e.g. ffmpeg-full-git, imagemagick-full), but the error messages there are quite different. Thank you for your assistance.