makedumpfile can't build on Fedora 16

Ken'ichi Ohmichi oomichi at mxs.nes.nec.co.jp
Tue Jan 17 19:40:55 EST 2012


Hi,

On Wed, 18 Jan 2012 08:35:24 +0800
Wen Congyang <wency at 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 at 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:

  002: makedumpfile is compiled with -static option, because the command should
       run while the second kernel, which may not mount root filesystem and may
       not contain dynamic library files, is running.
       If the dynamic library files, which are needed by makedumpfile, exist
       while the second kernel is running, we can remove -static option from
       Makefile. This is a workaround for some linux distributions which does
       not contain static library files needed by makedumpfile.


Thanks
Ken'ichi Ohmichi

> > makedumpfile.c: In function ‘__exclude_unnecessary_pages’:
> > makedumpfile.c:3625:15: warning: variable ‘_count’ set but not used
> > [-Wunused-but-set-variable]
> > /usr/bin/ld: cannot find -lbz2
> > /usr/bin/ld: cannot find -ldl
> > /usr/bin/ld: cannot find -lc
> > collect2: ld returned 1 exit status
> > make: *** [makedumpfile] Error 1
> > 
> > [wangcong at cr0]~/makedumpfile% rpm -ql bzip2-libs
> > /lib64/libbz2.so.1
> > /lib64/libbz2.so.1.0.6
> > /usr/share/doc/bzip2-libs-1.0.6
> > /usr/share/doc/bzip2-libs-1.0.6/LICENSE
> > 
> > So, I don't know why ld can't find libbz2 and libc... Any hints?
> > 
> > Thanks!
> > 
> > _______________________________________________
> > kexec mailing list
> > kexec at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/kexec
> > 
> 
> 
> _______________________________________________
> kexec mailing list
> kexec at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec



More information about the kexec mailing list