cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: cross-compiling curl for PPC -- successful but weird

From: Tim Sneddon <tsneddon_at_bsd.infomedia.com.au>
Date: Wed, 20 Jul 2005 15:07:09 +0800

Dan Fandrich wrote:
> On Tue, Jul 19, 2005 at 06:17:29AM -0400, Robert P. J. Day wrote:
>
>>i've noticed this "problem" in trying to cross-compile other programs,
>>such as "lftp". of course, it makes sense that, if you're
>>cross-compiling, it's pointless to be checking for file existence.
>>but wouldn't it make more sense to just skip the check, rather than
>>aborting the configure?
>>
>>"lftp" was particularly bad about this -- it simply bailed. why not
>>something like
>>
>> if cross-compiling ; then
>> echo "Skipping check for /dev/urandom, deal with it."
>> else
>> ... processing for /dev/urandom ...
>> fi
>>
>>wouldn't that be a cleaner approach?

I certainly think so.

> What's the executable supposed to do when it doesn't have a random device
> to work with? Sure, you could make it compile successfully without it,

Same as it would if it wasn't there due to some sort of unforseable
error; exit gracefully with appropriate information to allow the user to
understand what the problem is and find a solution.

> but it will be the executable that bails instead of configure in that case.
> Better to force the user to "deal with it" at configure time by bailing then.

How can the user "deal with it" at configure time if they are
cross-compiling? In some cases, like library dependencies I can
understand it (how else is it going to compile?). However, if you
are referencing a device specific to the target system, then there
is no way of checking it. It will most probably not (as in this case)
exist on the build system.

Regards, Tim.

-- 
Tim Sneddon                                tsneddon[at]infomedia.com.au
Systems Programmer                  Infomedia Business Systems Division
                         Level 3, 823 Wellington St, West Perth WA 6005
                          Phone: +61 8 9217 5000   Fax: +61 8 9217 5055
Received on 2005-07-20