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

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


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