libraries and the build system

Daniel Reed n at ml.org
Thu Nov 18 02:35:55 GMT 2004


On 2004-11-17T19:17-0500, Michael Sweet wrote:
) Daniel Reed wrote:
) > On 2004-11-18T09:51+1100, tridge at samba.org wrote:
) > ) but we can't take them on lightly. We need a plan (and volunteers for
) > ) the effort) to create libs that won't be more of a curse than a
) > ) benefit.

Are there any architectural issues that would prohibit Samba from using
Libtool? If so, would it be possible to work with Libtool developers to
resolve those issues?



) versions of libtool.  Beyond those problems, there is the issue of
) libtool hiding how it is doing its work (making debugging of problems
) difficult) and the fact that libtool-created libraries and
) executables cannot be debugged directly - they have to be "installed"
) first (arguably you can set environment variables on most OS's to
) make things work, but you have to do that outside of libtool and
) run/load the binaries from the .libs directories)

Libtool has an "execute" mode that makes testing and debugging uninstalled
executables easier. One of the main features is that the environment
variables needed to find uninstalled libraries are managed automatically by
Libtool, leaving the developer able to focus on the software instead of the
packaging.


dreed at localhost:~/test> file service
service: Bourne shell script text executable

dreed at localhost:~/test> file .libs/service
.libs/service: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), not stripped

dreed at localhost:~/test> .libs/service
.libs/service: error while loading shared libraries: libcadet.so.0: cannot open shared object file: No such file or directory

dreed at localhost:~/test> libtool --mode=execute echo ./service
/home/boston/dreed/test/.libs/lt-service

dreed at localhost:~/test> libtool --mode=execute gdb ./service
GNU gdb Red Hat Linux (6.1post-1.20040607.48rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...(no debugging symbols found)...Using host libthread_db library "/lib/tls/libthread_db.so.1".

(gdb) run
Starting program: /home/boston/dreed/test/.libs/lt-service
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...main
cadet_dance
general2_utility
admiral_electric
admiral_water

Program exited normally.
(gdb)

-- 
Daniel Reed <n at ml.org>	http://people.redhat.com/djr/	http://naim.n.ml.org/
There is a lot of food in a supermarket, too, but a supermarket isn't
the best place to hold a dinner party. -- Christopher Faylor


More information about the samba-technical mailing list