我正在尝试为iOS3和4构建openldap-2.4.23库,但在运行configure时出现错误:
顺便说一下,我成功地进行了配置,修改了以下CFLAGS和LDFALGS:
然而,make和make install的结果并非armv架构:
我该如何构建ARMv6架构的OpenLDAP库? 有人能帮忙吗! 谢谢。
>./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库? 有人能帮忙吗! 谢谢。