www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples

Archive Index This month's Index

Subject: Building for iPhoneSimulator fails (ld: absolute addressing not allowed in slidable image)

Building for iPhoneSimulator fails (ld: absolute addressing not allowed in slidable image)

From: Felix Schulze <code_at_felixschulze.de>
Date: Mon, 01 Feb 2010 20:53:39 +0100

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hello,

i want build libssh2 for the iPhone Simulator.
My Environment:

export DEVROOT=/Developer/Platforms/iPhoneSimulator.platform/Developer
export SDKROOT=$DEVROOT/SDKs/iPhoneSimulator3.1.2.sdk
export CC=$DEVROOT/usr/bin/gcc-4.2
export LD=$DEVROOT/usr/bin/ld
export CPP=$DEVROOT/usr/bin/cpp-4.2
export CXX=$DEVROOT/usr/bin/g++-4.2
export AR=$DEVROOT/usr/bin/ar
export AS=$DEVROOT/usr/bin/as
export NM=$DEVROOT/usr/bin/nm
export CXXCPP=$DEVROOT/usr/bin/cpp-4.2
export RANLIB=$DEVROOT/usr/bin/ranlib
export LDFLAGS="-arch i386 -pipe -no-cpp-precomp -isysroot $SDKROOT"
export CFLAGS="-arch i386 -pipe -no-cpp-precomp -isysroot $SDKROOT"
export CXXFLAGS="-arch i386 -pipe -no-cpp-precomp -isysroot $SDKROOT"

I have builded
gnupg 1.4.10 with: ./configure --prefix=/<path>/iphone-sim
libgpg-error-1.7: ./configure --prefix=/<path>/iphone-sim --enable-shared=no
libcrypt 1.7 with: ./configure --prefix=/<path>/iphone-sim
- --enable-shared=no --with-gpg-error-prefix=/<path>/iphone-sim

and tried to build libssh2-1.2.2 with: ./configure
- --prefix=/<path>/iphone-sim --with-libgcrypt-prefix=/<path>/iphone-sim

But the build fails with:

ld: absolute addressing (perhaps -mdynamic-no-pic) used in
__gcry_mpih_add_n from
/<path>/iphone-sim/lib/libgcrypt.a(mpih-add1-asm.o) not allowed in
slidable image. Use '-read_only_relocs suppress' to enable text relocs
collect2: ld returned 1 exit status
make[2]: *** [libssh2.la] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1

Any Ideas whats happen?

Greetings Felix
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)

iQIcBAEBCAAGBQJLZzFDAAoJEBtICPKLH2EdNVMP+wQdBphh8iGUYADVNSnlz9Pj
jslo6+RtNnr+JWGJxtcm3nAOcbYTuRbyQF+UsYd3ddhqac+sVbydh/82f8/dN9PH
2GhOPAO8gpJDZhDpihpXgb2F+YMftpA8zRQU/hy4Bmxm5zNUkYoQbrSAR20zJYDm
1jHRUizmocFuTkmpJRhc78I5sNUa1z+MogjyByCwLI2IO05cJEiioD9GoYq/hcIU
m5rGsi2eYFCJBIPGzAapXCnQDeQElBQt8okA9fb0b4XK2564ehUVtVwzdjezpUqA
WRj8CiQB5hTjmY8BqX/h1jmOkp7p1wg51Uw48yCzFKNgggHBEN5hwypagBeGZxhO
E8+EqQM7ouf675w5Ugc7d8tEov1ShFKGbQhGfJW5RO7sK+BJIcwcNDZSfQqtlf7A
+Jj+h0yIUxIaWjE8PV/mTCbNV3R0h41GbqnZVP0fxVu7BfkF74lFrgRYXskHwXt2
ZpCBiWwKuM4DtEyO1kp05EvnO8rXzAvOMqnstSe03uHcVQD8pW6g9USbGRanePgN
RJ5givEoz8zEoT1+ClHSjZV61A2FPaqLu+nCt4pqvA18qKjHaXRf9dc1BSW2mWKz
qYc4Z1pdd7JPhkctXmAAIuWqXj+jYeDDEDs3RxIJC+nrjfCrHK08PJE3/2YQKHCd
E+8HOEoMEapBBfNdnpN2
=a/ll
-----END PGP SIGNATURE-----
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-02-01

the libssh2 team