作者热门文章
- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我正在尝试为 iOS3 和 4 构建 openldap-2.4.23 库,但是当我尝试运行配置时出现错误:
>./configure --disable-slapd --disable-shared --enable-static --host=arm-apple-darwin
configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
Configuring OpenLDAP 2.4.23-Release ...
checking build system type... i686-apple-darwin10.7.0
checking host system type... arm-apple-darwin
checking target system type... arm-apple-darwin
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for arm-apple-darwin-strip... no
checking for strip... strip
checking configure arguments... configure: WARNING: slapd disabled, ignoring --enable- bdb argument
configure: WARNING: slapd disabled, ignoring --enable-hdb argument
configure: WARNING: slapd disabled, ignoring --enable-monitor argument
configure: WARNING: slapd disabled, ignoring --enable-relay argument
configure: WARNING: slapd disabled, ignoring --enable-syncprov argument
done
checking for style of include used by make... GNU
checking for arm-apple-darwin-gcc... /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.
我的环境设置是这样的:
export DEVROOT="/Developer/Platforms/iPhoneOS.platform/Developer"
export SDKROOT="/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk"
export CC="${DEVROOT}/usr/bin/gcc"
export LD="${DEVROOT}/usr/bin/ld"
export AR="${DEVROOT}/usr/bin/ar"
export AS="${DEVROOT}/usr/bin/as"
export NM="${DEVROOT}/usr/bin/nm"
export CPPFLAGS="-I${SDKROOT}/usr/lib/gcc/arm-apple-darwin10/4.2.1/include -I${SDKROOT}/usr/include"
export CPP="${DEVROOT}/usr/bin/cpp ${CPPFLAGS}"
export CFLAGS="${CPPFLAGS} -arch armv6 -pipe -no-cpp-precomp"
export LDFLAGS="-L${SDKROOT}/usr/lib"
顺便说一句,修改CFLAGS和LDFALGS后我配置成功了,如下:
export CFLAGS="${CPPFLAGS} -pipe -no-cpp-precomp"
export LDFLAGS=""
但是,make 和 make install 的结果不是 armv 架构:
> lipo -detailed_info libldap.a
input file libldap.a is not a fat file
Non-fat file: libldap.a is architecture: i386
如何构建 armv6 架构的 openldap 库?任何人,请帮助!!
谢谢。
最佳答案
这对您来说可能有点晚,但是我使用 Xcode 将 OpenLDAP 移植到了 iOS。该项目可以从 github 克隆。 https://github.com/bindle/iOSPorts
项目中有一些文档和例子。
关于iphone - 如何在 OSX 上为 iphone 构建一个 openldap 库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5643752/
我是一名优秀的程序员,十分优秀!