All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Compiling makedumpfile from source
@ 2021-06-11  9:07 HAGIO KAZUHITO(萩尾 一仁)
  2021-06-28  6:31 ` manty kuma
  0 siblings, 1 reply; 13+ messages in thread
From: HAGIO KAZUHITO(萩尾 一仁) @ 2021-06-11  9:07 UTC (permalink / raw)
  To: manty kuma; +Cc: kexec-ml

-----Original Message-----
> 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?

hmm, at least CONFIG_CRASH_CORE=y would be needed.

Kazu

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Compiling makedumpfile from source
  2021-06-11  9:07 Compiling makedumpfile from source HAGIO KAZUHITO(萩尾 一仁)
@ 2021-06-28  6:31 ` manty kuma
  2021-06-28  7:07   ` HAGIO KAZUHITO(萩尾 一仁)
  0 siblings, 1 reply; 13+ messages in thread
From: manty kuma @ 2021-06-28  6:31 UTC (permalink / raw)
  To: HAGIO KAZUHITO(萩尾 一仁); +Cc: kexec-ml

Hi Kazuhito san,

I am getting the following error when trying to use makedumpfile utility.

> copy_vmcoreinfo: Can't open the vmcoreinfo file(/tmp/vmcoreinfoLUQc25). No such file or directory.
> makedumpfile Failed

In your setup how are you providing the vmcoreinfo file? In my case it
is checking /tmp/vmcoreinfoLUQc25
Who generates this file?
Thank you very much.

On Fri, Jun 11, 2021 at 6:07 PM HAGIO KAZUHITO(萩尾 一仁)
<k-hagio-ab@nec.com> wrote:
>
> -----Original Message-----
> > 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?
>
> hmm, at least CONFIG_CRASH_CORE=y would be needed.
>
> Kazu
>

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: Compiling makedumpfile from source
  2021-06-28  6:31 ` manty kuma
@ 2021-06-28  7:07   ` HAGIO KAZUHITO(萩尾 一仁)
  2021-07-08 11:17     ` manty kuma
  0 siblings, 1 reply; 13+ messages in thread
From: HAGIO KAZUHITO(萩尾 一仁) @ 2021-06-28  7:07 UTC (permalink / raw)
  To: manty kuma; +Cc: kexec-ml

-----Original Message-----
> Hi Kazuhito san,
> 
> I am getting the following error when trying to use makedumpfile utility.
> 
> > copy_vmcoreinfo: Can't open the vmcoreinfo file(/tmp/vmcoreinfoLUQc25). No such file or directory.
> > makedumpfile Failed
> 
> In your setup how are you providing the vmcoreinfo file? In my case it
> is checking /tmp/vmcoreinfoLUQc25
> Who generates this file?

Generally, vmcoreinfo is copied from vmcore's ELF note to /tmp/vmcoreinfoXXXXXX
by makedumpfile, please see copy_vmcoreinfo().  So no need to provide explicitly.

Is there the /tmp directory on your environment?

Kazu


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Compiling makedumpfile from source
  2021-06-28  7:07   ` HAGIO KAZUHITO(萩尾 一仁)
@ 2021-07-08 11:17     ` manty kuma
  2021-07-09  1:45       ` manty kuma
  0 siblings, 1 reply; 13+ messages in thread
From: manty kuma @ 2021-07-08 11:17 UTC (permalink / raw)
  To: HAGIO KAZUHITO(萩尾 一仁); +Cc: kexec-ml

Sorry. I am not sure how but I completely missed this email.
Yes, /tmp was not available in my env. I just did mkdir before
executing `makedumpfile` and it is now working well.
Thank you very much.

On Mon, Jun 28, 2021 at 4:07 PM HAGIO KAZUHITO(萩尾 一仁)
<k-hagio-ab@nec.com> wrote:
>
> -----Original Message-----
> > Hi Kazuhito san,
> >
> > I am getting the following error when trying to use makedumpfile utility.
> >
> > > copy_vmcoreinfo: Can't open the vmcoreinfo file(/tmp/vmcoreinfoLUQc25). No such file or directory.
> > > makedumpfile Failed
> >
> > In your setup how are you providing the vmcoreinfo file? In my case it
> > is checking /tmp/vmcoreinfoLUQc25
> > Who generates this file?
>
> Generally, vmcoreinfo is copied from vmcore's ELF note to /tmp/vmcoreinfoXXXXXX
> by makedumpfile, please see copy_vmcoreinfo().  So no need to provide explicitly.
>
> Is there the /tmp directory on your environment?
>
> Kazu
>
>

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Compiling makedumpfile from source
  2021-07-08 11:17     ` manty kuma
