cURL / Mailing Lists / curl-library / Single Mail

curl-library

cross-compiling curl for PPC -- successful but weird

From: Robert P. J. Day <rpjday_at_mindspring.com>
Date: Mon, 18 Jul 2005 19:55:59 -0400 (EDT)

  i'm trying to compile curl with SSL support for a PPC board, using
the ELDK 3.1.1 cross-compile toolchain. i've been fighting with this
all afternoon and finally got what seems to be a successful compile,
but with a weird incantation. this is the configure script i used:

===========================================================
#!/bin/sh

export AR=ppc-linux-ar
export AS=ppc-linux-as
export LD=ppc-linux-ld
export RANLIB=ppc-linux-ranlib
export CC=ppc-linux-gcc
export NM=ppc-linux-nm
export CFLAGS="-Wl,-rpath,/usr/local/eldk3.1.1/ppc_8xx/usr/kerberos/lib,\
        -rpath-link,/usr/local/eldk3.1.1/ppc_8xx/usr/kerberos/lib"

./configure \
--host=ppc-linux \
--with-krb4=/usr/local/eldk3.1.1/ppc_8xx/usr/kerberos \
--with-krb4-libs=/usr/local/eldk3.1.1/ppc_8xx/usr/kerberos/lib \
--with-krb4-includes=/usr/local/eldk3.1.1/ppc_8xx/usr/kerberos/include \
--with-random=/dev/urandom
============================================================

  note that i'm not even selecting SSL support, but explicitly
selecting krb4. also, i needed to use "--with-random" since, if i
didn't, the configure failed claiming that i can't do file tests while
cross-compiling.

  first, note the summary at the end of the configuration step:

  curl version: 7.14.0
  Host setup: powerpc-unknown-linux-gnu
  Install prefix: /usr/local
  Compiler: ppc-linux-gcc
  SSL support: enabled (OpenSSL) [good, but weird]
  zlib support: enabled
  krb4 support: no (--with-krb4*) [huh??]
  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=yes, Static=yes
  Built-in manual: enabled
  Verbose errors: enabled (--disable-verbose)
  SSPI support: no (--enable-sspi)
  ca cert path: /usr/local/share/curl/curl-ca-bundle.crt

note that SSL is selected, but krb4 isn't. what's up with that? (and
i never could get SSL support with any variation of "--with-ssl". i
have no idea why selecting krb4 support suddenly gives me SSL.)

  and after the configure, i seem to have a valid PPC curl executable,
with the following shared lib references:

$ ppc_8xx-ldd curl
        libcurl.so.3 => not found
        libssl.so.4 =>
/usr/local/eldk3.1.1/ppc_8xx/usr/lib/libssl.so.4
        libcrypto.so.4 =>
/usr/local/eldk3.1.1/ppc_8xx/usr/lib/libcrypto.so.4
        libdl.so.2 => /usr/local/eldk3.1.1/ppc_8xx/lib/libdl.so.2
        libz.so.1 => /usr/local/eldk3.1.1/ppc_8xx/usr/lib/libz.so.1
        libc.so.6 => /usr/local/eldk3.1.1/ppc_8xx/lib/libc.so.6
        libgssapi_krb5.so.2 =>
/usr/local/eldk3.1.1/ppc_8xx/usr/kerberos/lib/lib gssapi_krb5.so.2
        libkrb5.so.3 =>
/usr/local/eldk3.1.1/ppc_8xx/usr/kerberos/lib/libkrb5.so .3
        libk5crypto.so.3 =>
/usr/local/eldk3.1.1/ppc_8xx/usr/kerberos/lib/libk5c rypto.so.3
        libcom_err.so.3 =>
/usr/local/eldk3.1.1/ppc_8xx/usr/kerberos/lib/libcom_ err.so.3
        ld.so.1 => /usr/local/eldk3.1.1/ppc_8xx/lib/ld.so.1

which again seems all right, since it has references to all of the
cross-compile libs that i care about, and more that i don't.

  so, can anyone explain why i needed to use such a strange config
script? is there a simpler approach? what i want is an absolutely
minimal curl for simple FTP-style file transfer using SSL, and nothing
more. i'm sure there's a simpler recipe.

rday
Received on 2005-07-19