Update and workaround here: https://github.com/weidai11/cryptopp/issues/1160
On Wednesday, September 21, 2022 at 3:41:53 PM UTC+8 Cameron G wrote: > Hi, I'm receiving a segfault on iOS Simulator (x86_64) in some trivial > code that works on other platforms. I think I may have built the library > incorrectly, but I followed the wiki instructions and tried various > combinations. The segfault happens when declaring > > CryptoPP::AutoSeededRandomPool rng; > > The stack frame is > [image: Screen Shot 2022-09-21 at 3.29.55 PM.png] > > Here's how I built the library: > > IOS_SDK=iPhoneSimulator IOS_CPU=x86_64 source ./setenv-ios.sh > Configuring for iPhoneSimulator (x86_64) > XCODE_TOOLCHAIN: > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ > IOS_SDK: iPhoneSimulator > IOS_CPU: x86_64 > IOS_CPPFLAGS: -DCRYPTOPP_DISABLE_ASM > IOS_CFLAGS: -arch x86_64 -miphonesimulator-version-min=6 -fno-common > IOS_CXXFLAGS: -arch x86_64 -miphonesimulator-version-min=6 -stdlib=libc++ > -fno-common > IOS_SYSROOT: > /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.5.sdk > > > ******************************************************************************* > It looks the the environment is set correctly. Your next step is build > the library with 'make -f GNUmakefile-cross'. > > ******************************************************************************* > > Then, I ran 'make -f GNUmakefile-cross' : > Here's what we found... IS_X86: 0, IS_X64: 1, IS_ARM32: 0, IS_ARMV8: 0 > Using testing flags: -g2 -O3 -fPIC -arch x86_64 > -miphonesimulator-version-min=6 -stdlib=libc++ -fno-common --sysroot > /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.5.sdk > > clang++ -DCRYPTOPP_DISABLE_ASM -isysroot > /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.5.sdk > > -Wall -g2 -O3 -fPIC -arch x86_64 -miphonesimulator-version-min=6 > -stdlib=libc++ -fno-common --sysroot > /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.5.sdk > > -Wall -c cryptlib.cpp > > Most of the simulators use x86_64 now - especially iPhone ones, so that's > why I'm compiling for that architecture. > > Thanks for any help! > Cameron > > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/cryptopp-users/e4f1e274-362e-465b-b867-464678782f09n%40googlegroups.com.