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
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