Compiling makedumpfile from source

manty kuma mantykuma at gmail.com
Fri Jun 11 01:38:55 PDT 2021


When i try to makedumpfile without vmcorefile, it complains that
"/tmp/vmcoreinfo no such file or directory" and fails to collect the dump.

>From the README it appears to me that makedumpfile can get vmcoreinfo
from /proc/vmcore
Is there any special CONFIG needed to support this?

Thank you in advance!

Regards,
Manty

On Fri, Jun 11, 2021 at 2:27 PM manty kuma <mantykuma at gmail.com> wrote:
>
> > libdw-dev libelf-dev zlib1g-dev libbz2-dev
> These packages helped. I am able to compile both elfutils and makedumpfile now.
> Thank you.
>
> Just one more question I have.
>
> I am using linux kernel v5.10
> Is it necessary to generate a "vmcoreinfo" file before hand and provide it to `makedumpfile`? or can it get ir from `/proc/vmcore`?
>
> Regards,
> Manty
>
> On Fri, Jun 11, 2021 at 2:00 PM HAGIO KAZUHITO(萩尾 一仁) <k-hagio-ab at nec.com> wrote:
>>
>> -----Original Message-----
>> > Thank you.
>> > for example, i am trying to compile: elfutils-0.182 package downloaded
>> > from https://sourceware.org/elfutils/ftp/0.182/
>> > After successfully configuring it, make fails with following error.
>>
>> Ah, I thought by mistake that you failed to compile makedumpfile.
>> Probably you should ask it to the elfutils community.
>>
>> btw, if you can use makedumpfile with dynamic libraries, maybe you
>> can use the distribution's packages without building elfutils.
>> I'm not familiar with Debian/Ubuntu, but I built a makedumpfile on
>> an Ubuntu machine once with the following packages:
>>   libdw-dev libelf-dev zlib1g-dev libbz2-dev
>> and "make LINKTYPE=dynamic", please see FAQ.002 in README.
>>
>> Kazu
>>
>> >
>> > ----------------------------------------
>> > Making all in libdwfl
>> >   CC       zstd.o
>> > In file included from zstd.c:4:0:
>> > gzip.c: In function ‘__libdw_unzstd’:
>> > gzip.c:278:39: error: passing argument 1 of ‘ZSTD_decompressStream’
>> > from incompatible pointer type [-Werror=incompatible-pointer-types]
>> >        result = ZSTD_decompressStream (dctx, &output, &input);
>> >                                        ^~~~
>> > In file included from gzip.c:53:0,
>> >                  from zstd.c:4:
>> > /usr/include/zstd.h:308:20: note: expected ‘ZSTD_DStream * {aka struct
>> > ZSTD_DStream_s *}’ but argument is of type ‘ZSTD_DCtx * {aka struct
>> > ZSTD_DCtx_s *}’
>> >  ZSTDLIB_API size_t ZSTD_decompressStream(ZSTD_DStream* zds,
>> > ZSTD_outBuffer* output, ZSTD_inBuffer* input);
>> >                     ^~~~~~~~~~~~~~~~~~~~~
>> > cc1: all warnings being treated as errors
>> > Makefile:681: recipe for target 'zstd.o' failed
>> > make[2]: *** [zstd.o] Error 1
>> > ----------------------------------------
>> >
>> > Seems like the configure file is not checking for specific version of
>> > libzstd-dev and it is not compatible with my current libzstd-dev
>> > My current version is as follows:
>> > ---
>> > $ apt-show-versions libzstd-dev
>> > libzstd-dev:amd64/stretch 1.1.2-1+deb9u1 uptodate
>> > ---
>> >
>> > Thank you.
>> >
>> > Regards,
>> > Manty
>> > On Fri, Jun 11, 2021 at 10:13 AM HAGIO KAZUHITO(萩尾 一仁)
>> > <k-hagio-ab at nec.com> wrote:
>> > >
>> > > Hi Manty,
>> > >
>> > > -----Original Message-----
>> > > > What version of elfutils is needed by `makedumpfile`?
>> > > > elfutils-0.144 is mentioned in README.
>> > > > I tried this one but the compilation is broken.
>> > > >
>> > > > https://sourceware.org/elfutils/ftp/0.144/
>> > > >
>> > > > Should I try to use the latest one instead?
>> > >
>> > > It could be built with elfutils-0.144 or later at the point of v1.6.7, and
>> > > I can build the latest makedumpfile with elfutils-0.148, 0.164, 0.182 on
>> > > some RHEL environments on hand with "make LINKTYPE=dynamic".
>> > >
>> > > What command do you use to build?  and what error do you see?
>> > >
>> > > Thanks,
>> > > Kazu
>> > >



More information about the kexec mailing list