Skip to main content
Topic: Broken dkms installation, cc1 not found (Read 1180 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

Broken dkms installation, cc1 not found

Hi everyone,

Cant install any dkms module in a fresh Artix (open-rc) installation:

Code: [Select]
Preparing...
Warning: zfs-dkms-2.0.5-1 is up to date -- reinstalling
Resolving dependencies...
Checking inter-conflicts...
Checking keyring...
Checking integrity...
Loading packages files...
Checking file conflicts...
Checking available disk space...
==> Unable to remove module zfs/2.0.5 for kernel 5.12.14-artix1-1: Not found in dkms status output.
Reinstalling zfs-dkms (2.0.5-1)...
>>> WARNING: The on-disk format for encrypted datasets has changed!
>>>          All encrypted datasets will mount read only and need to be migrated.
>>>          See https://github.com/archzfs/archzfs/issues/222
==> dkms install --no-depmod -m zfs -v 2.0.5 -k 5.12.14-artix1-1
configure: error: in `/var/lib/dkms/zfs/2.0.5/build':
configure: error: C compiler cannot create executables
See `config.log' for more details
Error! Bad return status for module build on kernel: 5.12.14-artix1-1 (x86_64)
Consult /var/lib/dkms/zfs/2.0.5/build/make.log for more information.
==> Warning, `dkms install --no-depmod -m zfs -v 2.0.5 -k 5.12.14-artix1-1' returned 10
==> depmod 5.12.14-artix1-1
Transaction successfully finished.

Contents of config.log shows:

Code: [Select]
configure:4529: checking whether the C compiler works
configure:4551: gcc    conftest.c  >&5
gcc: fatal error: cannot execute 'cc1': execvp: No such file or directory
compilation terminated.
configure:4555: $? = 1
configure:4595: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "zfs"
| #define PACKAGE_TARNAME "zfs"
| #define PACKAGE_VERSION "2.0.5"
| #define PACKAGE_STRING "zfs 2.0.5"

Compiling regular C programs with gcc works without problem...

base-devel installed and cc1 is present in:

Code: [Select]
/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/cc1

Thanks!

 

Re: Broken dkms installation, cc1 not found

Reply #1
zfs-dkms and zfs-utils 2.0.5 were build quite a while ago.
Yesterday a new ZFS version was released: 2.1.0. This versions also supports Linux 5.12 and 5.13 kernels, which 2.0.5 did not.
Version 2.1.0 has now been build for Artix and some quick tests were performed with it.
Packages zfs-dkms-2.1.0 and zfs-utils-2.1.0 have just been pushed to the Artix Universe repository, so these are available now to be installed.

Re: Broken dkms installation, cc1 not found

Reply #2
zfs-dkms and zfs-utils 2.0.5 were build quite a while ago.
Yesterday a new ZFS version was released: 2.1.0. This versions also supports Linux 5.12 and 5.13 kernels, which 2.0.5 did not.
Version 2.1.0 has now been build for Artix and some quick tests were performed with it.
Packages zfs-dkms-2.1.0 and zfs-utils-2.1.0 have just been pushed to the Artix Universe repository, so these are available now to be installed.

I'm afraid the problem persists.



Code: [Select]
==> Unable to remove module zfs/2.1.0 for kernel 5.12.14-artix1-1: Not found in dkms status output.
Reinstalling zfs-dkms (2.1.0-1)...
>>> WARNING: The on-disk format for encrypted datasets has changed!
>>>          All encrypted datasets will mount read only and need to be migrated.
>>>          See https://github.com/archzfs/archzfs/issues/222
==> dkms install --no-depmod -m zfs -v 2.1.0 -k 5.12.14-artix1-1
configure: error: in `/var/lib/dkms/zfs/2.1.0/build':
configure: error: C compiler cannot create executables
See `config.log' for more details
Error! Bad return status for module build on kernel: 5.12.14-artix1-1 (x86_64)
Consult /var/lib/dkms/zfs/2.1.0/build/make.log for more information.
==> Warning, `dkms install --no-depmod -m zfs -v 2.1.0 -k 5.12.14-artix1-1' returned 10
==> depmod 5.12.14-artix1-1
Transaction successfully finished.

VirtualBox fails in a similar fashion, some path must be broken somewhere in DKMS

Code: [Select]
DKMS make.log for vboxhost-6.1.22_OSE for kernel 5.12.14-artix1-1 (x86_64)
Sat Jul  3 13:58:14 CEST 2021
make: Entering directory '/usr/lib/modules/5.12.14-artix1-1/build'
make: uname: No such file or directory
make: gcc: No such file or directory
make: make: No such file or directory
make: *** [Makefile:1859: /var/lib/dkms/vboxhost/6.1.22_OSE/build] Error 127
make: Leaving directory '/usr/lib/modules/5.12.14-artix1-1/build'

Re: Broken dkms installation, cc1 not found

Reply #3
Do you have gcc installed?
Just verify using: gcc -v
and install if needed

Re: Broken dkms installation, cc1 not found

Reply #4
This makes me think, if you compiled the kernel on your own I would guess this problem could occur when the gcc was updated and you did not rebuilt the kernel.

Re: Broken dkms installation, cc1 not found

Reply #5
Do you have gcc installed?
Just verify using: gcc -v
and install if needed

Code: [Select]
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/11.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 11.1.0 (GCC)

This makes me think, if you compiled the kernel on your own I would guess this problem could occur when the gcc was updated and you did not rebuilt the kernel.

Stock kernel

Code: [Select]
uname -a
Linux beams-wiosna 5.12.14-artix1-1 #1 SMP PREEMPT Thu, 01 Jul 2021 20:51:04 +0000 x86_64 GNU/Linux

cat /proc/version
Linux version 5.12.14-artix1-1 (linux@artixlinux) (gcc (GCC) 11.1.0, GNU ld (GNU Binutils) 2.36.1) #1 SMP PREEMPT Thu, 01 Jul 2021 20:51:04 +0000

However, I have good news (kinda?)

Attemping manual reinstallation of zfs throws up an already installed error:

Code: [Select]
dkms install zfs-2.1.0 -k 5.12.14-artix1-1
Error! DKMS tree already contains: zfs-2.1.0
You cannot add the same module/version combo more than once.

However, I had removed all dkms modules through pamac, yet much to my surprise:

sudo dkms status
vboxhost, 6.1.22_OSE: added
zfs, 2.0.5: added
zfs, 2.1.0: added

They were still present in the tree, so not only did it not install them properly, but it also leaves
an unclean removal.

After manually removing everything from /var/lib/dkms and running depmod -a just to be safe, I tried again
manually installing from the source present in /usr/src with success.

lsmod | grep "zfs"
zfs                  4640768  0
zunicode              335872  1 zfs
zzstd                 581632  1 zfs
zlua                  184320  1 zfs
zavl                   16384  1 zfs
icp                   327680  1 zfs
zcommon               102400  2 zfs,icp
znvpair               106496  2 zfs,zcommon
spl                   118784  6 zfs,icp,zzstd,znvpair,zcommon,zavl


So... pamac's fault? broken for any DKMS installation in Artix?


Also question, how can I make sure the modules are gonna get rebuilt after every kernel update with pacman?

This thread was immensely helpful:

https://forum.artixlinux.org/index.php/topic,1004.0.html


Should it be marked as "Solved" maybe?

Thanks!