Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error on Arch Linux #7

Open
orhun opened this issue Apr 12, 2023 · 10 comments
Open

Build error on Arch Linux #7

orhun opened this issue Apr 12, 2023 · 10 comments

Comments

@orhun
Copy link

orhun commented Apr 12, 2023

Repro script:

pacman -S linux linux-headers
git clone https://github.com/valadaptive/uwurandom
cd uwurandom
make

Results in:

make -C /lib/modules/6.2.10-arch1-1/build/ M=`pwd` modules
  CC [M]  uwurandom/uwurandom.o
In file included from <command-line>:
././include/linux/kconfig.h:5:10: fatal error: generated/autoconf.h: No such file or directory
    5 | #include <generated/autoconf.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:252: uwurandom/uwurandom.o] Error 1
make[1]: *** [Makefile:2021: uwurandom] Error 2
make: *** [Makefile:8: all] Error 2

Additional info
Kernel: Linux thinkpad 6.2.10-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 07 Apr 2023 02:10:43 +0000 x86_64 GNU/Linux
Make: GNU Make 4.4.1
Project version: git

@valadaptive
Copy link
Owner

What's the output of ls -l /lib/modules/6.2.10-arch1-1/build/?

@orhun
Copy link
Author

orhun commented Apr 13, 2023

$ /usr/bin/ls -l /lib/modules/6.2.10-arch1-1/build/

total 110124
drwxr-xr-x   3 root root        32 Apr 12 18:02 arch
drwxr-xr-x   3 root root        62 Apr 12 18:02 block
drwxr-xr-x   2 root root        21 Apr 12 18:02 certs
drwxr-xr-x   4 root root        60 Apr 12 18:02 crypto
drwxr-xr-x  92 root root      4096 Apr 12 17:51 Documentation
drwxr-xr-x 135 root root      4096 Apr 12 18:02 drivers
drwxr-xr-x  71 root root      4096 Apr 12 18:02 fs
drwxr-xr-x  33 root root      4096 Apr 12 18:02 include
drwxr-xr-x   2 root root        21 Apr 12 18:02 init
-rw-r--r--   1 root root       555 Apr  7 05:10 Kconfig
drwxr-xr-x  12 root root      4096 Apr 12 18:02 kernel
drwxr-xr-x   8 root root      4096 Apr 12 18:02 lib
-rw-r--r--   1 root root         3 Apr  7 05:10 localversion.10-pkgrel
-rw-r--r--   1 root root         1 Apr  7 05:10 localversion.20-pkgname
-rw-r--r--   1 root root     71856 Apr  7 05:10 Makefile
drwxr-xr-x   3 root root        55 Apr 12 18:02 mm
-rw-r--r--   1 root root   1857669 Apr  7 05:10 Module.symvers
drwxr-xr-x  63 root root      4096 Apr 12 18:02 net
drwxr-xr-x   3 root root        33 Apr 12 18:02 samples
drwxr-xr-x  17 root root      8192 Apr 12 18:02 scripts
drwxr-xr-x  13 root root      4096 Apr 12 18:02 security
drwxr-xr-x  26 root root      4096 Apr 12 18:02 sound
-rw-r--r--   1 root root   7609807 Apr  7 05:10 System.map
drwxr-xr-x   4 root root        32 Apr 12 18:02 tools
drwxr-xr-x   2 root root        21 Apr 12 18:02 usr
-rw-r--r--   1 root root        15 Apr  7 05:10 version
drwxr-xr-x   4 root root        28 Apr 12 18:02 virt
-rw-r--r--   1 root root 103157128 Apr  7 05:10 vmlinux

@valadaptive
Copy link
Owner

Wait, that's the wrong folder; my bad!

Try ls -l /lib/modules/6.2.10-arch1-1/build/include/ and ls -l /lib/modules/6.2.10-arch1-1/build/include/generated/.

@orhun
Copy link
Author

orhun commented Apr 13, 2023

There you go:

$ /usr/bin/ls -l /lib/modules/6.2.10-arch1-1/build/include/

