Skip Menu |

This queue is for tickets about the Hash-SharedMem CPAN distribution.

Report information
The Basics
Id: 122864
Status: open
Priority: 0/
Queue: Hash-SharedMem

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.005
Fixed in: (no value)



Subject: redefinition of typedef 'U64'
Compilation fails on some of my smokers --- the pattern looks like this happens only on CentOS6 systems with perl >= 5.24.0: ... cc -I/opt/perl-5.27.3/lib/5.27.3/x86_64-linux/CORE -DQHAVE_CLOCK_GETTIME=1 -DQHAVE_FDOPENDIR=1 -DQHAVE_FSTATAT=1 -DQHAVE_GETCWD=1 -DQHAVE_GETPAGESIZE=1 -DQHAVE_GETTIMEOFDAY=1 -DQHAVE_LINKAT=1 -DQHAVE_OPENAT=1 -DQHAVE_PATHCONF=1 -DQHAVE_REALPATH=1 -DQHAVE_SYSCONF=1 -DQHAVE_UNLINKAT=1 -DQWITH_TALLY=1 -DVERSION="0.005" -DXS_VERSION="0.005" -fPIC -c -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -o lib/Hash/SharedMem.o lib/Hash/SharedMem.c lib/Hash/SharedMem.xs:364: error: redefinition of typedef 'U64' /opt/perl-5.27.3/lib/5.27.3/x86_64-linux/CORE/handy.h:179: note: previous declaration of 'U64' was here error building lib/Hash/SharedMem.o from 'lib/Hash/SharedMem.c' at /opt/perl-5.27.3/lib/5.27.3/ExtUtils/CBuilder/Base.pm line 184. ...
Subject: Re: [rt.cpan.org #122864] redefinition of typedef 'U64'
Date: Tue, 22 Aug 2017 08:33:03 +0100
To: Slaven_Rezic via RT <bug-Hash-SharedMem [...] rt.cpan.org>
From: Zefram <zefram [...] fysh.org>
Slaven_Rezic via RT wrote: Show quoted text
>Compilation fails on some of my smokers --- the pattern looks like this >happens only on CentOS6 systems with perl >= 5.24.0:
Yeah, I've already noticed that and fixed it in my repo. The deal is that prior to 5.23.2 the core headers didn't define U64 for modules, so any module needing it had to define it itself. But from 5.23.2 onwards the core does define it, so there's now a duplicate typedef for those modules if they're not updated. A duplicate typedef is legal C11, but not legal C99 or earlier. So this only fails on Perl 5.23.2 or higher with a pre-C11 compiler. The fix is for the module to make its U64 definition dependent on the Perl version. I'm doing this: #if defined(HAS_QUAD) && !PERL_VERSION_GE(5,23,2) typedef U64TYPE U64; #endif /* HAS_QUAD && <5.23.2 */ -zefram