uwurandom icon indicating copy to clipboard operation
uwurandom copied to clipboard

Build error on Arch Linux

Open orhun opened this issue 2 years ago • 10 comments

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

orhun avatar Apr 12 '23 15:04 orhun

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

valadaptive avatar Apr 13 '23 00:04 valadaptive

$ /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

orhun avatar Apr 13 '23 15:04 orhun

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/.

valadaptive avatar Apr 13 '23 18:04 valadaptive

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

orhun avatar Apr 13 '23 19:04 orhun

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

valadaptive avatar Apr 13 '23 22:04 valadaptive

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

orhun avatar Apr 14 '23 11:04 orhun

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

valadaptive avatar Apr 14 '23 15:04 valadaptive

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?

orhun avatar Apr 14 '23 20:04 orhun

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?

valadaptive avatar Apr 15 '23 01:04 valadaptive

I'll do that soon

Apr 15, 2023 10:47:36 AM valadaptive @.***>:

Looks to be the same thing that happened to another DKMS package-- a typo in dkms.conf[https://aur.archlinux.org/packages/hid-nintendo-nso-dkms#comment-904878]. I don't own the uwurandom-git-dkms package, so I can't fix it myself. @bs2kbs2k[https://github.com/bs2kbs2k] Mind fixing it?

— Reply to this email directly, view it on GitHub[https://github.com/valadaptive/uwurandom/issues/7#issuecomment-1509456548], or unsubscribe[https://github.com/notifications/unsubscribe-auth/ACORKXP2ZGYLPXDJEFLPJKLXBH43PANCNFSM6AAAAAAW32O7CY]. You are receiving this because you were mentioned.[Tracking image][https://github.com/notifications/beacon/ACORKXLH3I3JMIO5OUAWTNTXBH43PA5CNFSM6AAAAAAW32O7C2WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSZ7B5KI.gif]

bs2kbs2k avatar Apr 15 '23 05:04 bs2kbs2k