cURL / Mailing Lists / curl-library / Single Mail

curl-library

Problem when cross compile libcurl(7.21.4) from source on mac

From: ³ÂÌìÖÛ <tianzhouchen_at_gmail.com>
Date: Sat, 2 Apr 2011 23:58:13 -0700

Hi there,

   I am trying to cross compile libcurl. However, I met the error at
"checking whether the C compiler works... no". I have
spent several hours on it and still without luck, so I come here to ask.
Below is my script.

    SDK='/Developer/SDKs/MacOSX10.5.sdk'

        MINVER='-mmacosx-version-min=10.5'

        ARCHES='-arch ppc -arch i386'

./configure --build=x86_64-apple-darwin10.6.0 --host=i386-apple-darwin10.6.0
--target=i386-apple-darwin10.6.0 --disable-dependency-tracking
--enable-static --disable-dynamic --without-gssapi \
    CC="gcc" \
    CFLAGS="-isysroot $SDK $ARCHES $MINVER" \
    LDFLAGS="-Wl,-syslibroot,$SDK $ARCHES $MINVER
-Wl,-headerpad_max_install_names, -lldap"

         As you can see, I am on x86_64_apple-darwin10.6.0 and I am trying
to cross compile the libcurl for i386. However, I always get the error:

checking host system type... i386-apple-darwin10.6.0
checking for style of include used by make... GNU
checking for i386-apple-darwin10.6.0-gcc... /usr/bin/gcc
checking whether the C compiler works... no
configure: error: in `/Users/ryan/Desktop/libcurl/curl-7.21.4':
configure: error: C compiler cannot create executables
See `config.log' for more details

      Hope someone can help. Tack!

Ryan

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-04-03