[Botan-devel] Linux compilation issue - secmem.h

Jack Lloyd lloyd at randombit.net
Wed May 19 09:28:47 EDT 2010


On Sat, May 15, 2010 at 01:20:50PM -0700, William K. Foster wrote:
> Hello,
> 
> I find I am getting the same compiler issue first report in June 2007 to
> this list to which it appears no resolution was posted:
> 
> http://lists.randombit.net/pipermail/botan-devel/2007-June/000372.html
> 
> I am using the stock code out of the box for v1.8.8 and am using gcc 3.4.6
> on 32 bit Centos 4.
> 
> ../../src/Botan-1.8.8/build/include/botan/secmem.h: In member function
> `Botan::MemoryVector<T>& Botan::MemoryVector<T>::operator=(const
> Botan::MemoryRegion<T>&)':
> ../../src/Botan-1.8.8/build/include/botan/secmem.h:310: error: missing
> template arguments before '(' token
> ../../src/Botan-1.8.8/build/include/botan/secmem.h: In constructor
> `Botan::MemoryVector<T>::MemoryVector(const T*, Botan::u32bit)':
> ../../src/Botan-1.8.8/build/include/botan/secmem.h:326: error: missing
> template arguments before '(' token
> 
> When I ran the python configure I had to pass:
> --with-tr1-implementation=none or it would not compile out of the box.  I
> also ran 'make check' successfully and 'check --validate'

This seems strange, especially if the test application builds. Are you
sure there is no macro defined in your application and/or headers that
is is including that might be garbling the source? (Run gcc with the
-E option and look at the preprocessed source). That this only seems
to affect calls named 'set' is suggestive. Another easy test would
be to put something like

#ifdef set
  #error "Who defines a macro named 'set'?"
#endif

at the top of secmem.h and see if that triggers.

The only other thing I can think of: try prefixing MemoryRegion<T>::
to each of the calls that is failing. Maybe this is just a template
bug in this particular version of gcc. But I'm definitely suspecting
some sort of macro problem.

-Jack



More information about the botan-devel mailing list