crash-utility / crash

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

Build fails with no obvious errors #154

Closed drmiller-cni closed 1 year ago

drmiller-cni commented 1 year ago

Building on RHEL 9.2, GCC 11.3.1 20221121, bison-3.7.4-5.el9.x86_64. Tried both "master" branch and "8.0.3" tag. gdb being used is gdb-10.2.

Complete output of 'make': crash-make.txt

The build ends/fails with:

make[3]: Nothing to be done for 'all-target'.

crash build failed

There are some warnings during compile of gdb, but those do not appear to be fatal. The "crash build failed" message seems to indicate that the end was reached but no 'crash' binary was created. It's not clear why the "Nothing to be done for 'all-target'" appears and whether that is pertinent.

k-hagio commented 1 year ago

I can build the latest crash on RHEL9.2 with these packages. Please try:

# yum install git gcc gcc-c++ make wget tar patch bison texinfo ncurses-devel zlib-devel lzo-devel snappy-devel libzstd-devel
$ cd crash
$ rm -rf gdb-10.2
$ make clean
$ make

Please note that some packages are provided through the CRB repository.

drmiller-cni commented 1 year ago

It appears that lzo-devel and snappy-devel were missing from my system. But, I get the same results:

...
touch stamp-system-gdbinit
make[3]: Nothing to be done for 'all-target'.

crash build failed

Attaching complete make output: crash-make2.txt

k-hagio commented 1 year ago

maybe patch command fails on your system? This might be a clue.

TARGET: X86_64
 CRASH: 8.0.3
   GDB: 10.2

if [ -f gdb-10.2.patch ] && [ -s gdb-10.2.patch ]; then \
        patch -p0 < gdb-10.2.patch; cp gdb-10.2.patch gdb-10.2; fi
patching file gdb-10.2/Makefile.in
patch: getting attribute system.posix_acl_access of system.posix_acl_access: No data available
patch: getting attribute system.posix_acl_default of system.posix_acl_default: No data available
checking build system type... x86_64-pc-linux-gnu

This is a make log of 8.0.3 on my system:

TARGET: X86_64
 CRASH: 8.0.3
   GDB: 10.2

if [ -f gdb-10.2.patch ] && [ -s gdb-10.2.patch ]; then \
        patch -p0 < gdb-10.2.patch; cp gdb-10.2.patch gdb-10.2; fi
patching file gdb-10.2/Makefile.in
patching file gdb-10.2/gdb/Makefile.in
patching file gdb-10.2/gdb/cli/cli-cmds.c
patching file gdb-10.2/gdb/defs.h
patching file gdb-10.2/gdb/dwarf2/read.c
patching file gdb-10.2/gdb/main.c
...
patching file gdb-10.2/gdb/dwarf2/read.c
checking build system type... x86_64-pc-linux-gnu
...
$ md5sum gdb-10.2.patch 
981aa61a13877952e1ad4ad7483eae9e  gdb-10.2.patch     # patched md5sum
drmiller-cni commented 1 year ago

Mea culpa, I am having problems on my NFS mount and did not see the messages in my output log. Thanks for pointing this out to me. Closing issue.