total 536
drwxr-xr-x  3 root root   4096 Apr 12 18:02 acpi
drwxr-xr-x  4 root root   4096 Apr 12 18:02 asm-generic
drwxr-xr-x  2 root root   4096 Apr 12 18:02 clocksource
drwxr-xr-x  2 root root 266240 Apr 12 18:02 config
drwxr-xr-x  3 root root   4096 Apr 12 18:02 crypto
drwxr-xr-x  6 root root   4096 Apr 12 18:02 drm
drwxr-xr-x 37 root root   4096 Apr 12 18:02 dt-bindings
drwxr-xr-x  3 root root    131 Apr 12 18:03 generated
drwxr-xr-x  2 root root   4096 Apr 12 18:02 keys
drwxr-xr-x  2 root root    111 Apr 12 18:02 kunit
drwxr-xr-x  2 root root    122 Apr 12 18:02 kvm
drwxr-xr-x 67 root root  40960 Apr 12 18:02 linux
drwxr-xr-x  2 root root    144 Apr 12 18:02 math-emu
drwxr-xr-x  6 root root   4096 Apr 12 18:02 media
drwxr-xr-x  2 root root     30 Apr 12 18:02 memory
drwxr-xr-x  2 root root    104 Apr 12 18:02 misc
drwxr-xr-x 13 root root   8192 Apr 12 18:02 net
drwxr-xr-x  2 root root    118 Apr 12 18:02 pcmcia
drwxr-xr-x  2 root root     25 Apr 12 18:02 ras
drwxr-xr-x  2 root root   4096 Apr 12 18:02 rdma
drwxr-xr-x  2 root root     69 Apr 12 18:02 rv
drwxr-xr-x  3 root root   4096 Apr 12 18:02 scsi
drwxr-xr-x 17 root root   4096 Apr 12 18:02 soc
drwxr-xr-x  4 root root   8192 Apr 12 18:02 sound
drwxr-xr-x  3 root root    102 Apr 12 18:02 target
drwxr-xr-x  5 root root   4096 Apr 12 18:02 trace
drwxr-xr-x 12 root root    147 Apr 12 18:02 uapi
drwxr-xr-x  2 root root     87 Apr 12 18:02 ufs
drwxr-xr-x  2 root root   4096 Apr 12 18:02 vdso
drwxr-xr-x  2 root root   4096 Apr 12 18:02 video
drwxr-xr-x  4 root root   4096 Apr 12 18:02 xen
$ /usr/bin/ls -l /lib/modules/6.2.10-arch1-1/build/include/generated/

total 28
-rw-r--r-- 1 root root 5154 Apr  7 05:10 asm-offsets.h
-rw-r--r-- 1 root root  427 Apr  7 05:10 bounds.h
-rw-r--r-- 1 root root  182 Apr  7 05:10 compile.h
-rw-r--r-- 1 root root 1123 Apr  7 05:10 timeconst.h
drwxr-xr-x 3 root root   19 Apr 12 18:02 uapi
-rw-r--r-- 1 root root   37 Apr  7 05:10 utsrelease.h
-rw-r--r-- 1 root root   77 Apr  7 05:10 utsversion.h

@valadaptive
Copy link
Owner

That's really bizarre. generated/autoconf.h should be present in the linux-headers package, but it isn't there. Try reinstalling linux-headers?

@orhun
Copy link
Author

orhun commented Apr 14, 2023

Interesting, I got this result:

Package (1)         Old Version     New Version     Net Change

core/linux-headers  6.2.10.arch1-1  6.2.10.arch1-1    0.00 MiB

Total Installed Size:  158.23 MiB
Net Upgrade Size:        0.00 MiB

:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring                                                                                                                   [----------------------------------------------------------------------------------------] 100%
(1/1) checking package integrity                                                                                                                 [----------------------------------------------------------------------------------------] 100%
(1/1) loading package files                                                                                                                      [----------------------------------------------------------------------------------------] 100%
(1/1) checking for file conflicts                                                                                                                [----------------------------------------------------------------------------------------] 100%
(1/1) checking available disk space                                                                                                              [----------------------------------------------------------------------------------------] 100%
warning: could not get file information for usr/lib/modules/6.2.10-arch1-1/build/include/generated/autoconf.h
warning: could not get file information for usr/lib/modules/6.2.10-arch1-1/build/include/generated/rustc_cfg
:: Running pre-transaction hooks...
(1/1) Remove upgraded DKMS modules
:: Processing package changes...
(1/1) reinstalling linux-headers                                                                                                                 [----------------------------------------------------------------------------------------] 100%
:: Running post-transaction hooks...
(1/5) Arming ConditionNeedsUpdate...
(2/5) Updating module dependencies...
(3/5) Install DKMS modules
==> dkms install --no-depmod uwurandom/r19.6cd30d8 -k 6.2.10-arch1-1
Error! Bad return status for module build on kernel: 6.2.10-arch1-1 (x86_64)
Consult /var/lib/dkms/uwurandom/r19.6cd30d8/build/make.log for more information.
==> WARNING: `dkms install --no-depmod uwurandom/r19.6cd30d8 -k 6.2.10-arch1-1' exited 10

make.log contains the same error:

DKMS make.log for uwurandom-r19.6cd30d8 for kernel 6.2.10-arch1-1 (x86_64)
Fri Apr 14 02:09:13 PM +03 2023
  CC [M]  /var/lib/dkms/uwurandom/r19.6cd30d8/build/uwurandom.o
In file included from <command-line>:
././include/linux/kconfig.h:5:10: fatal error: generated/autoconf.h: No such file or directory
    5 | #include <generated/autoconf.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.build:252: /var/lib/dkms/uwurandom/r19.6cd30d8/build/uwurandom.o] Error 1
make: *** [Makefile:2021: /var/lib/dkms/uwurandom/r19.6cd30d8/build] Error 2

@valadaptive
Copy link
Owner

Did you install uwurandom-git-dkms from the AUR? Try removing it.

@orhun
Copy link
Author

orhun commented Apr 14, 2023

That fixed it, thanks! I guess having the AUR package installed and trying to compile manually didn't work.

I'm wondering why though. Is there an explanation?

@valadaptive
Copy link
Owner

Looks to be the same thing that happened to another DKMS package-- a typo in dkms.conf. I don't own the uwurandom-git-dkms package, so I can't fix it myself. @bs2kbs2k Mind fixing it?

@bs2kbs2k
Copy link
Contributor

bs2kbs2k commented Apr 15, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants