![amgpu-dkms 软件包内核模块构建错误](https://linux22.com/image/182305/amgpu-dkms%20%E8%BD%AF%E4%BB%B6%E5%8C%85%E5%86%85%E6%A0%B8%E6%A8%A1%E5%9D%97%E6%9E%84%E5%BB%BA%E9%94%99%E8%AF%AF.png)
uname -a
:Linux me 5.9.0-1-amd64 #1 SMP Debian 5.9.1-1 (2020-10-17) x86_64 GNU/Linux
升级 amdgpu-dkms 软件包时,它在内核构建阶段遇到错误。两人config.log
又make.log
抱怨失踪了autoconf.h
。make.log
建议Run 'make oldconfig && make prepare' on kernel src to fix it.
抱怨缺少mkmakefile
.这可能是我的 linux 标头安装的问题还是其他问题?如何获取或创建缺少的配置文件?
输出sudo apt upgrade
:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up amdgpu-dkms (1:5.6.5.24-1109583) ...
Removing old amdgpu-5.6.5.24-1109583 DKMS files...
------------------------------
Deleting module version: 5.6.5.24-1109583
completely from the DKMS tree.
------------------------------
Done.
Loading new amdgpu-5.6.5.24-1109583 DKMS files...
Building for 5.9.0-1-amd64
Building for architecture amd64
Building initial module for 5.9.0-1-amd64
configure: error: in `/var/lib/dkms/amdgpu/5.6.5.24-1109583/build/amd/dkms':
configure: error: C compiler cannot create executables
See `config.log' for more details
Error! Bad return status for module build on kernel: 5.9.0-1-amd64 (amd64)
Consult /var/lib/dkms/amdgpu/5.6.5.24-1109583/build/make.log for more information.
dpkg: error processing package amdgpu-dkms (--configure):
installed amdgpu-dkms package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of amdgpu:
amdgpu depends on amdgpu-dkms (= 1:5.6.5.24-1109583); however:
Package amdgpu-dkms is not configured yet.
dpkg: error processing package amdgpu (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of amdgpu-pro:
amdgpu-pro depends on amdgpu (= 20.30-1109583); however:
Package amdgpu is not configured yet.
dpkg: error processing package amdgpu-pro (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of amdgpu-pro-lib32:
amdgpu-pro-lib32 depends on amdgpu (= 20.30-1109583) | amdgpu-hwe (= 20.30-1109583); however:
Package amdgpu is not configured yet.
Package amdgpu-hwe is not installed.
amdgpu-pro-lib32 depends on amdgpu-pro (= 20.30-1109583) | amdgpu-pro-hwe (= 20.30-1109583); however:
Package amdgpu-pro is not configured yet.
Package amdgpu-pro-hwe is not installed.
dpkg: error processing package amdgpu-pro-lib32 (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
amdgpu-dkms
amdgpu
amdgpu-pro
amdgpu-pro-lib32
E: Sub-process /usr/bin/dpkg returned an error code (1)
内容/var/lib/dkms/amdgpu/5.6.5.24-1109583/build/amd/dkms/config.log
:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by amdgpu-dkms configure 19.40, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure
## --------- ##
## Platform. ##
## --------- ##
hostname = windexDebiant
uname -m = x86_64
uname -r = 5.9.0-1-amd64
uname -s = Linux
uname -v = #1 SMP Debian 5.9.1-1 (2020-10-17)
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = x86_64
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /bin
PATH: /sbin
PATH: /usr/bin
PATH: /usr/sbin
PATH: /usr/lib/dkms
## ----------- ##
## Core tests. ##
## ----------- ##
configure:1881: checking for a BSD-compatible install
configure:1949: result: /bin/install -c
configure:2008: checking for gcc
configure:2024: found /bin/gcc
configure:2035: result: gcc
configure:2264: checking for C compiler version
configure:2273: gcc --version >&5
gcc (Debian 10.2.0-15) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:2284: $? = 0
configure:2273: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/10/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 10.2.0-15' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-10-mPxEea/gcc-10-10.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-10-mPxEea/gcc-10-10.2.0/debian/tmp-gcn/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.0 (Debian 10.2.0-15)
... rest of stderr output deleted ...
configure:2284: $? = 0
configure:2273: gcc -V >&5
gcc: error: unrecognized command-line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:2284: $? = 1
configure:2273: gcc -qversion >&5
gcc: error: unrecognized command-line option '-qversion'; did you mean '--version'?
gcc: fatal error: no input files
compilation terminated.
configure:2284: $? = 1
configure:2304: checking whether the C compiler works
configure:2326: gcc -I/lib/modules/5.9.0-1-amd64/source/arch/x86/include -I/lib/modules/5.9.0-1-amd64/build/arch/x86/include/generated -I/lib/modules/5.9.0-1-amd64/source/include -I/lib/modules/5.9.0-1-amd64/build/include -I/lib/modules/5.9.0-1-amd64/source/include/uapi -include /lib/modules/5.9.0-1-amd64/source/include/linux/kconfig.h conftest.c >&5
In file included from <command-line>:32:
/lib/modules/5.9.0-1-amd64/source/include/linux/kconfig.h:7:10: fatal error: generated/autoconf.h: No such file or directory
7 | #include <generated/autoconf.h>
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
configure:2330: $? = 1
configure:2368: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "amdgpu-dkms"
| #define PACKAGE_TARNAME "amdgpu-dkms"
| #define PACKAGE_VERSION "19.40"
| #define PACKAGE_STRING "amdgpu-dkms 19.40"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2373: error: in `/var/lib/dkms/amdgpu/5.6.5.24-1109583/build/amd/dkms':
configure:2375: error: C compiler cannot create executables
See `config.log' for more details
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value='-I/lib/modules/5.9.0-1-amd64/source/arch/x86/include -I/lib/modules/5.9.0-1-amd64/build/arch/x86/include/generated -I/lib/modules/5.9.0-1-amd64/source/include -I/lib/modules/5.9.0-1-amd64/build/include -I/lib/modules/5.9.0-1-amd64/source/include/uapi -include /lib/modules/5.9.0-1-amd64/source/include/linux/kconfig.h'
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_path_install='/bin/install -c'
ac_cv_prog_ac_ct_CC=gcc
## ----------------- ##
## Output variables. ##
## ----------------- ##
CC='gcc'
CFLAGS=''
CPP=''
CPPFLAGS='-I/lib/modules/5.9.0-1-amd64/source/arch/x86/include -I/lib/modules/5.9.0-1-amd64/build/arch/x86/include/generated -I/lib/modules/5.9.0-1-amd64/source/include -I/lib/modules/5.9.0-1-amd64/build/include -I/lib/modules/5.9.0-1-amd64/source/include/uapi -include /lib/modules/5.9.0-1-amd64/source/include/linux/kconfig.h'
DEFS=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EXEEXT=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
KERNEL_MAKE=''
LDFLAGS=''
LIBOBJS=''
LIBS=''
LINUX=''
LINUX_OBJ=''
LINUX_SYMBOLS=''
LINUX_VERSION=''
LTLIBOBJS=''
OBJEXT=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME='amdgpu-dkms'
PACKAGE_STRING='amdgpu-dkms 19.40'
PACKAGE_TARNAME='amdgpu-dkms'
PACKAGE_URL=''
PACKAGE_VERSION='19.40'
PATH_SEPARATOR=':'
SHELL='/bin/sh'
ac_ct_CC='gcc'
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host_alias=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
runstatedir='${localstatedir}/run'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME "amdgpu-dkms"
#define PACKAGE_TARNAME "amdgpu-dkms"
#define PACKAGE_VERSION "19.40"
#define PACKAGE_STRING "amdgpu-dkms 19.40"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
configure: exit 77
内容/var/lib/dkms/amdgpu/5.6.5.24-1109583/build/make.log
DKMS make.log for amdgpu-5.6.5.24-1109583 for kernel 5.9.0-1-amd64 (amd64)
Sat 24 Oct 2020 08:30:59 PM EDT
make: Entering directory '/usr/src/linux-headers-5.9.0-1-amd64'
ERROR: Kernel configuration is invalid.
include/generated/autoconf.h or include/config/auto.conf are missing.
Run 'make oldconfig && make prepare' on kernel src to fix it.
make[1]: *** [/usr/src/linux-headers-5.9.0-1-common/Makefile:718: include/config/auto.conf] Error 1
make: *** [/usr/src/linux-headers-5.9.0-1-common/Makefile:185: __sub-make] Error 2
make: Leaving directory '/usr/src/linux-headers-5.9.0-1-amd64'
输出sudo make oldconfig && make prepare
:
sh: /usr/src/linux-headers-5.9.0-1-common/scripts/mkmakefile: No such file or directory
make[1]: *** [/usr/src/linux-headers-5.9.0-1-common/Makefile:552: outputmakefile] Error 127
make: *** [/usr/src/linux-headers-5.9.0-1-common/Makefile:185: __sub-make] Error 2