Question

While building libetpan for iOS-ARM64,

I've been added logging functionality on prepare script on libetpan for mac project. Xcode fails with strange error, only during build ARM64 target. Here's the xcode log below:

configuring
running prepare-cyrus-sasl.sh
prepare sources
patching file lib/client.c
building tools
generated makemd5i386 properly

building for iPhoneOS - armv7
CPPFLAGS=-arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk
CFLAGS=-arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk -Os -miphoneos-version-min=7.0
./configure --host=arm --prefix=/Users/user/Developer/Workspace/myapp/libetpan/build-mac/dependencies/build/libsasl/workdir/20140417150520/tmp/build/cyrus-sasl-2.1.25/iPhoneOS7.1armv7 --enable-shared=no --enable-static=yes --with-pam=/Users/user/Developer/Workspace/MyApp/libetpan/build-mac/dependencies/build/libsasl/workdir/20140417150520/tmp/build/openpam-20071221/universal --enable-otp=no --enable-digest=no --with-des=no --enable-login

building for iPhoneOS - armv7s
CPPFLAGS=-arch armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk
CFLAGS=-arch armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk -Os -miphoneos-version-min=7.0
./configure --host=arm --prefix=/Users/user/Developer/Workspace/myapp/libetpan/build-mac/dependencies/build/libsasl/workdir/20140417150520/tmp/build/cyrus-sasl-2.1.25/iPhoneOS7.1armv7s --enable-shared=no --enable-static=yes --with-pam=/Users/user/Developer/Workspace/myapp/libetpan/build-mac/dependencies/build/libsasl/workdir/20140417150520/tmp/build/openpam-20071221/universal --enable-otp=no --enable-digest=no --with-des=no --enable-login

building for iPhoneOS - arm64
CPPFLAGS=-arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk
CFLAGS=-arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk -Os -miphoneos-version-min=7.0
./configure --host=arm --prefix=/Users/user/Developer/Workspace/myapp/libetpan/build-mac/dependencies/build/libsasl/workdir/20140417150520/tmp/build/cyrus-sasl-2.1.25/iPhoneOS7.1arm64 --enable-shared=no --enable-static=yes --with-pam=/Users/user/Developer/Workspace/myapp/libetpan/build-mac/dependencies/build/libsasl/workdir/20140417150520/tmp/build/openpam-20071221/universal --enable-otp=no --enable-digest=no --with-des=no --enable-login
CONFIGURE FAILED.

The build script generated its own build log file. It ends with "Malformed object" message like below:

ar cru .libs/libsasldb.a db_ndbm.o allockey.o
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ranlib: object: .libs/libsasldb.a(allockey.o) malformed object (unknown load command 1)
ar: internal ranlib command failed
make[2]: *** [libsasldb.a] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Any ideas? Thanks in advance.

Was it helpful?

Solution

I ran into the same problem after updating iPhone SDK from 7.0 to 7.1. I fixed it by changing ranlib and ar paths, they were pointing to some old version of those applications (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ranlib and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar).

I changed the path to: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top