On Aug 22, 2:44 am, Robin Raymond <[email protected]> wrote: > Xcode v4, compiling cryptopp as a standard C library and linking to it with > as a command line Mac program - just using the xcode standard "default" > xcode projects to build. > > I will be trying Ios too but I'd like to just get it working properly on mac > first. I believe Xcode 4 uses LLVM by default.
Jeff > On Mon, Aug 22, 2011 at 1:37 AM, Jeffrey Walton <[email protected]> wrote: > > > On Aug 21, 6:58 pm, Rob <[email protected]> wrote: > > > I'm on a mac compiling with xcode 4 on Snow Leapord for OS/X build > > > 64bit using cryptopp 5.6.1 > > > > Assertion failed: (memcmp(P, A, 4*WORD_SIZE)==0), function > > > AtomicDivide, file cryptopp/integer.cpp, line 2530. > > > > Related cryptopp code: > > > assert(!T[2] && !T[3] && (T[1] < B[1] || (T[1]==B[1] && > > > T[0]<B[0]))); > > > word P[4]; > > > s_pMul[0](P, Q, B); > > > Add(P, P, T, 4); > > > assert(memcmp(P, A, 4*WORD_SIZE)==0); > > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ fails here > > > > Seems that P has a value of > > > [0] 0x0 > > > [1] 0x4000000000000001 > > > [2] 0x4000000000000000 > > > [0] 0x0 > > > > Whereas A has a value of > > > [0] 0x0 > > > [1] 0x4000000000000000 > > > [2] 0x4000000000000000 > > > [0] 0x0 > > > > Thus the assertion fails since it's off by 1 in the [1] word array > > > position. > > > > FYI WORD_SIZE is set to "8" in that code. > > > > My test code: > > > > AutoSeededRandomPool rnd; > > > > RSA::PrivateKey rsaPrivate; > > > rsaPrivate.GenerateRandomWithKeySize(rnd, 2048); > > > > Also I had a compile error that I had to fix: > > > > pointer allocate(size_type n, const void * = NULL) > > > { > > > - CheckSize(n); > > > + AllocatorBase<T>::CheckSize(n); > > > > ^ I had to put the "AllocatorBase<T>::" in front of "CheckSize" or it > > > wouldn't see "CheckSize" routine. > > > > Any ideas? > > What compiler are you using? > > > For what its worth, I have not had problems on the command line or in > > Xcode 3.2.x running Snow Leopard or Lion from a MacBook when using > > GCC. > > > Jeff > > > -- > > You received this message because you are subscribed to the "Crypto++ > > Users" Google Group. > > To unsubscribe, send an email to > > [email protected]. > > More information about Crypto++ and this group is available at > >http://www.cryptopp.com.- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the "Crypto++ Users" Google Group. To unsubscribe, send an email to [email protected]. More information about Crypto++ and this group is available at http://www.cryptopp.com.
