cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Cross-compiling libcurl for an embedded platform using lwip

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Tue, 28 Feb 2012 19:09:31 +0100

On Tue, Feb 28, 2012 at 09:41:11AM -0800, Gary Maxwell wrote:
> It has been about five years since I built libcurl to link
> against lwip. A lot has happened to both libraries since then,
> but it still seems true that ./configure will not be able
> to make sense of the lwip libraries and headers.

curl very much expects a BSD-style socket library. The best bet is to
write a shim library that calls the LWIP socket functions using the
standard names so that configure can find them. Otherwise, you'll be
hacking the code and makefiles all over to find and call the LWIP
versions of the socket library everywhere they're needed. Chances are
also reasonably high that the semantics of the LWIP socket-like
functions aren't completely compatible with BSD sockets, so the shim
could also do some translation there.

> In the end, I believe I took the output from a
> cross-compile ./configure and massaged the config.h and makefiles
> in order to build against lwip. That took a few hours longer than
> I liked, but the end result worked out fine.

That's the other approach, and the fact that it worked out fine is a
good indication that LWIP's socket API is sane enough for curl's use.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-02-28