dinhvh / libetpan

Mail Framework for C Language
www.etpan.org
Other
612 stars 284 forks source link

unable to build lib on Mac M1 #430

Open jannyProjects opened 1 year ago

jannyProjects commented 1 year ago

I tried to build library for iOS using tutorial from README file but I am getting following error in xCode:

running prepare-cyrus-sasl.sh prepare sources building tools generated makemd5arm64 properly building for iPhoneOS - armv7 log to /libetpan/build-mac/dependencies/build/libsasl/workdir/20230516192856/src/cyrus-sasl-2.1.28-iPhoneOS-armv7/build.log Command ExternalBuildToolExecution failed with a nonzero exit code

and here is a error from log file mentioned above:

building for iPhoneOS - armv7 configure: WARNING: you should use --build, --host, --target configure: creating cache ./config.cache checking build system type... Invalid configuration 16.4armv7': machine16.4armv7' not recognized configure: error: /bin/sh config/config.sub 16.4armv7 failed

OleksiiShvachenko commented 1 year ago

@jannyProjects I fixed that error by updating next line in prepare-cyrus-sasl.sh

-SDK_IOS_VERSION="`xcodebuild -showsdks 2>/dev/null | grep iphoneos | sed 's/.*iphoneos\(.*\)/\1/'`"
+SDK_IOS_VERSION="`xcodebuild -showsdks 2>/dev/null | grep 'sdk iphoneos' | sed 's/.*iphoneos\(.*\)/\1/'`"
jannyProjects commented 1 year ago

@OleksiiShvachenko your fix helped fix the issue. You should create PR :)

Thanx

KodaKoder commented 1 year ago

The fix works indeed Would be possible to compile libetpan also for catalyst?