From: "yeping.zheng" <wonder...@gmail.com>

When using fedora40 build crash utility, it cannot compile successfully with 
the following log at end:
> crash build failed
> make[1]: *** [Makefile:267: gdb_merge] Error 1
> make: *** [Makefile:258: all] Error 2

It took me some time to find out that the failure was caused by not installing 
the patch command.
To make it easier for others to locate this problem, this patch checks whether 
the patch command is available before compiling.

How do you think about it?

Thanks,
yeping.

Signed-off-by: yeping.zheng <yeping.zh...@nio.com>
---
 Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Makefile b/Makefile
index 60dad18..0dfe0a5 100644
--- a/Makefile
+++ b/Makefile
@@ -259,6 +259,9 @@ all: make_configure
 #      @$(MAKE) extensions
 
 gdb_merge: force
+       @if [ -z "$(shell command -v patch)" ]; then \
+               echo "patch is not installed. Please install it."; \
+               exit 1; fi
        @if [ ! -f ${GDB}/README ]; then \
          $(MAKE) gdb_unzip; fi
        @echo "${LDFLAGS} -lz -ldl -rdynamic" > ${GDB}/gdb/mergelibs
-- 
2.47.1
--
Crash-utility mailing list -- devel@lists.crash-utility.osci.io
To unsubscribe send an email to devel-le...@lists.crash-utility.osci.io
https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/
Contribution Guidelines: https://github.com/crash-utility/crash/wiki

Reply via email to