@ 2021-07-09  1:45       ` manty kuma
  2021-07-27  5:54         ` manty kuma
  0 siblings, 1 reply; 13+ messages in thread
From: manty kuma @ 2021-07-09  1:45 UTC (permalink / raw)
  To: HAGIO KAZUHITO(萩尾 一仁); +Cc: kexec-ml

Hi Kazuhito san,

I am looking to better understand the sections being filtering out
with each of the following options.

Zero page:
Pages that are empty. Ignoring these pages won't have any impact on analysis.

non-private cache and private cache:
What exactly are these sections of memory? Just a one-line overview
about them is sufficient.
(My understanding was that cache is not part of RAM. Is this cache
something else? Like some bookkeeping data maintained by the kernel?)


user data:
Are these sections of the memory for the user space processes/memory
sections allocated using malloc?
My understanding is that If I exclude this section, gcore would not
work. Is my understanding correct?
I expected this section to be big. But in fact excluding this did not
have much impact on the dump size.

free page:
unallocated pages. Since they are not allocated. filtering them out
won't have any impact on dump analysis.
Please correct me if I am wrong.


If there is already some place that explains what these sections
filter out, please just drop the reference to them and i will look
into it.
Thank you very much in advance!

Manty

On Thu, Jul 8, 2021 at 8:17 PM manty kuma <mantykuma@gmail.com> wrote:
>
> Sorry. I am not sure how but I completely missed this email.
> Yes, /tmp was not available in my env. I just did mkdir before
> executing `makedumpfile` and it is now working well.
> Thank you very much.
>
> On Mon, Jun 28, 2021 at 4:07 PM HAGIO KAZUHITO(萩尾 一仁)
> <k-hagio-ab@nec.com> wrote:
> >
> > -----Original Message-----
> > > Hi Kazuhito san,
> > >
> > > I am getting the following error when trying to use makedumpfile utility.
> > >
> > > > copy_vmcoreinfo: Can't open the vmcoreinfo file(/tmp/vmcoreinfoLUQc25). No such file or directory.
> > > > makedumpfile Failed
> > >
> > > In your setup how are you providing the vmcoreinfo file? In my case it
> > > is checking /tmp/vmcoreinfoLUQc25
> > > Who generates this file?
> >
> > Generally, vmcoreinfo is copied from vmcore's ELF note to /tmp/vmcoreinfoXXXXXX
> > by makedumpfile, please see copy_vmcoreinfo().  So no need to provide explicitly.
> >
> > Is there the /tmp directory on your environment?
> >
> > Kazu
> >
> >

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Compiling makedumpfile from source
  2021-07-09  1:45       ` manty kuma
@ 2021-07-27  5:54         ` manty kuma
  2021-07-28  5:43           ` HAGIO KAZUHITO(萩尾 一仁)
  0 siblings, 1 reply; 13+ messages in thread
From: manty kuma @ 2021-07-27  5:54 UTC (permalink / raw)
  To: HAGIO KAZUHITO(萩尾 一仁); +Cc: kexec-ml

Hi kazuhito san,

Just following up on my last email.
Sincere apologies for asking for your time.
I want to specifically understand what the "user data" section is and
what it means to exclude it from the dump.

Thank you very much.

Best Regards,
Manty

On Fri, Jul 9, 2021 at 10:45 AM manty kuma <mantykuma@gmail.com> wrote:
>
> Hi Kazuhito san,
>
> I am looking to better understand the sections being filtering out
> with each of the following options.
>
> Zero page:
> Pages that are empty. Ignoring these pages won't have any impact on analysis.
>
> non-private cache and private cache:
> What exactly are these sections of memory? Just a one-line overview
> about them is sufficient.
> (My understanding was that cache is not part of RAM. Is this cache
> something else? Like some bookkeeping data maintained by the kernel?)
>
>
> user data:
> Are these sections of the memory for the user space processes/memory
> sections allocated using malloc?
> My understanding is that If I exclude this section, gcore would not
> work. Is my understanding correct?
> I expected this section to be big. But in fact excluding this did not
> have much impact on the dump size.
>
> free page:
> unallocated pages. Since they are not allocated. filtering them out
> won't have any impact on dump analysis.
> Please correct me if I am wrong.
>
>
> If there is already some place that explains what these sections
> filter out, please just drop the reference to them and i will look
> into it.
> Thank you very much in advance!
>
> Manty
>
> On Thu, Jul 8, 2021 at 8:17 PM manty kuma <mantykuma@gmail.com> wrote:
> >
> > Sorry. I am not sure how but I completely missed this email.
> > Yes, /tmp was not available in my env. I just did mkdir before
> > executing `makedumpfile` and it is now working well.
> > Thank you very much.
> >
> > On Mon, Jun 28, 2021 at 4:07 PM HAGIO KAZUHITO(萩尾 一仁)
> > <k-hagio-ab@nec.com> wrote:
> > >
> > > -----Original Message-----
> > > > Hi Kazuhito san,
> > > >
> > > > I am getting the following error when trying to use makedumpfile utility.
> > > >
> > > > > copy_vmcoreinfo: Can't open the vmcoreinfo file(/tmp/vmcoreinfoLUQc25). No such file or directory.
> > > > > makedumpfile Failed
> > > >
> > > > In your setup how are you providing the vmcoreinfo file? In my case it
> > > > is checking /tmp/vmcoreinfoLUQc25
> > > > Who generates this file?
> > >
> > > Generally, vmcoreinfo is copied from vmcore's ELF note to /tmp/vmcoreinfoXXXXXX
> > > by makedumpfile, please see copy_vmcoreinfo().  So no need to provide explicitly.
> > >
> > > Is there the /tmp directory on your environment?
> > >
> > > Kazu
> > >
> > >

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: Compiling makedumpfile from source
  2021-07-27  5:54         ` manty kuma
@ 2021-07-28  5:43           ` HAGIO KAZUHITO(萩尾 一仁)
  2021-07-29  3:50             ` manty kuma
  0 siblings, 1 reply; 13+ messages in thread
From: HAGIO KAZUHITO(萩尾 一仁) @ 2021-07-28  5:43 UTC (permalink / raw)
  To: manty kuma; +Cc: kexec-ml

-----Original Message-----
> Hi kazuhito san,
> 
> Just following up on my last email.
> Sincere apologies for asking for your time.
> I want to specifically understand what the "user data" section is and
> what it means to exclude it from the dump.

"user data" are anonymous pages or huge pages.
https://github.com/makedumpfile/makedumpfile/blob/master/makedumpfile.c#L6224

Please consult the __exclude_unnecessary_pages() function above for
what conditions correspond to the type of page.

Thanks,
Kazu

> 
> Thank you very much.
> 
> Best Regards,
> Manty
> 
> On Fri, Jul 9, 2021 at 10:45 AM manty kuma <mantykuma@gmail.com> wrote:
> >
> > Hi Kazuhito san,
> >
> > I am looking to better understand the sections being filtering out
> > with each of the following options.
> >
> > Zero page:
> > Pages that are empty. Ignoring these pages won't have any impact on analysis.
> >
> > non-private cache and private cache:
> > What exactly are these sections of memory? Just a one-line overview
> > about them is sufficient.
> > (My understanding was that cache is not part of RAM. Is this cache
> > something else? Like some bookkeeping data maintained by the kernel?)
> >
> >
> > user data:
> > Are these sections of the memory for the user space processes/memory
> > sections allocated using malloc?
> > My understanding is that If I exclude this section, gcore would not
> > work. Is my understanding correct?
> > I expected this section to be big. But in fact excluding this did not
> > have much impact on the dump size.
> >
> > free page:
> > unallocated pages. Since they are not allocated. filtering them out
> > won't have any impact on dump analysis.
> > Please correct me if I am wrong.
> >
> >
> > If there is already some place that explains what these sections
> > filter out, please just drop the reference to them and i will look
> > into it.
> > Thank you very much in advance!
> >
> > Manty
> >
> > On Thu, Jul 8, 2021 at 8:17 PM manty kuma <mantykuma@gmail.com> wrote:
> > >
> > > Sorry. I am not sure how but I completely missed this email.
> > > Yes, /tmp was not available in my env. I just did mkdir before
> > > executing `makedumpfile` and it is now working well.
> > > Thank you very much.
> > >
> > > On Mon, Jun 28, 2021 at 4:07 PM HAGIO KAZUHITO(萩尾 一仁)
> > > <k-hagio-ab@nec.com> wrote:
> > > >
> > > > -----Original Message-----
> > > > > Hi Kazuhito san,
> > > > >
> > > > > I am getting the following error when trying to use makedumpfile utility.
> > > > >
> > > > > > copy_vmcoreinfo: Can't open the vmcoreinfo file(/tmp/vmcoreinfoLUQc25). No such file or directory.
> > > > > > makedumpfile Failed
> > > > >
> > > > > In your setup how are you providing the vmcoreinfo file? In my case it
> > > > > is checking /tmp/vmcoreinfoLUQc25
> > > > > Who generates this file?
> > > >
> > > > Generally, vmcoreinfo is copied from vmcore's ELF note to /tmp/vmcoreinfoXXXXXX
> > > > by makedumpfile, please see copy_vmcoreinfo().  So no need to provide explicitly.
> > > >
> > > > Is there the /tmp directory on your environment?
> > > >
> > > > Kazu
> > > >
> > > >
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Compiling makedumpfile from source
  2021-07-28  5:43           ` HAGIO KAZUHITO(萩尾 一仁)
@ 2021-07-29  3:50             ` manty kuma
  0 siblings, 0 replies; 13+ messages in thread
From: manty kuma @ 2021-07-29  3:50 UTC (permalink / raw)
  To: HAGIO KAZUHITO(萩尾 一仁); +Cc: kexec-ml

Thank you Kazuhito san.
I will check the mentioned source.

Manty

On Wed, Jul 28, 2021 at 2:43 PM HAGIO KAZUHITO(萩尾 一仁)
<k-hagio-ab@nec.com> wrote:
>
> -----Original Message-----
> > Hi kazuhito san,
> >
> > Just following up on my last email.
> > Sincere apologies for asking for your time.
> > I want to specifically understand what the "user data" section is and
> > what it means to exclude it from the dump.
>
> "user data" are anonymous pages or huge pages.
> https://github.com/makedumpfile/makedumpfile/blob/master/makedumpfile.c#L6224
>
> Please consult the __exclude_unnecessary_pages() function above for
> what conditions correspond to the type of page.
>
> Thanks,
> Kazu
>
> >
> > Thank you very much.
> >
> > Best Regards,
> > Manty
> >
> > On Fri, Jul 9, 2021 at 10:45 AM manty kuma <mantykuma@gmail.com> wrote:
> > >
> > > Hi Kazuhito san,
> > >
> > > I am looking to better understand the sections being filtering out
> > > with each of the following options.
> > >
> > > Zero page:
> > > Pages that are empty. Ignoring these pages won't have any impact on analysis.
> > >
> > > non-private cache and private cache:
> > > What exactly are these sections of memory? Just a one-line overview
> > > about them is sufficient.
> > > (My understanding was that cache is not part of RAM. Is this cache
> > > something else? Like some bookkeeping data maintained by the kernel?)
> > >
> > >
> > > user data:
> > > Are these sections of the memory for the user space processes/memory
> > > sections allocated using malloc?
> > > My understanding is that If I exclude this section, gcore would not
> > > work. Is my understanding correct?
> > > I expected this section to be big. But in fact excluding this did not
> > > have much impact on the dump size.
> > >
> > > free page:
> > > unallocated pages. Since they are not allocated. filtering them out
> > > won't have any impact on dump analysis.
> > > Please correct me if I am wrong.
> > >
> > >
> > > If there is already some place that explains what these sections
> > > filter out, please just drop the reference to them and i will look
> > > into it.
> > > Thank you very much in advance!
> > >
> > > Manty
> > >
> > > On Thu, Jul 8, 2021 at 8:17 PM manty kuma <mantykuma@gmail.com> wrote:
> > > >
> > > > Sorry. I am not sure how but I completely missed this email.
> > > > Yes, /tmp was not available in my env. I just did mkdir before
> > > > executing `makedumpfile` and it is now working well.
> > > > Thank you very much.
> > > >
> > > > On Mon, Jun 28, 2021 at 4:07 PM HAGIO KAZUHITO(萩尾 一仁)
> > > > <k-hagio-ab@nec.com> wrote:
> > > > >
> > > > > -----Original Message-----
> > > > > > Hi Kazuhito san,
> > > > > >
> > > > > > I am getting the following error when trying to use makedumpfile utility.
> > > > > >
> > > > > > > copy_vmcoreinfo: Can't open the vmcoreinfo file(/tmp/vmcoreinfoLUQc25). No such file or directory.
> > > > > > > makedumpfile Failed
> > > > > >
> > > > > > In your setup how are you providing the vmcoreinfo file? In my case it
> > > > > > is checking /tmp/vmcoreinfoLUQc25
> > > > > > Who generates this file?
> > > > >
> > > > > Generally, vmcoreinfo is copied from vmcore's ELF note to /tmp/vmcoreinfoXXXXXX
> > > > > by makedumpfile, please see copy_vmcoreinfo().  So no need to provide explicitly.
> > > > >
> > > > > Is there the /tmp directory on your environment?
> > > > >
> > > > > Kazu
> > > > >
> > > > >

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Compiling makedumpfile from source
       [not found] ` <CAB6A5-DEHa22MF8itbqkRiOC3TE2KZo6yLPE23Kb5ci=80VJXw@mail.gmail.com>
@ 2021-06-11  8:38   ` manty kuma
  0 siblings, 0 replies; 13+ messages in thread
From: manty kuma @ 2021-06-11  8:38 UTC (permalink / raw)
  To: HAGIO KAZUHITO(萩尾 一仁); +Cc: kexec-ml

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@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@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@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
>> > >

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Compiling makedumpfile from source
  2021-06-11  3:19 ` manty kuma
@ 2021-06-11  5:04   ` manty kuma
  0 siblings, 0 replies; 13+ messages in thread
From: manty kuma @ 2021-06-11  5:04 UTC (permalink / raw)
  To: HAGIO KAZUHITO(萩尾 一仁); +Cc: kexec-ml

I removed existing libzstd and installed the latest one from

Now, elfutils compiles fine.


But when compiling makedumpfile i have following issue:
```
makedumpfile (master) $ make LINKTYPE=dynamic
cc  -g -O2 -Wall -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -DVERSION='"1.6.9++"' -DRELEASE_DATE='"13 May
2021"' -D__x86_64__   print_info.o dwarf_info.o elf_info.o
erase_info.o sadump_info.o cache.o tools.o printk.o arch/arm.o
arch/arm64.o arch/x86.o arch/x86_64.o arch/ia64.o arch/ppc64.o
arch/s390x.o arch/ppc.o arch/sparc64.o arch/mips64.o -rdynamic -o
makedumpfile makedumpfile.c -ldw -lbz2 -ldl -lelf -lz -lpthread  -lebl
//usr/local/lib/libdw.a(lzma.o): In function `__libdw_unlzma':
/home/mujin/temp/elfutils-0.182/libdwfl/gzip.c:308: undefined
reference to `lzma_auto_decoder'
/home/mujin/temp/elfutils-0.182/libdwfl/gzip.c:323: undefined
reference to `lzma_end'
/home/mujin/temp/elfutils-0.182/libdwfl/gzip.c:342: undefined
reference to `lzma_code'
/home/mujin/temp/elfutils-0.182/libdwfl/gzip.c:352: undefined
reference to `lzma_end'
/home/mujin/temp/elfutils-0.182/libdwfl/gzip.c:311: undefined
reference to `lzma_end'
/home/mujin/temp/elfutils-0.182/libdwfl/gzip.c:352: undefined
reference to `lzma_end'
/home/mujin/temp/elfutils-0.182/libdwfl/gzip.c:352: undefined
reference to `lzma_end'
//usr/local/lib/libdw.a(zstd.o): In function `__libdw_unzstd':
/home/mujin/temp/elfutils-0.182/libdwfl/gzip.c:245: undefined
reference to `ZSTD_createDCtx'
/home/mujin/temp/elfutils-0.182/libdwfl/gzip.c:257: undefined
reference to `ZSTD_freeDCtx'
/home/mujin/temp/elfutils-0.182/libdwfl/gzip.c:278: undefined
reference to `ZSTD_decompressStream'
/home/mujin/temp/elfutils-0.182/libdwfl/gzip.c:280: undefined
reference to `ZSTD_isError'
/home/mujin/temp/elfutils-0.182/libdwfl/gzip.c:292: undefined
reference to `ZSTD_isError'
/home/mujin/temp/elfutils-0.182/libdwfl/gzip.c:294: undefined
reference to `ZSTD_freeDCtx'
/home/mujin/temp/elfutils-0.182/libdwfl/gzip.c:296: undefined
reference to `ZSTD_isError'
/home/mujin/temp/elfutils-0.182/libdwfl/gzip.c:269: undefined
reference to `ZSTD_freeDCtx'
collect2: error: ld returned 1 exit status
Makefile:100: recipe for target 'makedumpfile' failed
make: *** [makedumpfile] Error 1
```

Regards,
Manty

On Fri, Jun 11, 2021 at 12:19 PM manty kuma <mantykuma@gmail.com> wrote:
>
> 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.
>
> ----------------------------------------
> 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@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
> >

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Compiling makedumpfile from source
@ 2021-06-11  5:00 HAGIO KAZUHITO(萩尾 一仁)
       [not found] ` <CAB6A5-DEHa22MF8itbqkRiOC3TE2KZo6yLPE23Kb5ci=80VJXw@mail.gmail.com>
  0 siblings, 1 reply; 13+ messages in thread
