Re: [Nbd] [PATCH] build: Fix build with older gcc
- To: Eric Blake <eblake@...696...>
- Cc: nbd-general@lists.sourceforge.net
- Subject: Re: [Nbd] [PATCH] build: Fix build with older gcc
- From: Wouter Verhelst <w@...112...>
- Date: Tue, 20 Dec 2016 15:12:21 +0100
- Message-id: <20161220141221.sikraoo2vsi4pedh@...3...>
- In-reply-to: <d35f7dc7-f762-87cc-c919-de6928569791@...696...>
- References: <20161219221550.27926-1-eblake@...696...> <fc8b8d46-b50a-85ed-cd3c-fd6c4bf1e350@...696...> <20161220082818.xjxiwc5wd62mlckv@...3...> <d35f7dc7-f762-87cc-c919-de6928569791@...696...>
On Tue, Dec 20, 2016 at 08:02:33AM -0600, Eric Blake wrote:
> On 12/20/2016 02:28 AM, Wouter Verhelst wrote:
> > On Mon, Dec 19, 2016 at 04:23:01PM -0600, Eric Blake wrote:
> >> On 12/19/2016 04:15 PM, Eric Blake wrote:
> >>> gcc 4.4.7 (hello RHEL 6) complains about redefinition of typedefs,
> >>> as in:
> >>>
> >>> gcc -std=gnu99 -DHAVE_CONFIG_H -I. -DSYSCONFDIR='"/usr/local/etc"' -g -O2 -g -O2 -MT nbd_client-buffer.o -MD -MP -MF .deps/nbd_client-buffer.Tpo -c -o nbd_client-buffer.o `test -f 'buffer.c' || echo './'`buffer.c
> >>> buffer.c:39: error: redefinition of typedef ‘buffer_t’
> >>> buffer.h:31: note: previous declaration of ‘buffer_t’ was here
> >>>
> >>> The .c file only has to declare the struct being typedef'd, not
> >>> repeat the typedef declaration.
> >>>
> >>> Signed-off-by: Eric Blake <eblake@...696...>
> >>> ---
> >>> buffer.c | 4 ++--
> >>> crypto-gnutls.c | 4 ++--
> >>> 2 files changed, 4 insertions(+), 4 deletions(-)
> >>
> >> With this patch, I was able to run 'make check' on my RHEL 6 machine,
> >> with its older gnutls-devel-2.12.23-17.el6.x86_64. There were two test
> >> failures, both related to the recent STARTTLS additions, but I don't
> >> have enough time or tls experience to try and debug them today. It may
> >> just be a bug in the testsuite, not prepared to handle the difference
> >> between older and modern gnutls.
> >
> > I was working on finalising the TLS support last night, and there may
> > have been a few moments where I pushed some commits that broke the build
> > in similar ways. The final version should work, though.
> >
> > Can you verify if the problem persists with today's git HEAD?
>
> The compilation failure due to redefinition of typedefs is still present
> in the 3.15.1 release.
Yes, I forgot about that part, sorry.
> The testsuite failures of ./tls and ./tlshuge are likewise still
> present, so it's definitely something related to the older gnutls version.
Okay, I'll see if I can fire up a RHEL6 VM then, and see if I can
reproduce/fix it.
Regards,
--
< ron> I mean, the main *practical* problem with C++, is there's like a dozen
people in the world who think they really understand all of its rules,
and pretty much all of them are just lying to themselves too.
-- #debian-devel, OFTC, 2016-02-12
Reply to: