On 7/27/05, Jozef Matula <[EMAIL PROTECTED]> wrote:
> 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 :-).
Ahh, thanks. This works for me:
$ cd TestVectors
$ cp panama.txt panama.txt.orig
$ tr -d '\r' < panama.txt.orig > panama.txt
$ cp whrlpool.txt whrlpool.txt.orig
$ tr -d '\r' < whrlpool.txt.orig > whrlpool.txt
> 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).
Hmm, it seems to work fine for me with GCC 4. However, I get
Testing operating system provided blocking random number generator...
FAILED: it took 13 seconds to generate 1 bytes
> 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 .
> ======== 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 =========
Neat, except that you miss out the
#ifdef WORD64_AVAILABLE
...
#endif
around some of the instantiations. Special-casing this and avoiding
the sort would probably work. However, instead of putting
#ifndef CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES
...
#endif
around the instantiation, I have simply put a
#undef CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES
at the top of dll.cpp, and (so far manually) put eg.
template class CRYPTOPP_DLL AbstractEuclideanDomain<Integer>;
in dll.cpp.
It seems we are getting there! With a combination of the above, I
think I can make an automated workaround.
Cheers,
--
Jens Peter Secher
_DD6A 05B0 174E BFB2 D4D9 B52E 0EE5 978A FE63 E8A1 jpsecher gmail com_