Building with Uclibc

John Kelly jakelly at shtc.net
Sun Dec 4 22:37:34 UTC 2005


On Sun, 04 Dec 2005 21:37:43 +0100 (CET), Peter S Mazinger
<ps.m at gmx.net> wrote:

>> >http://www.linuxfromscratch.org/hints/downloads/files/uclibc.txt
>> 
>> In your note I found the sed patch:
>> 
>> >Description: This corrects a problem with a "Memory exhausted" error when Sed
>> >is linked to uClibc 0.9.28.
>
>This failure will happen generally w/ all gnu apps if you built uclibc w/ 
>GLIBC_COMPAT_MALLOC enabled and built your apps, then disable the option 
>and rebuild uclibc.

I don't know how that could happen with my scripted build which starts
from scratch.  Sed was built after uclibc, and MALLOC_GLIBC_COMPAT was
disabled the whole time.


>best you can do is keep that compat option enabled

But in any case, I rebuilt with MALLOC_GLIBC_COMPAT enabled, and now
sed works without the patch.

The MALLOC_GLIBC_COMPAT help text says "I personally feel glibc's
behavior is not particularly safe ... Most people can safely answer
N."

Well maybe that help text is useful if your "embedded" system won't
use GNU apps ...


>gnulib devs decided that if malloc is not compat, then also regex has to 
>be used from gnulib (regex bacame a requirement for the malloc module)
>(regex is what fails in sed, and will in many gnu apps)

But my goal is to build a general purpose server based on uclibc, so I
will enable the option, to avoid the problem with other apps besides
sed.  I see that findutils has the same regex_internal.c code.   Maybe
there are others too, but I won't look very hard for them, since now I
know how to solve the problem without patching.

Peter, thanks for the insight.

Robert: it seems like the regex patch will be needed for other apps
besides sed, if uclibc is built without MALLOC_GLIBC_COMPAT enabled.





More information about the uClibc mailing list