old-www/LDP/LG/issue32/tag_libc5.html

308 lines
12 KiB
HTML

<!--startcut ======================================================= -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html><head>
<META NAME="generator" CONTENT="lgazmail v1.1preB">
<TITLE>The Answer Guy 32:
The End of libc5: A Mini-Interview with H.J Lu
</TITLE>
<!-- ORIGINAL SUBJECT:
The last Linux C library version 5, 5.4.46, is released.
JTD SUBTITLE:
-->
</head>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#A000A0"
ALINK="#FF0000">
<H4>"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>
<P> <hr> <P>
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<H1 align="center"><A NAME="answer">
<img src="../gx/dennis/qbubble.gif" alt="" border="0" align="middle">
<a href="./index.html">The Answer Guy</a>
<img src="../gx/dennis/bbubble.gif" alt="" border="0" align="middle">
</A></H1>
<BR>
<H4 align="center">By James T. Dennis,
<a href="mailto:linux-questions-only@ssc.com">linux-questions-only@ssc.com</a>
<BR>Starshine Technical Services, <A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
</H4>
<p><hr><p>
<!--endcut ========================================================= -->
<H3><img src="../gx/dennis/qbub.gif" alt="(?)"
width="50" height="28" align="left" border="0"
>The End of libc5: A Mini-Interview with H.J Lu</H3>
<p><strong>From <em>The Answer Guy</em> on 29 Jul 1998 </strong></p>
<!-- begin body -->
<blockquote>
<br>H.J.
<br>I hate to bother you with a more discussion on this
topic. However, I'd like to have a definitive posting
for the Linux Gazette (I do the Answer Guy column there)
to allay people's concerns about this migration.
</blockquote>
<blockquote>So, I'd like to ask a couple of questions:
</blockquote>
<blockquote>Is there a definitive archive or document on the web that
you feel accurately answers most questions about the
glibc vs. libc 5 controversy?
</blockquote>
<p><strong><img src="../gx/dennis/bbub.gif" height="28" width="50"
alt="(!)" border="0"
>No. I have posted a few articles from time to time. As far as I
know, glibc 2 is very good now. The only problem it has is some
Linux specific programs use the kernel header files directly. It
won't work with glibc 2. We have to change those programs and
we have to add those missing pieces to glibc 2 if necessary. So far,
everything looks good. RedHat and <A HREF="http://www.debian.org/">Debian</A>
have built their entire Linux on glibc 2.
</strong></p>
<blockquote><img src="../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
>It is my impression that libc.5 and glibc can co-exist
on a system concurrently and transparently. Is that so?
</blockquote>
<strong><p><img src="../gx/dennis/bbub.gif" height="28" width="50"
alt="(!)" border="0">Yes.</p></strong>
<blockquote><img src="../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0">Are there exceptional cases?</blockquote>
<strong><p><img src="../gx/dennis/bbub.gif" height="28" width="50"
alt="(!)" border="0"
<blockquote>All those binaries compiled by <tt>egcs</tt> and <tt>gcc 2.7.2.3</tt>
should be ok. But if you have a C++ binary which uses <tt>libg++</tt> and was
compiled by gcc 2.7.x.x other than 2.7.2.3, it may load the wrong <tt>libg++.so</tt>.
But I don't know if there is a case where you cannot recompile it.
</p></strong>
<blockquote><img src="../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
>I gather that a couple of the major advantages to glibc
have to do with: support for NIS, thread-safe library
calls, transparent support for the shadow password suite
in the <tt>getpwent()</tt> and related functions, and much easier
compatibility with other GNU sources (without requiring
as much porting effort on the one side nor as much library
maintenance by you, personally, on the other). Is that
all true? Are there other compelling advantages to
glibc over libc.5?
</blockquote>
<strong><p><img src="../gx/dennis/bbub.gif" height="28" width="50"
alt="(!)" border="0"
>How about conforming all those standards, like ANSI C, POSIX,
XOPEN and UNIX98?
</p></strong>
<blockquote><img src="../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
>I've heard complaints that glibc takes up significantly
more disk space and run-time core (RAM). I've also heard
</blockquote>
<strong><p><img src="../gx/dennis/bbub.gif" height="28" width="50"
alt="(!)" border="0"
>glibc is compiled with -g by default so it does take more disk space.
The harddrive is cheap. I'd like to keep those debug info in library.
In anycase, you can run strip on them. But I won't recommend it unless
you are building a very small Linux installation. As for memory, glibc
2 has more stuff than libc 5. It has to bigger libc 5. I don't call it
libc 6 if it is smaller than libc 5. But Unix has demand paging. Those
unused portions won't be loaded into memory anyway.
</p></strong>
<blockquote><img src="../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
>that running '<tt>strip</tt>' on it can significantly reduce its
disk footprint. Where can I find a more comprehensive
comparison of the speed, disk space and memory requirements
of the two sets of libraries?
</blockquote>
<strong><p><img src="../gx/dennis/bbub.gif" height="28" width="50"
alt="(!)" border="0"
>We have to pay the price on speed and size for a MT-safe C library.
But there are so many new optimizations in glibc 2. I would say glibc
2 is faster than libc 5. As for disk space, it depends on if you want
to run strip or it. By default, glibc 2 provides much more debug info
than libc 5. With libc 5, when something goes wrong with the C library,
I have to use a speciial C library just to debug it. With glibc 2, I
just run <tt>gdb</tt> on the binary compiled with <tt>-g</tt>. As for
memory requirement, I believe it is the similar to libc 5.
</p></strong>
<blockquote><img src="../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
>I presume that someone else could (if they wanted) take
up the maintenance and continue to improve <tt>libc.5</tt> (in the
spirit of the GPL) if they really wanted to do so. Is there
</blockquote>
<strong><p><img src="../gx/dennis/bbub.gif" height="28" width="50"
alt="(!)" border="0"
>Sure. Anyone is free to do so.
</p></strong>
<blockquote><img src="../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
>any argument you would present to, or question you would ask
of someone who was proposing to do this?
</blockquote>
<strong><p><img src="../gx/dennis/bbub.gif" height="28" width="50"
alt="(!)" border="0"
>libc 5 is quite stable. Most of the fixable bugs are fixed. All the new
developments have gone to glibc 2. glibc 2 also has fixed those bugs
which are hard to fix in libc 5. I don't see why we should spend more
time on libc 5.
</p></strong>
<blockquote><img src="../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
>Last one:
</blockquote>
<blockquote>Now that you're free of libc.5, are there any projects that you
are particularly interested in pursuing (open source or
otherwise)?
</blockquote>
<strong><p><img src="../gx/dennis/bbub.gif" height="28" width="50"
alt="(!)" border="0"
>I have been working on <tt>egcs</tt>/<tt>gcc</tt>, <tt>binutils</tt> and
<tt>gdb</tt> for Linux. I will keep doing so. In the meantime, I am very
interetsed in projects using
C++, thread and distributed technology, something like CORBA. I have
been thinking a new paradigm for Unix. Instead of a C or C++ library,
we use something on the line of CORBA or DCOM.
</p></strong>
<strong><p>Another thing, every program is compiled with <tt>-fPIC</tt> as a shared
library, i.e.:
</p></strong>
<pre># gcc -shared -o ls.so -fPIC ls.c ......
# gcc -o ls ls.so
</pre>
<strong><p>Now, we have both <tt>ls</tt> and <tt>ls.so</tt>. Another program can do
</p></strong>
<pre>int (*ls_main) (int, char **);
void *handle;
handle = dlopen ("ls.so", ...);
ls_main = dlsym (handle, "main");
ls_main (argc, argv);
</pre>
<strong><p>We can also use it instead of expensive
</p></strong>
<strong><p>i<code>system ("ls");</code></p></strong>
<strong><p>It can go with the CORBA/COM idea. That is we define an object oriented
interface for a service, which can be a local shared library or a
different process which can be local or remote.
</p></strong>
<blockquote><img src="../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
>With your permission I'd like to submit your answers for
possible publication in next month's Linux Gazette (whichi
is available online and distributed under the terms of the
LDP GPL). Please feel to add any comments you like to your
response, (or to tell me to buzz off for that matter).
</blockquote>
<strong><p><img src="../gx/dennis/bbub.gif" height="28" width="50"
alt="(!)" border="0"
>It is fine with me.
</p></strong>
<blockquote><img src="../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
>Regardless of your response I'd like to personally express
my gratitude for all the work you've done for Linux over
these last few years. If you're ever in the SF Bay Area,
</blockquote>
<!-- end body -->
<!--startcut ======================================================= -->
<P> <hr> <P>
<H5 align="center"><a href="http://www.linuxgazette.com/copying.html"
>Copyright &copy;</a> 1998, James T. Dennis <BR>
Published in <I>Linux Gazette</I> Issue 32 September 1998</H5>
<P> <hr> <P>
<!--::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::-->
<table width="98%"><tr valign="center" align="center">
<td rowspan="3"><A HREF="./lg_answer32.html"><IMG
SRC="../gx/dennis/answernew.gif"
ALT="[ Answer Guy Index ]"></A></td>
<td><A HREF="tag_phreak.html">phreak</A>
<td><A HREF="tag_abandon.html">abandon</A>
<td><A HREF="tag_javaterm.html">javaterm</A>
<td><A HREF="tag_BBS.html">BBS</A>
<td><A HREF="tag_flaws.html">flaws</A>
<td><A HREF="tag_doslinux.html">doslinux</A>
<td><A HREF="tag_resume.html">resume</A>
</tr><tr valign="center" align="center">
<td><A HREF="tag_softwindows.html">softwindows</A>
<td><A HREF="tag_convert.html">convert</A>
<td><A HREF="tag_apache.html">apache</A>
<td><A HREF="tag_emulate.html">emulate</A>
<td><A HREF="tag_database.html">database</A>
<td><A HREF="tag_distrib.html">distrib</A>
<td><A HREF="tag_proxy.html">proxy</A>
</tr><tr valign="center" align="center">
<td><A HREF="tag_disable.html">disable</A>
<td><A HREF="tag_DVI.html">DVI</A>
<td><A HREF="tag_superblock.html">superblock</A>
<td><A HREF="tag_serial.html">serial</A>
<td><A HREF="tag_permission.html">permission</A>
<td><A HREF="tag_detach.html">detach</A>
<td><A HREF="tag_cdr.html">cdr</A>
</tr><tr valign="center" align="center">
<td><A HREF="tag_rs422.html">rs422</A>
<td><A HREF="tag_modem.html">modem</A>
<td><A HREF="tag_notfound.html">notfound</A>
<td><A HREF="tag_tuning.html">tuning</A>
<td><A HREF="tag_libc5.html">libc5</A>
<td><A HREF="tag_startup.html">startup</A>
<td><A HREF="tag_clock.html">clock</A>
<td><A HREF="tag_ping.html">ping</A>
</tr><tr valign="center" align="center">
<td><A HREF="tag_accounts.html">accounts</A>
<td><A HREF="tag_lilo.html">lilo</A>
<td><A HREF="tag_NDS.html">NDS</A>
<td><A HREF="tag_95slow.html">95slow</A>
<td><A HREF="tag_nonlinux.html">nonlinux</A>
<td><A HREF="tag_progenv.html">progenv</A>
<td><A HREF="tag_cluster.html">cluster</A>
<td><A HREF="tag_ftpd.html">ftpd</A>
</tr></table>
<P> <hr> <P>
<!--::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::-->
<A HREF="./index.html"><IMG SRC="../gx/indexnew.gif"
ALT="[ Table Of Contents ]"></A>
<A HREF="../index.html"><IMG SRC="../gx/homenew.gif"
ALT="[ Front Page ]"></A>
<A HREF="lg_bytes32.html"><IMG SRC="../gx/back2.gif"
ALT="[ Previous Section ]"></A>
<A HREF="./stemen.html"><IMG SRC="../gx/fwd.gif"
ALT="[ Next Section ]"></A>
<!--::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::-->
</body>
</html>
<!--endcut ========================================================= -->