From: Patrick Steinhardt <ps@pks.im>
To: Daniel Kiper <dkiper@net-space.pl>
Cc: grub-devel@gnu.org, Olaf Hering <olaf@aepfle.de>,
Paul Menzel <pmenzel@molgen.mpg.de>
Subject: Re: [PATCH 2/2] gnulib: Fix build of base64 when compiling with memory debugging
Date: Mon, 9 Mar 2020 13:01:51 +0100 [thread overview]
Message-ID: <20200309120151.GA40682@ncase> (raw)
In-Reply-To: <20200309111915.bdcyhrynnst37vdz@tomti.i.net-space.pl>
[-- Attachment #1: Type: text/plain, Size: 1892 bytes --]
On Mon, Mar 09, 2020 at 12:19:15PM +0100, Daniel Kiper wrote:
> On Sat, Mar 07, 2020 at 05:29:09PM +0100, Patrick Steinhardt wrote:
> > When building GRUB with memory management debugging enabled, then the
> > build fails because of `grub_debug_malloc()` and `grub_debug_free()`
> > being undefined in the luks2 module. The cause is that we patch
> > "base64.h" to unconditionaly include "config-util.h", which shouldn't be
> > included for modules at all. As a result, `MM_DEBUG` is defined when
> > building the module, causing it to use the debug memory allocation
> > functions. As these are not built into modules, we end up with a linker
> > error.
> >
> > Fix the issue by removing the <config-util.h> include altogether. The
> > sole reason it was included was for the `_GL_ATTRIBUTE_CONST` macro,
> > which we can simply define as empty in case it's not set.
> >
> > Signed-off-by: Patrick Steinhardt <ps@pks.im>
> > ---
> > grub-core/lib/gnulib-patches/fix-base64.patch | 14 ++++++--------
> > 1 file changed, 6 insertions(+), 8 deletions(-)
> >
> > diff --git a/grub-core/lib/gnulib-patches/fix-base64.patch b/grub-core/lib/gnulib-patches/fix-base64.patch
> > index e075b6fab..985db1279 100644
> > --- a/grub-core/lib/gnulib-patches/fix-base64.patch
> > +++ b/grub-core/lib/gnulib-patches/fix-base64.patch
> > @@ -1,14 +1,8 @@
> > diff --git a/lib/base64.h b/lib/base64.h
> > -index 9cd0183b8..a2aaa2d4a 100644
> > +index 9cd0183b8..185a2afa1 100644
> > --- a/lib/base64.h
> > +++ b/lib/base64.h
> > -@@ -18,11 +18,16 @@
> > - #ifndef BASE64_H
> > - # define BASE64_H
>
> Hmmm... It seems to me that you should not drop this...
Note that this is a diff of a patch. So all that's getting dropped is
the patch that added the #include. So after applying this, "base64.h"
doesn't get touched by fix-base64.patch at all anymore.
Patrick
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2020-03-09 12:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-07 16:29 [PATCH 0/2] build: Fixes for memory-debugging builds Patrick Steinhardt
2020-03-07 16:29 ` [PATCH 1/2] build: Fix option to explicitly disable memory debugging Patrick Steinhardt
2020-03-09 11:09 ` Daniel Kiper
2020-03-09 11:18 ` Paul Menzel
2020-03-09 12:22 ` Patrick Steinhardt
2020-03-09 12:31 ` Daniel Kiper
2020-03-07 16:29 ` [PATCH 2/2] gnulib: Fix build of base64 when compiling with " Patrick Steinhardt
2020-03-09 11:19 ` Daniel Kiper
2020-03-09 12:01 ` Patrick Steinhardt [this message]
2020-03-09 12:14 ` Daniel Kiper
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=20200309120151.GA40682@ncase \
--to=ps@pks.im \
--cc=dkiper@net-space.pl \
--cc=grub-devel@gnu.org \
--cc=olaf@aepfle.de \
--cc=pmenzel@molgen.mpg.de \
/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.