On Monday, December 12, 2016 at 2:36:50 PM UTC-5, Jeffrey Walton wrote: > > On Mon, Dec 12, 2016 at 11:49 AM, <pdohe...@cipherloc.net> wrote: > > So just as a sanity check, I decided to pull the cryptopp lib out by > itself > > and see if I could use that by itself to make sure that the changes I > had > > made before didn't mess with that library. It does not work however and > I > > get completely different errors. When trying to use cryptopp on its > own, I > > get missing symbols for CryptoPP::AlignedAllocate(unsgined long) and > > CryptoPP::AlignedDeallocate(void*). AlignedAllocate is referenced from > > AllocatorwithCleanup<unsigned char, true>::allocate(unsigned long, void > > const*) and AlignedDeallocate is referenced from > > AllocatorWithCleanup<unsigned char, true>::deallocate(void*, unsigned > long). > > The library is built for the right architecture I am testing on, I > checked > > this with lipo -info. I am also using objective C as the language for > this > > test if that makes a difference, although I do not think it does. Any > ideas > > on that one? > > This happens when the library is built with non-SSE and non-NEON > support. AlignedAllocate are AlignedDeallocate are used for 16-byte > aligned allocations. The aligned data buffers are eventually sent to > the SIMD (SSE) or ASIMD (ARM) coprocessors. Use of SSE and NEON can be > disabled with -DCRYPTOPP_DISABLE_ASM, which means AlignedAllocate are > AlignedDeallocate are not needed. > > I usually see it surface under MinGW32 because they {are|were} > building Crypto++ with -DCRYPTOPP_DISABLE_ASM. Later, a user would > come along and not include -DCRYPTOPP_DISABLE_ASM in their CXXFLAGS. > So users wanted AlignedAllocate are AlignedDeallocate, but the library > was shipped without them. > > When I use setenv-ios.sh to build the library from the latest sources, > I get the symbol. The 'T' section is the text section, which means the > symbols are present in the library. > > cryptopp-arm64$ xcrun -sdk iphoneos lipo -info libcryptopp.a > input file libcryptopp.a is not a fat file > Non-fat file: libcryptopp.a is architecture: arm64 > > cryptopp-arm64$ nm libcryptopp.a | c++filt | egrep > '(AlignedAllocate|AlignedDeallocate)' | grep ' T ' > 0000000000000400 T CryptoPP::AlignedAllocate(unsigned long) > 0000000000000430 T CryptoPP::AlignedDeallocate(void*) > > I also performed the exercise for Crypto++ 5.6.4 and 5.6.5, and the > symbols are present too. So its not like there are strings attached to > get the symbols. > > It may be worth noting.... Crypto++ 5.6.3 and earlier used > -DCRYPTOPP_DISABLE_ASM for Clang. It took Uri and I several months to > get the compiler and integrated assembler issues worked out. We could > not remove -DCRYPTOPP_DISABLE_ASM until 5.6.4. > > It sounds like (to me) the Xcode project is not quite right. >
I updated the wiki page at https://www.cryptopp.com/wiki/IOS_(Command_Line). It had some stale information. I'm not sure the changes are going to help with your issue, though. Your issue seems to be related to Xcode CXXFLAGS and LDFLAGS settings. Jeff -- -- You received this message because you are subscribed to the "Crypto++ Users" Google Group. To unsubscribe, send an email to cryptopp-users-unsubscr...@googlegroups.com. More information about Crypto++ and this group is available at http://www.cryptopp.com. --- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to cryptopp-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.