Hello Jens,

On Wednesday 27 July 2005 10:47, Jens Peter Secher wrote:
> Yes, I have now made Crypto++ 5.2.1 compile and link with GCC 4.0,
> using those and Jozef Matula's ideas.  However, half of the test suite
> now fails.  When I have figured out why, I will send a patch here.
> (And then port it to Debian).

You're right, test suite for 5.2.1 fails, but for me, it was sufficient to 
convert CRLF -> CR. Curiously in 5.3 line endings are only CR :-).
After conversion everything works fine (for me) (except assert in Camellia ECB 
test which also crashes in 5.3, and also in 5.2.1 compiled with GCC 3.4/3.2).

I have still problem with crosscompiling of crypto++ for ia64-redhat, so 
meanwhile I abstracted my patch into "more usefull" script which is doing 
quite same thing, but doesn't depend on version of source code, and now it 
uses already defined CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES to skip explicit 
instantiation.

To patch all header files run something like:

for f in *.h; do mv $f $f.bak; awk -f cryptopp_dynamize.awk $f.bak 1>$f 2>> 
list; done; sort list > slist

Then include contents of generated "slist" somewhere into dll.cpp into 
conditional #if __GNUC__ > 3 .

I know, this is not appliable as a Debian's .diff patch, but may help while 
playing with compilation.

Regards,
Jozef Matula

======== cryptopp_dynamize.awk BEGIN =======
BEGIN{ ST=0 }
/^[ \t]*CRYPTOPP_(DLL|STATIC)_TEMPLATE_CLASS/ { 
        if(ST==0) {
                print "#ifndef CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES"
                ST=1
        }
        print
        gsub("CRYPTOPP_(DLL|STATIC)_TEMPLATE_CLASS",
                 "CRYPTOPP_DLL_TEMPLATE_CLASS");
        print > "/dev/stderr"
        next
}
ST==1 {
        ST=0;
        print "#endif // CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES";
}
{ print }
======= cryptopp_dynamize.awk END =========

-- 
IBL Software Engineering, http://www.iblsoft.com  
Mierova 103, 82105 Bratislava, Slovakia

Reply via email to