From: Cong Wang <xiyou.wangcong@gmail.com>
To: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Cc: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>,
kexec@lists.infradead.org, Wen Congyang <wency@cn.fujitsu.com>
Subject: Re: makedumpfile can't build on Fedora 16
Date: Wed, 18 Jan 2012 21:45:09 +0800 [thread overview]
Message-ID: <4F16CCE5.1060500@gmail.com> (raw)
In-Reply-To: <20120118094055.239c362d.oomichi@mxs.nes.nec.co.jp>
On 01/18/2012 08:40 AM, Ken'ichi Ohmichi wrote:
>
> Hi,
>
> On Wed, 18 Jan 2012 08:35:24 +0800
> Wen Congyang<wency@cn.fujitsu.com> wrote:
>> At 01/18/2012 12:36 AM, Cong Wang Wrote:
>>> Hello, Atsushi,
>>>
>>> I can't build the latest makedumpfile on Fedora 16,
>>>
>>> [wangcong@cr0]~/makedumpfile% make
>>> ...
>>> gcc -g -O2 -Wall -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
>>> -D_LARGEFILE64_SOURCE -DVERSION='"1.4.1"' -DRELEASE_DATE='"6 January
>>> 2012"' -D__x86_64__ print_info.o dwarf_info.o elf_info.o erase_info.o
>>> sadump_info.o arch/arm.o arch/x86.o arch/x86_64.o arch/ia64.o
>>> arch/ppc64.o arch/s390x.o -o makedumpfile makedumpfile.c -static -ldw
>>> -lbz2 -lebl -ldl -lelf -lz
>>
>> The parameter has -static, so you need libc.a, libdw.a and ...
>> Or you can remove -static, but you should ensure that there are these
>> dynamic librarys in the second os.
>
> That's right.
> It has been written in README file of makedumpfile:
Hey,
This means we have to patch the source code by ourselves, why not
improve it? Something like below?
diff --git a/Makefile b/Makefile
index 9afbe1c..1361700 100644
--- a/Makefile
+++ b/Makefile
@@ -28,6 +28,11 @@ SRC_PART = print_info.c dwarf_info.c elf_info.c
erase_info.c sadump_info.c
OBJ_PART = print_info.o dwarf_info.o elf_info.o erase_info.o sadump_info.o
SRC_ARCH = arch/arm.c arch/x86.c arch/x86_64.c arch/ia64.c arch/ppc64.c
arch/s390x.c
OBJ_ARCH = arch/arm.o arch/x86.o arch/x86_64.o arch/ia64.o arch/ppc64.o
arch/s390x.o
+LIBS := $(shell if $(CC) -static -ldw -lbz2 -lebl -ldl -lelf -lz
>&/dev/null; then \
+ echo "-static -ldw -lbz2 -lebl -ldl -lelf -lz"; \
+ else \
+ echo "-ldw -lbz2 -lebl -ldl -lelf -lz"; \
+ fi)
all: makedumpfile
@@ -38,7 +43,7 @@ $(OBJ_ARCH): $(SRC_ARCH)
$(CC) $(CFLAGS_ARCH) -c -o ./$@ ./$(@:.o=.c)
makedumpfile: $(SRC) $(OBJ_PART) $(OBJ_ARCH)
- $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ_PART) $(OBJ_ARCH) -o $@ $<
-static -ldw -lbz2 -lebl -ldl -lelf -lz
+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ_PART) $(OBJ_ARCH) -o $@ $< $(LIBS)
echo .TH MAKEDUMPFILE 8 \"$(DATE)\" \"makedumpfile v$(VERSION)\"
\"Linux System Administrator\'s Manual\" > temp.8
grep -v "^.TH MAKEDUMPFILE 8" makedumpfile.8 >> temp.8
mv temp.8 makedumpfile.8
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2012-01-18 13:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-17 16:36 makedumpfile can't build on Fedora 16 Cong Wang
2012-01-18 0:35 ` Wen Congyang
2012-01-18 0:40 ` Ken'ichi Ohmichi
2012-01-18 13:45 ` Cong Wang [this message]
2012-01-19 7:58 ` Ken'ichi Ohmichi
2012-01-20 7:03 ` Atsushi Kumagai
2012-01-20 7:19 ` Cong Wang
2012-01-20 8:02 ` Atsushi Kumagai
2012-01-20 7:35 ` Ken'ichi Ohmichi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F16CCE5.1060500@gmail.com \
--to=xiyou.wangcong@gmail.com \
--cc=kexec@lists.infradead.org \
--cc=kumagai-atsushi@mxc.nes.nec.co.jp \
--cc=oomichi@mxs.nes.nec.co.jp \
--cc=wency@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.