cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: cross-compiling the curl library for PPC?

From: Robert P. J. Day <rpjday_at_mindspring.com>
Date: Fri, 28 Apr 2006 17:30:52 -0400 (EDT)

On Fri, 28 Apr 2006, Daniel Stenberg wrote:

> On Fri, 28 Apr 2006, Robert P. J. Day wrote:
>
> > i want the configure/build of curl to build against *that*
> > cross-compiled openssl, which will also be the openssl it will be
> > *running* against on the target board (but in a different
> > location). to me, that means i have to build curl keeping in mind
> > that there are *two* different locations i'm going to have to
> > specify:
>
> Based on the .so extensions in your mail I take it you'll use shared
> OpenSSL libs.

correct.

> Then it doesn't matter which lib you build against as then you'll
> get to use the ones that are installed on the actual machine that
> you _run_ the program on as the libs are loaded run-time.
>
> The only thing that is important is that you build with a lib that
> has the same ABI as the one you run with later.

that part i knew. but i think you missed the tricky part that's
coming up.

> > what is the incantation to configure/build curl so that it builds
> > against the openssl in that build directory but will run properly
> > on the target when those openssl libs are installed elsewhere?
> >
> > my first guess is:
> >
> > $ CC=ppc_8xx-gcc \
> > LDFLAGS="-L/mybuilddir" \
> > CPPFLAGS="-I/mybuilddir/include/openssl" \
> > ./configure --with-ssl
> >
> > but my concern is that, since i just say "--with-ssl", it seems
> > like that would just look for the first install of openssl it
> > could find and might find the wrong one. i want it to find
> > *specifically* and *only* the one in /mybuilddir.
>
> The configure is written to accept --with-ssl=PATH and try that
> given path first, so if you just point out the ssl path like that it
> should work fine.

ah, but this makes a fairly major assumption (and it doesn't actually
work, i tried it).

i'm just guessing, but my guess is that that "PATH" argument to
--with-ssl represents an installed directory hierarchy, so it would
contain your basic bin/, usr/ and include/ subdirectories, which is
where the build would look for both the libs and the header files.

but i haven't *installed* anything. all i've done is *compiled*
openssl-0.9.8a, so that the libs *and* the headers are still sitting
back in that build directory, but in separate locations.

effectively, when i configure/build curl, i want to be able to say:

1) you'll find the openssl libs *here*
2) you'll find the openssl header files *here*
3) where you should look for the openssl libs when you actually run
will be *here*

in effect, i want to mimic the configure options:

  --with-ssl-libs=
  --with-ssl-headers=
  --rpath= (for the runtime lib location)

do you see the point i'm making? i really need to be able to specify
three entirely independent locations in that configure before i start
the build. or am i making this too difficult?

rday
Received on 2006-04-28