cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Porting libcurl on embedded system with proprietary OS

From: Jon Torrey <ntox101_at_gmail.com>
Date: Fri, 25 Jul 2014 09:52:11 -0400

Hi Dan,

Asking for the key files isn't really going
> to help much, because they are so complex and hang together so tightly.
> configure is pretty key for an autoconf build, and that one file is over
> 42K
> lines.

I have noticed it is very complex. Was very interested if there was any
sort of simplification of explaining the process. We shall carry on now.

 You'll probably want to start
> with a bare-bones configuration

I strongly agree with your comment in starting with a bare-bones build as
that was my plan.

Your best bet when porting to a new system is to look at an existing
> configuration that's similar to your OS' and tweak it to your needs. That
> means
> either starting with a prebuilt config file (such as lib/config-win32.h) or
> configuring curl using autoconf targetting an OS similar to the one you're
> using (e.g. configure for an ARM Linux cross-compile)

I am interested in cross-compiling on Linux for ARM INTEGRITY as it seems
most similar to what I am running.

The example provided within install.html leaves me a tad confused on how to
get prepared. I've done a file grep inside the configure script to see
which targets/hosts/etc are supported and I don't get any useful results.
 Even blindly doing ./configure --host=arm-integrity
--target=arm-inte...and so on throws errors (as expected). I am going to
assume the script looks for arguments passed from the command line to
determine the platform it needs to configure for and that is why I did a
search. I have access to any INTEGRITY files including the manuals, fyi.

Thanks,
JT

On Thu, Jul 24, 2014 at 4:31 PM, Dan Fandrich <dan_at_coneharvesters.com>
wrote:

> On Thu, Jul 24, 2014 at 09:39:00AM -0400, Jon Torrey wrote:
> > I am currently attempting to port over libcurl to an ARM-based embedded
> system
> > with a proprietary operating system. After practicing building on both
> Linux
>
> Sounds like fun!
>
> > and Windows and capturing the output of the process in text files and
> reading
> > over them, I have what might be an easy question to answer :
> >
> > Say I am using Linux to create a build with all of the features I
> want/don't
> > want. What is the process/order in which these files are made as I am to
> > configure the build myself. My main goal is to be able to make
> HTTP/HTTPS
> > request. I do have a ported version of the openssl library on the
> system and I
> > need to use that.
> >
> > I guess the real question is, how is curl_config.h obtained? I am going
> to
>
> Using autoconf is the easiest on a new system, when the build chain will
> run on
> a POSIX system. It will probe the system for the correct settings and
> generate
> curl_config.h for you. Cmake will do something similar.
>
> > assume it is generated using the configure script and if the system does
> not
> > support configure, you must use a configure-*.h file for whatever system
> you
> > have.
>
> Correct. You'll see those conf files for systems with non-POSIX build
> chains.
>
> > I would also like to know all of the key files that are involved in
> building
> > libcurl. Key files meaning configure files and files with pre-processor
> > defines.
>
> Every file is in the curl distribution for a good reason, and each one is
> therefore key! However, each one isn't necessarily needed in every
> environment
> and in every build configuration. Asking for the key files isn't really
> going
> to help much, because they are so complex and hang together so tightly.
> configure is pretty key for an autoconf build, and that one file is over
> 42K
> lines.
>
> Your best bet when porting to a new system is to look at an existing
> configuration that's similar to your OS' and tweak it to your needs. That
> means
> either starting with a prebuilt config file (such as lib/config-win32.h) or
> configuring curl using autoconf targetting an OS similar to the one you're
> using (e.g. configure for an ARM Linux cross-compile). Then modify the
> curl_config.h file to match your target and go! You'll probably want to
> start
> with a bare-bones configuration to get started (i.e. use as many
> --disable-*
> and --without* options as you can to create an HTTP-only libcurl), then add
> more options and check the differences once the base system is operation.
>
> You can also build for an e.g. ARM Linux target and use nm -D on the shared
> library to see the kinds of external symbols that libcurl needs before you
> even
> get started. Not all of those will be absolutely necessary as libcurl will
> to a
> large extent work with what the OS provides, but it will give you an idea
> of
> what you'll be dealing with. Good luck!
>
> >>> Dan
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-07-25