我正在尝试为iOS构建GMP,我从某人那里得到了这个配置:
./configure CC="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2"
CPP="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -E"
LD="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ld"
CPPFLAGS="-arch armv6
-isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk
-miphoneos-version-min=3.0 -DNO_ASM" --disable-shared --enable-static
--prefix=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk
/usr/local --host=none-apple-darwin9
它配置,我可以运行Make aswell。但是,当我尝试安装它时,我得到的只是错误。 make install-recursive
Making install in tests
Making install in .
....
Making install in expr
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
Making install in tune
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
Making install in doc
make[3]: Nothing to be done for `install-exec-am'.
test -z "/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/local/share/info" || .././install-sh -c -d "/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/local/share/info"
mkdir: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk: Permission denied
make[3]: *** [install-info-am] Error 1
make[2]: *** [install-am] Error 2
make[1]: *** [install-recursive] Error 1
make: *** [install] Error 2
我真的需要gmp才能工作,我不确定我做错了什么。请帮我。
进行检查:
bash-3.2$ make check
make check-recursive
Making check in tests
Making check in .
make libtests.la t-bswap t-constants t-count_zeros t-gmpmax t-hightomask t-modlinv t-popc t-parity t-sub
make[4]: `libtests.la' is up to date.
/bin/sh ../libtool --tag=CC --mode=link /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -std=gnu99 -O2 -pedantic -o t-bswap t-bswap.o libtests.la ../libgmp.la
libtool: link: /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2
-std=gnu99 -O2 -pedantic -o t-bswap t-bswap.o ./.libs/libtests.a /Users/X/Downloads/gmp-5.0.2/.libs/libgmp.a ../.libs/libgmp.a
ld: warning: in t-bswap.o, file was built for armv6 which is not the architecture being linked (i386)
ld: warning: in ./.libs/libtests.a, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /Users/X/Downloads/gmp-5.0.2/.libs/libgmp.a, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in ../.libs/libgmp.a, file was built for unsupported file format which is not the architecture being linked (i386)
Undefined symbols:
"_main", referenced from:
start in crt1.10.6.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[4]: *** [t-bswap] Error 1
make[3]: *** [check-am] Error 2
make[2]: *** [check-recursive] Error 1
make[1]: *** [check-recursive] Error 1
make: *** [check] Error 2