Skip to main content
Topic: "arch/cdefs.h: No such file or directory" when trying to install yay (Read 401 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

"arch/cdefs.h: No such file or directory" when trying to install yay

Hi everyone, new here.

I recently had issues with yay not completing installation of packages so I tried to uninstall it with pacman, then tried to install it again but keep receiving the following error:

Quote
  -> Extracting yay-12.3.4.tar.gz with bsdtar
==> Removing existing $pkgdir/ directory...
==> Starting build()...
go build -trimpath -mod=readonly -modcacherw -tags=next -ldflags '-X "main.yayVersion=12.3.4" -X "main.localePath=/usr/share/locale/" -linkmode=external' -buildmode=pie -o yay
# github.com/Jguer/go-alpm/v2
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/stdint.h:9,
                 from /usr/include/alpm.h:37,
                 from ../../../.cache/go/mod/github.com/!jguer/go-alpm/[email protected]/alpm.go:10:
/usr/local/include/stdint.h:6:10: fatal error: arch/cdefs.h: No such file or directory
    6 | #include <arch/cdefs.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:115: yay] Error 1
==> ERROR: A failure occurred in build().
    Aborting...

pacman works fine. Anyone have any ideas on how to fix this? Thank you!

 

Re: "arch/cdefs.h: No such file or directory" when trying to install yay

Reply #1
I build yay all right just now. Try again, fresh version in AUR is 12.3.5-1. Or you can try yay-bin.

Re: "arch/cdefs.h: No such file or directory" when trying to install yay

Reply #2
I build yay all right just now. Try again, fresh version in AUR is 12.3.5-1. Or you can try yay-bin.
I tried reinstalling with the new package but received the same error, but thankfully the yay-bin worked i'll try that next time. Appreciate it

Re: "arch/cdefs.h: No such file or directory" when trying to install yay

Reply #3
This line seems odd
/usr/local/include/stdint.h:6:10: fatal error: arch/cdefs.h: No such file or directory

stdint.h should be located at /usr/include/stdint.h
and it's part of a very important package glibc

What output do you get if you run
pacman -Qo /usr/local/include/stdint.c
pacman -Qo /usr/include/stdint.h

Re: "arch/cdefs.h: No such file or directory" when trying to install yay

Reply #4
This line seems odd
/usr/local/include/stdint.h:6:10: fatal error: arch/cdefs.h: No such file or directory

stdint.h should be located at /usr/include/stdint.h
and it's part of a very important package glibc

What output do you get if you run
pacman -Qo /usr/local/include/stdint.c
pacman -Qo /usr/include/stdint.h


Unfortunately I gave up later that day after trying to make some changes to some c file headers which were subsequently unable to compile, and just reinstalled the entire os (I had been planning to encrypt it anyway) so I'm unable to investigate further to see how I messed everything up.