crash-utility / crash

Linux kernel crash utility
https://crash-utility.github.io
819 stars 271 forks source link

undefined reference to `kernel_BUG_encoding_bytes' #109

Closed vt-alt closed 2 years ago

vt-alt commented 2 years ago

I try to compile crash-8.0.0, but it fails when building gdb-10.2 with:

/bin/sh ./libtool  --tag=CC   --mode=link gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144 -I./../zlib -pipe -frecord-gcc-switches -Wall -fdiagnostics-color=always -fdiagnostics-color=always -g -O2    -o objdump objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o  ../opcodes/libopcodes.la ../libctf/libctf.la ../bfd/libbfd.la ../libiberty/libiberty.a
libtool: link: gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144 -I./../zlib -pipe -frecord-gcc-switches -Wall -fdiagnostics-color=always -fdiagnostics-color=always -g -O2 -o objdump objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o  ../opcodes/.libs/libopcodes.a ../libctf/.libs/libctf.a -L/usr/src/RPM/BUILD/crash-8.0.0/gdb-10.2/zlib ../bfd/.libs/libbfd.a -lz ../libiberty/libiberty.a
ld: ../opcodes/.libs/libopcodes.a(i386-dis.o): in function `print_insn':
/usr/src/RPM/BUILD/crash-8.0.0/gdb-10.2/opcodes/i386-dis.c:9783: undefined reference to `kernel_BUG_encoding_bytes'
vt-alt commented 2 years ago

It seems the cause is that I used git tag gdb-10.2-release instead of actual gdb-10.2 tarball.