cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Compile curl with SSL on OS X

From: Scott Haneda <talklists_at_newgeo.com>
Date: Tue, 11 May 2010 22:29:52 -0700

On May 11, 2010, at 8:47 PM, ML wrote:

> I am trying to compile Curl-7.2.1 with SSL support on OS X from terminal.

I just installed curl 7.20.0 on Mac OS X 10.6.3. However, I did so via MacPorts. I added in what are called variants for: ares, sftp_scp, ssl, universal

ares does name resolution, the other two should be clear what they are for, and the universal just means that it will be built as a universal binary, and can run on multiple architectures, so PPC and Intel and often on 10.6 as well as 10.5 and 10.4. Not sure if things go back to 10.3, certainly not in all cases.

It built cleanly, and seems to work fine:
    $which -a curl
    /opt/local/bin/curl
    /usr/bin/curl

$/opt/local/bin/curl -V | pbcopy
curl 7.20.0 (i386-apple-darwin10.3.0) libcurl/7.20.0 OpenSSL/0.9.8n zlib/1.2.5 c-ares/1.7.1 libidn/1.18 libssh2/1.2.4
Protocols: dict file ftp ftps http https imap imaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile NTLM SSL libz

> I downloaded openSSL 1.0 and compiled it set --prefix=/opt
>
> I then try to compile curl with:
>
> ./configure --host=arm-apple-darwin --prefix=/opt --program-prefix=/usr/local/iphone --disable-shared --disable-crypto-auth --without-gnutls --with-ssl=/Volumes/JTSM/opt --without-zlib --without-libssh2 --disable-ipv6 --disable-manual --disable-http --enable-ftp --disable-file --disable-ldap --disable-ldaps --disable-rtsp --enable-proxy --disable-dict --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smtp --disable-manual --disable-ipv6 --disable-sspi --disable-cookies CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-gcc-4.0.1 CFLAGS="-arch armv6 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=3.2 -gdwarf-2 -mthumb -I/Library/iPhone/include -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk" CPP=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/cpp AR=/Developer/Platforms/iPhoneOS.!
> platform/Developer/usr/bin/ar AS=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/as LIBTOOL=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool STRIP=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/strip RANLIB=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ranlib
>
> and I notice that it says:
>
> curl version: 7.20.1
> Host setup: arm-apple-darwin
> Install prefix: /opt
> Compiler: /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-gcc-4.0.1
> SSL support: no (--with-ssl / --with-gnutls / --with-nss)
> SSH support: no (--with-libssh2)
> zlib support: no (--with-zlib)
> krb4 support: no (--with-krb4*)
> GSSAPI support: no (--with-gssapi)
> SPNEGO support: no (--with-spnego)
> c-ares support: no (--enable-ares)
> ipv6 support: no (--enable-ipv6)
> IDN support: no (--with-libidn)
> Build libcurl: Shared=no, Static=yes
> Built-in manual: no (--enable-manual)
> Verbose errors: enabled (--disable-verbose)
> SSPI support: no (--enable-sspi)
> ca cert bundle: no
> ca cert path: no
> LDAP support: no (--enable-ldap / --with-ldap-lib / --with-lber-lib)
> LDAPS support: no (--enable-ldaps)
> RTSP support: no (--enable-rtsp)
> Protocols: FTP

I have this output, which is close to what you have:

  curl version: 7.20.0
  Host setup: i386-apple-darwin10.3.0
  Install prefix: /opt/local
  Compiler: /usr/bin/gcc-4.2
  SSL support: enabled (OpenSSL)
  SSH support: enabled (libSSH2)
  zlib support: enabled
  krb4 support: no (--with-krb4*)
  GSSAPI support: no (--with-gssapi)
  SPNEGO support: no (--with-spnego)
  c-ares support: enabled
  ipv6 support: enabled
  IDN support: enabled
  Build libcurl: Shared=yes, Static=yes
  Built-in manual: enabled
  Verbose errors: enabled (--disable-verbose)
  SSPI support: no (--enable-sspi)
  ca cert bundle: /opt/local/share/curl/curl-ca-bundle.crt
  ca cert path: no
  LDAP support: no (--enable-ldap / --with-ldap-lib / --with-lber-lib)
  LDAPS support: no (--enable-ldaps)
  RTSP support: enabled
  Protocols: DICT FILE FTP FTPS HTTP HTTPS IMAP IMAPS POP3 POP3S RTSP SCP SFTP SMTP SMTPS TELNET TFTP

> and if I look further I see an item or two like:
>
> configure: PKG_CONFIG_LIBDIR will be set to "/Volumes/JTSM/opt/lib/pkgconfig"
> configure: WARNING: Use --with-ssl, --with-gnutls or --with-nss to address this.

I did not get those warnings.

I went ahead and piped the port installation to tee and saved the output for you here:
    http://dl.dropbox.com/u/340087/drops/05.11.10/curl.log-16559814-221457.txt

I am not sure how much this is going to help you, but it is the result of a successful compilation of curl, only marginally older than the version you are trying to install. Later tomorrow I will go ahead and update the port installation instruction file and hashes to use the most current version.

Hopefully, you can look at the log output I saved, and it will show you a clue as to what compile arguments and flags you need to have to make it work.

If not, it may be worth it to use MacPorts to install curl. I find it an indispensable tool to getting things installed on Mac OS X, which more often than not, can be a little troublesome to build software by hand if it is not a mainstream software like MySql, Apache etc. Almost everything you will need to build and install is there, if not, you can join the mailing list and make a request, someone will usually get to making a port file relatively quickly.

Sorry if this turns out to not be of any help at all, if it doesn't, let me know, and I will give it a shot at building it out entirely by hand and seeing where I get too.

Good luck.

-- 
Scott * If you contact me off list replace talklists@ with scott@ * 
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-05-12