Automake and libtool for Samba

Matt Peterson mpeterson at calderasystems.com
Mon Nov 20 23:40:53 GMT 2000


Michael Sweet wrote:
> 
> Matt Peterson wrote:
> > ...
> > Automake and especially libtool have proven to be very valuable
> > tools for building portable open source projects.  Before we get
> > too far into this, it would be interesting to know why Samba does
> > not use of these tools.
> 
> I first ran across automake and libtool when doing the IRIX
> distributions for GIMP and SANE; my personal opinion is that they
> are evil programs that shouldn't be used.

... A rather harsh judgment of tools that have made their way in to
thousands of projects from KDE to Apache.  Autoconf, automake and
libtool present concepts that are new and sometimes confusing to
developers but are they are still good tools.  My experience is that
ones that dislike libtool, autoconf and automake are usually those that
do not understand them.  

> Why?  Because they stuff object files in strange places, leaving
> placeholder files in the main directory.

Unless you routinely run production applications from the directory they
were built from this should not be a problem.  Libtool copies libraries
into the appropriate upon make install

> They don't properly handle shared library binding in executables,
> so you have to use LD_LIBRARY_PATH or put your shared libraries in
> common system directories (yes, Linux allows you to configure those;
> Linux isn't the whole of UNIX...)

Again, this is probably due to user error rather than a deficiency in
the tool.  Libtool is configurable.  I've never used it on Irix, but it
seems to work well when properly used every where else.  Can you offer
an example of when library binding was done incorrectly?  libtool does
not do the bindings, your linker does!  If libtool is calling your
linker incorrectly, fix it!
 
> Finally, I don't like the way that libtool hides the build commands -
> it has made tracking down and fixing libtool-related bugs and
> problems nearly impossible.

Not really.  Libtool does wrap build commands, but it does not hide the
output.  In fact it echoes the *exact* build (compile and link commands)
to stdout.  You should be very aware of what's going on unless stdio is
being sent to /dev/null
 
> *Please* don't use libtool in the SAMBA code!

Would you rather try to complicate the single samba makefile further by
adding special sections for each OS that differs in the way it links
shared libraries?   Sounds to me like your giving libtool a bad rap
because it is *different* from what you're used to -- not because it is
bad.   Also, libtool is not automake.  Nothing has been argued that has
anything to do with automake -- is it still evil too or is it also just
different from what you're used to?

Finally, take a look at
http://www.apache.org/docs/new_features_2_0.html  The use of Libtool is
listed as a Core enhancement of the new Apache 2.0 build system.  Apache
probably attracts more users, developers, and diverse systems than even
Samba -- yet they feel comfortable about using libtool...

-- 
Matthew Peterson
Sr. Software Engineer
Caldera Systems, Inc
mpeterson at caldera.com




More information about the samba-technical mailing list