Building GMP for iOS

I am trying to create GMP for iOS, and I got this setup from someone:

./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 

It is configurable and I can run Make aswell. However, when I try to install it, I only get errors. 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 

I really need gmp to work, and I'm not sure what I'm doing wrong. Please help me.

Make a check:

 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 
+3
source share

Source: https://habr.com/ru/post/909722/


All Articles