#78 closed defect (fixed)

gcc-4.7.0 compile failure on Fedora: "CheckSize"

Reported by: warner Owned by:
Priority: major Milestone: 0.6.0
Version: 0.5.29 Keywords:
Cc: Launchpad Bug:

Description

Ruben's buildslave (recently back from a world tour of intra-buildbot-incompatibilities) is throwing compiler errors:

https://tahoe-lafs.org/buildbot-pycryptopp/builders/Ruben%20Fedora/builds/1/steps/compile/logs/stdio

gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I. -I/usr/include/python2.7 -c embeddedcryptopp/cpu.cpp -o build/temp.linux-x86_64-2.7/embeddedcryptopp/cpu.o -w
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I. -I/usr/include/python2.7 -c embeddedcryptopp/pubkey.cpp -o build/temp.linux-x86_64-2.7/embeddedcryptopp/pubkey.o -w
In file included from embeddedcryptopp/integer.h:7:0,
                 from embeddedcryptopp/modarith.h:8,
                 from embeddedcryptopp/pubkey.h:35,
                 from embeddedcryptopp/pubkey.cpp:7:
embeddedcryptopp/secblock.h: In instantiation of ‘CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Align16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const void*) [with T = long long unsigned int; bool T_Align16 = false; CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer = long long unsigned int*; CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type = long unsigned int]’:
embeddedcryptopp/secblock.h:285:23:   required from ‘CryptoPP::SecBlock<T, A>::SecBlock(const CryptoPP::SecBlock<T, A>&) [with T = long long unsigned int; A = CryptoPP::AllocatorWithCleanup<long long unsigned int>]’
embeddedcryptopp/modarith.h:122:7:   required from here
embeddedcryptopp/secblock.h:97:3: error: ‘CheckSize’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
embeddedcryptopp/secblock.h:97:3: note: declarations in dependent base ‘CryptoPP::AllocatorBase<long long unsigned int>’ are not found by unqualified lookup
embeddedcryptopp/secblock.h:97:3: note: use ‘this->CheckSize’ instead
embeddedcryptopp/secblock.h: In instantiation of ‘CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Align16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const void*) [with T = unsigned char; bool T_Align16 = false; CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer = unsigned char*; CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type = long unsigned int]’:
embeddedcryptopp/secblock.h:283:19:   required from ‘CryptoPP::SecBlock<T, A>::SecBlock(CryptoPP::SecBlock<T, A>::size_type) [with T = unsigned char; A = CryptoPP::AllocatorWithCleanup<unsigned char>; CryptoPP::SecBlock<T, A>::size_type = long unsigned int]’
embeddedcryptopp/algparam.h:17:2:   required from here
embeddedcryptopp/secblock.h:97:3: error: ‘CheckSize’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
embeddedcryptopp/secblock.h:97:3: note: declarations in dependent base ‘CryptoPP::AllocatorBase<unsigned char>’ are not found by unqualified lookup
embeddedcryptopp/secblock.h:97:3: note: use ‘this->CheckSize’ instead
error: command 'gcc' failed with exit status 1

Attachments (1)

gcc4.7.diff (3.8 KB) - added by warner at 2012-01-06T20:07:08Z.
patch to fix gcc-4.7.0 compatibility

Download all attachments as: .zip

Change History (10)

comment:1 Changed at 2012-01-06T17:52:35Z by warner

  • Summary changed from compile failure on Fedora: "CheckSize" to gcc-4.7.0 compile failure on Fedora: "CheckSize"

Ruben reports that this system (Fedora 'rawhide', their bleeding-edge distribution) is using the upcoming gcc-4.7.0 .

comment:2 Changed at 2012-01-06T17:55:40Z by warner

gcc-4.7.0 is not yet released, but is in "Stage 3 freeze" (http://gcc.gnu.org/ml/gcc/2011-12/msg00069.html). It doesn't appear to be in debian/sid yet.

comment:3 Changed at 2012-01-06T18:53:34Z by warner

Ruben noticed that this is probably a known bug: cryptopp is on a list of Fedora packages known to break against gcc-4.7.0:

http://lists.fedoraproject.org/pipermail/devel/2011-December/160723.html

It looks like the cryptopp header files are relying upon an out-of-C++-spec behavior of gcc that was fixed in gcc-4.7.0, and need to be updated (the error message suggests the fix). I'll try to make a patch that works with our embedded copy, and then we can try to push that upstream (if the fedora cryptopp maintainer hasn't already started that process).

Changed at 2012-01-06T20:07:08Z by warner

patch to fix gcc-4.7.0 compatibility

comment:4 Changed at 2012-01-06T20:07:59Z by warner

That patch fixes the compile problem, and the basic tests pass. (there's still something funky with Ruben's buildslave, I'll track that down separately).

comment:6 Changed at 2012-01-06T20:40:48Z by warner

[0e6467f] fixes this in the embedded copy. To fix it upstream (for 'syslib' builds), we'll have to wait for upstream to fix their ticket-14, make a new release, and then get that release onto the buildslaves.

Version 0, edited at 2012-01-06T20:40:48Z by warner (next)

comment:7 Changed at 2012-01-06T21:07:02Z by warner

  • Milestone set to 0.6.0
  • Resolution set to fixed
  • Status changed from new to closed

Zooko says we can close this now. Yay!

comment:9 Changed at 2012-01-17T23:59:52Z by zooko

Here's the ticket on launchpad that tracks the progress of this bug across various open source projects: https://bugs.launchpad.net/cryptopp/+bug/915018

Note: See TracTickets for help on using tickets.