Well, a few months ago I started making the big change over to ELF;
I pretty much did what was in the ELF-HOWTO and it worked. Anyway, before
then I had upgraded my ncurses because I had downloaded something didn't work
with the ncurses I had... That broke the MidNight Commander causing it to
become the MonoChrome Commander, but otherwise it worked so I didn't make
a big deal of it. Well, lately I've started thinking that I'd really be
a lot happier with more ELF libraries so I can compile more stuff in ELF...
Gee, I really need an ELF ncurses so I can recomplie MC and nethack and so
forth.
Well, pretty soon I got very *ed to recompiling my libraries
as ELF shared libraries. I haven't done tk yet because I haven't yet upgraded
to an ELF X windows, but when the tcl lib is compiled shared the binary
for tclsh shrinks from about 150k to about 4k. Now, it's true that with a
total of about 1.4 GB of online storage I don't need to be ~too~ picky about
the size of my binaries, but hey, I really like it when the ncurses demo
programs shrink from about 180k to 10k. (Hey, this might buy us a year or
two before the increasing number of TCL extensions requires us to double
our numbers of TCL-ish interpreters every time we add one; tcl, expect,
tk, expect + tk, tclX, tk + tclX, tk + expect + tclx + blt...)
[NB -- ncurses 1.9.3 doesn't actually seem to make perfectly working
libs for me; I ~think~ there is an error in the makefile that gives the
shared libs the name ../lib/libncurses or something like with the effect
that it works great for compiling the demos but causes other programs that
aren't compiled and run from the right directory to miss them when they
are in /usr/lib. I think I know how to fix this and this weekend I'll send
the authors the details.]
Anyway, now that I can make tons of extra shared libraries, as
someone who's both a Linux user and hopefully a developer, how should I
avoid abusing my new powers? Are there any limits that I should respect as
to making shared libs? Whenever I see something like S-LANG, TCL, or
whatever that would add libs to my /usr/local/lib, should I jump right away
to make the program produce shared libs or I am likely to hurt the ecology
of my hard drive this way?
What guidelines should I follow if I ever release binaries of
programs I write? I assume, for instance, that once can usually assume that
people have, say, shared libs for libc! But right now probably most people
don't have ELF shared ncurses libs so I presume that I shouldn't give away
binaries that use them. My assumption is that if I write a program that
requires ncurses, the linker will automatically use shared libs if a person
has them or link statically if they don't so I don't think this is ~too~ much
of an issue.
Still, it would be really nice to see a HOWTO or a FAQ or something
with ELF guidelines for the application programmer (in fact, we could have
used something like this a long time ago -- I don't know how often that I get
really bizzare things by ftp that have encouraged me to add I don't know how
many symbolic links because people put their include files in the wrong
places on their machines...)