You are not logged in.

#1 2022-07-16 11:54:16

emplooia
Member
Registered: 2022-07-16
Posts: 7

Makepkg can't build a package due to header problems (errno.h)

Hello! I try to install a package from AUR (https://aur.archlinux.org/packages/onedriver), but there's an "errno.h" related issue that stops me from finishing. However, it seems like a tougher challenge: it's not the first unexpected header file issue that prevented me from installing packages.


What I did at the beginning:

    sudo pacman -S base-devel git
    git clone https://aur.archlinux.org/onedriver.git
    cd onedriver/
    makepkg -si


What error I faced:

     -> Extracting onedriver-0.12.0.tar.gz with bsdtar
    bsdtar: Failed to set default locale
    ==> Starting build(...)
    # runtime/cgo
    In file included from /usr/include/errno.h:28,
                    from cgo-gcc-prolog:30:
    /usr/include/bits/errno.h:26:11: fatal error: linux/**errno.h**: No such file or directory
      26 | # include <linux/errno.h>
         |           ^~~~~~~~~~~~~~~
    compilation terminated.
    ==> ERROR: A failure occurred in build(.)
       Aborting...


I tried to see if it happens with other installs using "makepkg -si" commands, so I tried to install libpamac-git for another purpose, but faced similar header problem:

    src/outdated-checker.p/outdated_checker.c:23:10: fatal error: glib.h: No such file or directory
      23 | #include <glib.h>

Also, few days ago I recall having a similar header file issue, but it was like this:

    cgo_export.c:3:10: fatal error: **stdlib.h**: No such file or directory


I searched for errno.h file in my system, here are its locations:

    /usr/include/errno.h
    /usr/lib/musl/include/errno.h
    /usr/lib/musl/include/sys/errno.h
    /usr/include/bits/errno.h
    /usr/include/errno.h
    /usr/include/sys/errno.h
    /usr/include/wine/msvcrt/errno.h
    /usr/lib/steamos/modules/5.16.2-arch1-1.1/build/include/linux/errno.h
    /usr/lib/steamos/modules/5.16.2-arch1-1.1/build/include/uapi/asm-generic/errno.h
    /usr/lib/steamos/modules/5.16.2-arch1-1.1/build/include/uapi/linux/errno.h
    /usr/lib/i386-musl/include/linux/errno.h
    /usr/lib/i386-musl/include/asm/errno.h
    /usr/lib/i386-musl/include/asm-generic/errno.h


What I tried to do:

    Reinstalling everything possibly related - gcc, lib32-gcc, sudo pacman -S git base-devel, required dependencies etc. and sudo pacman -Syu after

    Verifying if [multilib] still enabled.

    Installing onedriver using 'yay' - same error.

    ln -s /usr/include/asm-generic /usr/include/asm

    Browsing through a lot of various forums, reddits searching for a solution, but the complexness of my header files problem is exceeding my building up linux skills. "The area of damage" related to header files is seems to be larger than expected if it involves even different packages.


Do you have any ideas/tips on how it could be solved? Thanks a lot!

Offline

#2 2022-07-16 11:57:44

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 27,053
Website

Re: Makepkg can't build a package due to header problems (errno.h)

You seem to be ignoring an earier error that is likely the actual problem:

bsdtar: Failed to set default locale

Fix your locale.  And / or post the output of each of the following if you need help with that:

localectl
locale -a
cat /etc/locale.conf

"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2022-07-16 12:30:13

emplooia
Member
Registered: 2022-07-16
Posts: 7

Re: Makepkg can't build a package due to header problems (errno.h)

Trilby wrote:

You seem to be ignoring an earier error that is likely the actual problem:

bsdtar: Failed to set default locale

Fix your locale.  And / or post the output of each of the following if you need help with that:

localectl
locale -a
cat /etc/locale.conf

Hey, thanks, that might be the case! There were a few packages that I successfully installed in the past, which is why I haven't paid enough attention to this error unfortunately, ignoring its importance.

The output of these command looks like this:

localectl

System Locale: LANG=en_US.UTF-8
VC Keymap: n/a
X11 Layout: n/a

locale -a

locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory
C
POSIX
en_US.utf8

cat /etc/locale.conf

LANG=en_US.UTF-8

After that I checked /etc/locale.gen and en_US.UTF-8 UTF-8 was already uncommented. So I went with:

 sudo locale-gen
Generating locales...
  en_US.UTF-8... done
Generation complete.

Later I deleted the home/onedriver folder and tried to install it again:

makepkg -si
==> Making package: onedriver 0.12.0-1 (Sat Jul 16 14:16:47 2022)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading onedriver-0.12.0.tar.gz...
==> Validating source files with sha512sums...
    onedriver-0.12.0.tar.gz ... Passed
==> Extracting sources...
  -> Extracting onedriver-0.12.0.tar.gz with bsdtar
bsdtar: Failed to set default locale
==> Starting build()...
# github.com/jstaf/onedriver/fs/graph
oauth2_gtk.c:1:10: fatal error: gtk/gtk.h: No such file or directory
    1 | #include <gtk/gtk.h>
      |          ^~~~~~~~~~~
compilation terminated.
==> ERROR: A failure occurred in build().
    Aborting...

Different error at the end, but like you said it all may start with "bsdtar: Failed to set default locale'. So I went to locale.conf and updated like this:

LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8
LC_ADDRESS=en_US.UTF-8
LC_COLLATE=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LC_IDENTIFICATION=en_US.UTF-8
LC_MEASUREMENT=en_US.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_MONETARY=en_US.UTF-8
LC_NAME=en_US.UTF-8
LC_NUMERIC=en_US.UTF-8
LC_PAPER=en_US.UTF-8
LC_TELEPHONE=en_US.UTF-8
LC_TIME=en_US.UTF-8

and after a PC restart these two commands look good now:

localectl
   System Locale: LANG=en_US.UTF-8
       VC Keymap: n/a
      X11 Layout: n/a
locale -a
C
en_US.utf8
POSIX

So I deleted a package's folder again, redownloaded and tried to build it again. Here are the results:

makepkg -si
==> Making package: onedriver 0.12.0-1 (Sat 16 Jul 2022 02:34:47 PM CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading onedriver-0.12.0.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  116k    0  116k    0     0  97701      0 --:--:--  0:00:01 --:--:--     0
==> Validating source files with sha512sums...
    onedriver-0.12.0.tar.gz ... Passed
==> Extracting sources...
  -> Extracting onedriver-0.12.0.tar.gz with bsdtar
==> Starting build()...
# github.com/jstaf/onedriver/fs/graph
oauth2_gtk.c:1:10: fatal error: gtk/gtk.h: No such file or directory
    1 | #include <gtk/gtk.h>
      |          ^~~~~~~~~~~
compilation terminated.
==> ERROR: A failure occurred in build().
    Aborting... 

Well.. the good news is that there's no more "bsdtar: Failed to set default locale" error big_smile It's definitely better than it was for the sake of possible future locale-related complications.

But still, there is another one .h file causing trouble. stdlib.h at first, errno.h later, gtk.h. Definitely I'm not a friend of headers, even though I had just installed the newest linux-headers 5.18.12.arch1-1 package. Do you have any ideas what might be the reason?

Last edited by emplooia (2022-07-16 12:44:36)

Offline

#4 2022-07-16 12:42:05

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 27,053
Website

Re: Makepkg can't build a package due to header problems (errno.h)

Your configuration looks good, yet there is an error with locales still.  Please post the output of the following:

pacman -Qkk glibc
file /usr/share/i18n/locales/en_US
grep NoExtract /etc/pacman.conf

"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2022-07-16 12:49:04

emplooia
Member
Registered: 2022-07-16
Posts: 7

Re: Makepkg can't build a package due to header problems (errno.h)

Trilby wrote:

Your configuration looks good, yet there is an error with locales still.  Please post the output of the following:

pacman -Qkk glibc
file /usr/share/i18n/locales/en_US
grep NoExtract /etc/pacman.conf

Sure, feels like the output doesn't look right:

pacman -Qkk glibc

backup file: glibc: /etc/locale.gen (Modification time mismatch)
backup file: glibc: /etc/locale.gen (Size mismatch)
backup file: glibc: /etc/locale.gen (MD5 checksum mismatch)
backup file: glibc: /etc/locale.gen (SHA256 checksum mismatch)
warning: glibc: /var/db (Permissions mismatch)
glibc: 1578 total files, 1 altered file

file /usr/share/i18n/locales/en_US

/usr/share/i18n/locales/en_US: ASCII text

grep NoExtract /etc/pacman.conf

#NoExtract   =

Offline

#6 2022-07-16 12:54:45

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 27,053
Website

Re: Makepkg can't build a package due to header problems (errno.h)

Thanks, that all looks normal, with the potential exception of the permission mismatch on /var/db.  While I doubt that's related, do you know why the permissions on that directory may have changed?  What are the permissions on that directory?  They normally are 0755 (drwxr-xr-x).


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#7 2022-07-16 13:25:51

emplooia
Member
Registered: 2022-07-16
Posts: 7

Re: Makepkg can't build a package due to header problems (errno.h)

Trilby wrote:

Thanks, that all looks normal, with the potential exception of the permission mismatch on /var/db.  While I doubt that's related, do you know why the permissions on that directory may have changed?  What are the permissions on that directory?  They normally are 0755 (drwxr-xr-x).

Thanks! That's surprising, I guess it's better for me not to bet on my feelings whether something looks fine big_smile So locales are solved, I searched for how to check permissions of this directory and I've received this:

(deck@steamdeck ~)$ sudo ls -l /var/db

total 8
-rw-r--r-- 1 root root 5351 May 12  2021 Makefile
drwxr-xr-x 2 root root 1024 May 12  2021 nscd
drwx--x--x 3 root root 1024 Jul 12 13:30 sudo

I updated linux-headers 5.18.12.arch1-1 package, so it's all there along the required dependencies, I don't know, maybe it's something about the lack of correct path to these .h files?

Offline

#8 2022-07-16 14:51:38

seth
Member
Registered: 2012-09-03
Posts: 30,881

Re: Makepkg can't build a package due to header problems (errno.h)

oauth2_gtk.c:1:10: fatal error: gtk/gtk.h: No such file or directory
    1 | #include <gtk/gtk.h>
      |          ^~~~~~~~~~~
compilation terminated.
export VERBOSE=1
makepkg

gtk/gtk.h is provided by the various gtk versions, but the package probably tries to link gtk2 while the webkit dependency is gtk3 - but let's see…

Offline

#9 2022-07-16 15:22:10

emplooia
Member
Registered: 2022-07-16
Posts: 7

Re: Makepkg can't build a package due to header problems (errno.h)

seth wrote:
oauth2_gtk.c:1:10: fatal error: gtk/gtk.h: No such file or directory
    1 | #include <gtk/gtk.h>
      |          ^~~~~~~~~~~
compilation terminated.
export VERBOSE=1
makepkg

gtk/gtk.h is provided by the various gtk versions, but the package probably tries to link gtk2 while the webkit dependency is gtk3 - but let's see…

I checked installed packages and I see that I have these versions of webkit: extra/webkit2gtk 2.34.4-1 and webkit2gtk-5.0 2.34.4-1, but when it comes to "normal" gtk, then I have gtk3 1:3.24.31-1 and gtk4 1:4.6.0-2 installed.

I entered the command 'export

 VERBOSE=1'

when in the package's directory before using "makepkg -si", but I'm sorry, I didn't found the other way of using this command, it's certain I missed something. Should I combine it with other command?

Offline

#10 2022-07-16 15:27:35

seth
Member
Registered: 2012-09-03
Posts: 30,881

Re: Makepkg can't build a package due to header problems (errno.h)

exporting VERBOSE=1 to make should™ get you, well, verbose output - hopefully telling you what gcc command leads to the error (and what the include paths are)

Offline

#11 2022-07-16 16:26:13

emplooia
Member
Registered: 2022-07-16
Posts: 7

Re: Makepkg can't build a package due to header problems (errno.h)

seth wrote:

exporting VERBOSE=1 to make should™ get you, well, verbose output - hopefully telling you what gcc command leads to the error (and what the include paths are)

Sorry, I'm really thankful for the advice, but I've been searching for a way how to use VERBOSE=1 in a correct syntax and I just struggle with finding the proper method how to combine it with makepkg in the console. Am I close to success thinking about combining it in one row?

Last edited by emplooia (2022-07-16 16:27:46)

Offline

#12 2022-07-16 16:26:56

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,374

Re: Makepkg can't build a package due to header problems (errno.h)

emplooia wrote:

(deck@steamdeck ~)$ sudo ls -l /var/db

Are you actually running Arch or is this SteamOS?
If this is SteamOS then you'll have to ask on their forums instead as we can't support it here...

Forum Rules wrote:

These forums are for Arch Linux x86_64 ONLY.

Not Antegros, or Apricity, or Manjaro, or any of the "easy Arch installers", nor Arch-ARM; nothing other than vanilla 64-bit Arch Linux. Ask those communities for support.
If you have installed Arch, please read the rules before posting. README: Forum Rules.

Code of Conduct - Arch Linux distribution support ONLY wrote:

Arch-based distributions have their own support fora and users of those distributions should be actively encouraged to seek support there. These distributions often use different packages, package versions, repositories, or make custom system configurations silently, practically rendering support for such projects within Arch Linux impossible. Community technical support shall only be provided for the Arch Linux distribution and the Arch User Repository. Posting issues with, and requesting support for, derivative distributions or operating systems other than Arch Linux are prohibited.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#13 2022-07-16 17:24:08

emplooia
Member
Registered: 2022-07-16
Posts: 7

Re: Makepkg can't build a package due to header problems (errno.h)

Slithery wrote:
emplooia wrote:

(deck@steamdeck ~)$ sudo ls -l /var/db

Are you actually running Arch or is this SteamOS?
If this is SteamOS then you'll have to ask on their forums instead as we can't support it here...

Forum Rules wrote:

These forums are for Arch Linux x86_64 ONLY.

Not Antegros, or Apricity, or Manjaro, or any of the "easy Arch installers", nor Arch-ARM; nothing other than vanilla 64-bit Arch Linux. Ask those communities for support.
If you have installed Arch, please read the rules before posting. README: Forum Rules.

Code of Conduct - Arch Linux distribution support ONLY wrote:

Arch-based distributions have their own support fora and users of those distributions should be actively encouraged to seek support there. These distributions often use different packages, package versions, repositories, or make custom system configurations silently, practically rendering support for such projects within Arch Linux impossible. Community technical support shall only be provided for the Arch Linux distribution and the Arch User Repository. Posting issues with, and requesting support for, derivative distributions or operating systems other than Arch Linux are prohibited.

Hello, I totally understand you and the rule, I added this "(deck@steamdeck)" note in purpose to be precise about what I use and leave no ambiguity for everyone who helps or searches through the web with the same problem.

I feel like the issue with these specific packages and libraries is strictly related to Arch system structure, same as vanilla version, and this is the only reason why I chose to search for help in here. I'm really, really sorry for the trouble. I just don't believe that there is a more experienced community at this moment who could help with this such a specific problem with Arch packages/dependencies. SteamOS community is more gaming-focused and I'm trying to solve this Arch Linux-related issue for a few days. The solution may not be too far away, if I could do the "VERBOSE=1" output maybe it could become clear on how to fix the gcc commands related to these .header files.

Offline

#14 2022-07-16 19:06:20

seth
Member
Registered: 2012-09-03
Posts: 30,881

Re: Makepkg can't build a package due to header problems (errno.h)

No, probably won't  - the sources are acutally built w/ go and that suppresses the output (… sigh)
You'll have to edit the PKGBUILD and use "go -x build" instead to get the underlying C++ calls that produce the error.

Offline

#15 2022-07-17 15:07:09

Uykusuzio
Member
Registered: 2022-07-17
Posts: 1

Re: Makepkg can't build a package due to header problems (errno.h)

i have same problem but i cant fixed.
$ makepkg PKGBUILD

==> ERROR: (not have error type or desc.)
anyone  know how can i fixed this problem ?

Offline

#16 2022-07-17 15:28:56

seth
Member
Registered: 2012-09-03
Posts: 30,881

Re: Makepkg can't build a package due to header problems (errno.h)

No you don't and no we don't know how to fix <generic "ERROR: (not have error type or desc.)">
https://bbs.archlinux.org/viewtopic.php?id=57855

For starters "makepkg PKGBUILD" isn't a thing, https://man.archlinux.org/man/core/pacman/makepkg.8.en

Offline

Board footer

Powered by FluxBB