From: HAGIO KAZUHITO(萩尾 一仁) @ 2021-06-11  5:00 UTC (permalink / raw)
  To: manty kuma; +Cc: kexec-ml

-----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@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
> >
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Compiling makedumpfile from source
  2021-06-11  1:13 HAGIO KAZUHITO(萩尾 一仁)
@ 2021-06-11  3:19 ` manty kuma
  2021-06-11  5:04   ` manty kuma
  0 siblings, 1 reply; 13+ messages in thread
From: manty kuma @ 2021-06-11  3:19 UTC (permalink / raw)
  To: HAGIO KAZUHITO(萩尾 一仁); +Cc: kexec-ml

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.

----------------------------------------
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@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
>

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: Compiling makedumpfile from source
@ 2021-06-11  1:13 HAGIO KAZUHITO(萩尾 一仁)
  2021-06-11  3:19 ` manty kuma
  0 siblings, 1 reply; 13+ messages in thread
From: HAGIO KAZUHITO(萩尾 一仁) @ 2021-06-11  1:13 UTC (permalink / raw)
  To: manty kuma, kexec-ml

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

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-07-29  3:50 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-11  9:07 Compiling makedumpfile from source HAGIO KAZUHITO(萩尾 一仁)
2021-06-28  6:31 ` manty kuma
2021-06-28  7:07   ` HAGIO KAZUHITO(萩尾 一仁)
2021-07-08 11:17     ` manty kuma
2021-07-09  1:45       ` manty kuma
2021-07-27  5:54         ` manty kuma
2021-07-28  5:43           ` HAGIO KAZUHITO(萩尾 一仁)
2021-07-29  3:50             ` manty kuma
  -- strict thread matches above, loose matches on Subject: below --
2021-06-11  5:00 HAGIO KAZUHITO(萩尾 一仁)
     [not found] ` <CAB6A5-DEHa22MF8itbqkRiOC3TE2KZo6yLPE23Kb5ci=80VJXw@mail.gmail.com>
2021-06-11  8:38   ` manty kuma
2021-06-11  1:13 HAGIO KAZUHITO(萩尾 一仁)
2021-06-11  3:19 ` manty kuma
2021-06-11  5:04   ` manty kuma

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.