This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [CT-NG 1.11.1] Error if libidn added to (e)glibc add-ons to build


Benoit, All,

On Monday 16 May 2011 20:53:21 BenoÃt THÃBAUDEAU wrote:
> With CT-NG 1.11.1, I get the following error if libidn is added to the eglibc
> 2.13 add-ons to build:
> [ERROR]    'eglibc-libidn-2_13' not found in '/tools/.build/tarballs'
> This error is caused by do_libc_extract(), which does not handle libidn like
> nptl, although it should since both are built-in eglibc add-ons (at least for
> eglibc 2.13), so no tarball has to be downloaded/extracted for them.

At the time I did this code, only glibc was supported, and libidn was an
external addon.

> The same seems to be true for the glibc.

Until glibc-2.10, libidn was an external addon.

[--SNIP--]
> ---
> -        # NPTL addon is not to be extracted, in any case
> -        [ "${addon}" = "nptl" ] && continue || true
> +        # Built-in addons are not to be extracted, in any case
> +        [ -d "${addon}" ] && continue || true

That's what I'd go with.

Except that sometime, the addon dir is suffixed with the glibc version,
so we should also check "${addon}-${CT_LIBC_VERSION}"

Also, this construct is ugly (yes, I wrote it!), and not instantly
understandable, even if perfectly valid. The fact that set -e is in
effect should not entice us to work it around by writing obscur and
bad code, but really to write clean and lean code. set -e is here
to catch unexpected errors, not to complexify the code.

I'll go do penance. Consider I've been properly chastised.

We should either use a real if-then-fi, or a simpler test, such as:
    [ ! -d "bla" -a ! -d "bla-bla" ] || continue

I prefer the if-then-fi here. Care to address that in the process, please?

> But that would not work if CT-NG has a feature to force overwriting
> extractions,

In fact, when extractions are forced, the full source dir is removed,
so the extracted file stamps are removed, so the whole libc dir is
removed, so upon the next extraction, libc will be totally extracted
again, addons-included.

Crosstool-NG, it rocks with poneys! ;-)

Thanks for the report. Care to send a proper patch with your SoB?

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]