Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linux latest stable compilation: cannot represent change to vmlinux-gdb.py:

The issue:

  • It's been 20 years since:
    • I last wrote >1K of C code
    • compiled anything >10K source lines
  • My current Distro's support (Ubuntu 16.04) for an 0cf3:e300 Atheros Communications, Inc. WiFi driver is abysmal: 8-12Mbps is the best I get.

What I know about kernel version priorities:

  1. Use your own distro's kernel (out of the question: just too slow)
  2. Use the latest stable kernel
  3. Use the latest LTS kernel

What I've tried:

git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
git checkout -b stable v5.1.2
cp /boot/config-`uname -r` .config
yes '' | make oldconfig
make -j `getconf _NPROCESSORS_ONLN\' deb-pkg LOCALVERSION=-fab

Which gives me the following error:

dpkg-source: error: cannot represent change to vmlinux-gdb.py:
dpkg-source: error:   new version is symlink to /home/fab-user/Documents/Source/linux/scripts/gdb/vmlinux-gdb.py
dpkg-source: error:   old version is nonexistent

in the following full output:

make -j `getconf _NPROCESSORS_ONLN` deb-pkg LOCALVERSION=-fab
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/confdata.o
  HOSTCC  scripts/kconfig/expr.o
  LEX     scripts/kconfig/lexer.lex.c
  YACC    scripts/kconfig/parser.tab.h
  YACC    scripts/kconfig/parser.tab.c
  HOSTCC  scripts/kconfig/preprocess.o
  HOSTCC  scripts/kconfig/symbol.o
  HOSTCC  scripts/kconfig/lexer.lex.o
  HOSTCC  scripts/kconfig/parser.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf  --syncconfig Kconfig
  UPD     include/config/kernel.release
make clean
/bin/bash ./scripts/package/mkdebian
  TAR     linux-5.1.2-fab.tar.gz
origversion=$(dpkg-parsechangelog -SVersion |sed 's/-[^-]*$//');\
    mv linux-5.1.2-fab.tar.gz ../linux-5.1.2-fab_${origversion}.orig.tar.gz
dpkg-buildpackage -r"fakeroot -u" -a$(cat debian/arch)  -i.git -us -uc
dpkg-buildpackage: source package linux-5.1.2-fab
dpkg-buildpackage: source version 5.1.2-fab-1
dpkg-buildpackage: source distribution xenial
dpkg-buildpackage: source changed by fab-user <fab-user@fab-ux-predator>
dpkg-buildpackage: host architecture amd64
 dpkg-source -i.git --before-build linux
 fakeroot -u debian/rules clean
rm -rf debian/*tmp debian/files
make clean
 dpkg-source -i.git -b linux
dpkg-source: info: using source format '1.0'
dpkg-source: warning: source directory 'linux' is not <sourcepackage>-<upstreamversion> 'linux-5.1.2-fab-5.1.2-fab'
dpkg-source: warning: .orig directory name linux.orig is not <package>-<upstreamversion> (wanted linux-5.1.2-fab-5.1.2-fab.orig)
dpkg-source: info: building linux-5.1.2-fab using existing linux-5.1.2-fab_5.1.2-fab.orig.tar.gz
dpkg-source: info: building linux-5.1.2-fab in linux-5.1.2-fab_5.1.2-fab-1.diff.gz
dpkg-source: error: cannot represent change to vmlinux-gdb.py:
dpkg-source: error:   new version is symlink to /home/fab-user/Documents/Source/linux/scripts/gdb/vmlinux-gdb.py
dpkg-source: error:   old version is nonexistent
dpkg-source: warning: ignoring deletion of file .scmversion, use --include-removal to override
dpkg-source: error: cannot represent change to linux-5.1.1-fab.tar.gz: binary file contents changed
dpkg-source: warning: the diff modifies the following upstream files: 
 .clang-format
 .cocciconfig
 .config.old
 .get_maintainer.ignore
 .mailmap
 .version
 CREDITS
 LICENSES/exceptions/GCC-exception-2.0
 LICENSES/exceptions/Linux-syscall-note
 LICENSES/other/Apache-2.0
 LICENSES/other/CDDL-1.0
 LICENSES/other/GPL-1.0
 LICENSES/other/ISC
 LICENSES/other/Linux-OpenIB
 LICENSES/other/MPL-1.1
 LICENSES/other/X11
 LICENSES/preferred/BSD-2-Clause
 LICENSES/preferred/BSD-3-Clause
 LICENSES/preferred/BSD-3-Clause-Clear
 LICENSES/preferred/GPL-2.0
 LICENSES/preferred/LGPL-2.0
 LICENSES/preferred/LGPL-2.1
 LICENSES/preferred/MIT
 MAINTAINERS
 Module.symvers
 README
dpkg-source: info: use the '3.0 (quilt)' format to have separate and documented changes to upstream files, see dpkg-source(1)
dpkg-source: error: unrepresentable changes to source
dpkg-buildpackage: error: dpkg-source -i.git -b linux gave error exit status 1
scripts/package/Makefile:70: recipe for target 'deb-pkg' failed
make[1]: *** [deb-pkg] Error 1
Makefile:1396: recipe for target 'deb-pkg' failed
make: *** [deb-pkg] Error 2

so I ended up doing:

git checkout -b v4.19.38 v4.19.38

which gives me up to 10MB/S instead of my distro's standard kernel's 12Mbps, and works great, but I need to reboot my machine every 24 hours if I want to keep the full speed of the WiFi Driver.

The question:

Am I doomed to stay on 4.19.38?
Is there a way to get the 4.19.39-5.12 versions working permanently?

like image 384
Fabby Avatar asked May 15 '19 12:05

Fabby


2 Answers

Simply deleting the vmlinux-pdb.py symlink to scripts/gdb/vmlinux-gdb.py solved the issue for me.

So in the root directory of the kernel sources do

$ rm vmlinux-gdb.py

See also https://www.spinics.net/lists/linux-kbuild/msg18761.html

like image 97
Flow Avatar answered Sep 21 '22 00:09

Flow


I ran into this problem when trying to build from the ubuntu git repo.

scripts/gdb/vmlinux-gdb.py 

is a symptom of files being left over from a previous build. Even after you get rid of it, you may run into more errors (I had to delete the linux source tarball next).

do

git status

to see a number of untracked files. Getting rid of them is the aim.

Rather than hunting files down one by one, a game of whack-a-mole, easier is to

  • Commit everything you need

  • remove files which are not tracked by git

by doing

git clean -r

and execute this at the top of the source tree.

then try compiling

like image 43
Tim Richardson Avatar answered Sep 20 '22 00:09

Tim Richardson