Hi, YePing Thank you for the patch. On Tue, Dec 31, 2024 at 7:22 PM <devel-requ...@lists.crash-utility.osci.io> wrote:
> Date: Tue, 31 Dec 2024 19:21:03 +0800 > From: wonder...@gmail.com > Subject: [Crash-utility] [PATCH] Check whether the patch command is > installed before compiling > To: devel@lists.crash-utility.osci.io > Cc: yeping.zh...@nio.com, "yeping.zheng" <wonder...@gmail.com> > Message-ID: <20241231112106.1105816-1-wonder...@gmail.com> > > 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. > There are many dependencies for building crash tools, and some packages may not be installed by default, the current issue is such a case. > > How do you think about it? > I would suggest adding a new section to README(Doc patch) and says that: Requirements: make gcc gcc-c++ ncurses-devel zlib-devel lzo-devel snappy-devel bison wget patch texinfo libzstd-devel This is for Fedora, but I'm not sure if they have the same package name on other distributions. Can you help to investigate it? Maybe we can list dependencies based on known distributions. Thanks Lianbo > > 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