3

I am trying to build GMP for iOS and i got this configure 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 configures and i can run Make aswell. However, when i try to install it I get nothing but 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 am not sure what im doing wrong. Please help me.

Make 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
zoul
  • 102,279
  • 44
  • 260
  • 354
chikuba
  • 4,229
  • 6
  • 43
  • 75
  • I succeded: ./configure \ CC="$IOS/usr/bin/gcc-4.2" \ CXX="$IOS/usr/bin/g++-4.2" \ CPP="$IOS/usr/bin/gcc-4.2 -E" \ LD="$IOS/usr/bin/ld" \ CPPFLAGS="-arch i386 -isysroot $IOS/SDKs/iPhoneSimulator4.2.sdk -miphoneos-version-min=4.2" \ AR="$IOS/usr/bin/ar" \ NM="$IOS/usr/bin/nm" \ NMEDIT="$IOS/usr/bin/nmedit" \ LIBTOOL="$IOS/usr/bin/libtool" \ LIPO="$IOS/usr/bin/lipo" \ OTOOL="$IOS/usr/bin/otool" \ RANLIB="$IOS/usr/bin/ranlib" \ STRIP="$IOS/usr/bin/strip" \ --disable-shared --enable-static --prefix=$IOS/usr/local \ --host=none-apple-darwin10 – chikuba Aug 23 '11 at 05:54
  • Thank you for saving my life :) – Porizm Jan 30 '20 at 13:53
  • Ah I'm happy this helped someone :D I knew I couldn't have been alone with this issue haha – chikuba Jan 21 '21 at 10:52

0 Answers0