HUGE .libs dir!

Derek Atkins warlord@MIT.EDU
08 Nov 2001 21:03:08 -0500


Dave Peticolas <dave@krondo.com> writes:

> I haven't noticed temporary .so files, but the new libtool
> puts the .o files in .libs instead of the current dir. You
> can remove the .o files in the original locations. make clean
> should get rid of them, though.
> 
> dave

I certainly have noticed.  During the build process it winds up
linking in each .o file into a new .so.  In other words, if you're
linking 34 .o files into a .so, it will generate 34 .so files as it
links in each file individually.  When it's done it removes the
temporary .so file, but it means it can use an extra 100MB during the
build process!

Here is an excerpt from my build log:

creating a temporary reloadable object file: .libs/libgncgnome.la-34.o
/usr/bin/ld -r -o .libs/libgncgnome.la-1.o .libs/argv-list-converters.o 
/usr/bin/ld -r -o .libs/libgncgnome.la-2.o .libs/dialog-account.o .libs/libgncgnome.la-1.o
/usr/bin/ld -r -o .libs/libgncgnome.la-3.o .libs/dialog-column-view.o .libs/libgncgnome.la-2.o
/usr/bin/ld -r -o .libs/libgncgnome.la-4.o .libs/dialog-commodities.o .libs/libgncgnome.la-3.o
/usr/bin/ld -r -o .libs/libgncgnome.la-5.o .libs/dialog-dup-trans.o .libs/libgncgnome.la-4.o
/usr/bin/ld -r -o .libs/libgncgnome.la-6.o .libs/dialog-fincalc.o .libs/libgncgnome.la-5.o
/usr/bin/ld -r -o .libs/libgncgnome.la-7.o .libs/dialog-find-transactions.o .libs/libgncgnome.la-6.o
/usr/bin/ld -r -o .libs/libgncgnome.la-8.o .libs/dialog-new-user.o .libs/libgncgnome.la-7.o
/usr/bin/ld -r -o .libs/libgncgnome.la-9.o .libs/dialog-price-editor.o .libs/libgncgnome.la-8.o
/usr/bin/ld -r -o .libs/libgncgnome.la-10.o .libs/dialog-print-check.o .libs/libgncgnome.la-9.o

[snip]

/usr/bin/ld -r -o .libs/libgncgnome.la-34.o .libs/dialog-sxsincelast.o .libs/libgncgnome.la-33.o
gcc -shared .libs/libgncgnome.la-34.o  -Wl,--rpath -Wl,/afs/sipb/project/gnucash-test/build/i386_linux24/gnucash/src/guile/.libs -Wl,--rpath -Wl,/usr/athena/lib -Wl,--rpath -Wl,/afs/sipb.mit.edu/project/gnucash-test/arch/i386_linux24/lib -Wl,--rpath -Wl,/usr/athena/lib  -L/usr/X11R6/lib -L/usr/lib -L/usr/src/athena/athtools/usr/athena/lib -L/usr/athena/lib ../guile/.libs/libgncguile.so /usr/athena/lib/libgnomeui.so /usr/athena/lib/libart_lgpl.so /usr/athena/lib/libgdk_imlib.so -lSM -lICE /usr/athena/lib/libgtk.so /usr/athena/lib/libgdk.so /usr/athena/lib/libgmodule.so -lXext -lX11 /usr/athena/lib/libgnome.so /usr/athena/lib/libgnomesupport.so /usr/athena/lib/libesd.so -laudiofile -ldb1 /usr/athena/lib/libglib.so -lguile -L/usr/src/bs/BUILD/guile-1.3.4/libguile -L/usr/src/bs/BUILD/guile-1.3.4/libguile/.libs -ldl /usr/lib/libpopt.so -lm   -Wl,-R/usr/athena/lib -Wl,-R/usr/athena/lib -Wl,-soname -Wl,libgncgnome.so.0 -o .libs/libgncgnome.so.0.0.0
rm -f .libs/libgncgnome.la-1.o .libs/libgncgnome.la-2.o .libs/libgncgnome.la-3.o .libs/libgncgnome.la-4.o .libs/libgncgnome.la-5.o .libs/libgncgnome.la-6.o .libs/libgncgnome.la-7.o .libs/libgncgnome.la-8.o .libs/libgncgnome.la-9.o .libs/libgncgnome.la-10.o .libs/libgncgnome.la-11.o .libs/libgncgnome.la-12.o .libs/libgncgnome.la-13.o .libs/libgncgnome.la-14.o .libs/libgncgnome.la-15.o .libs/libgncgnome.la-16.o .libs/libgncgnome.la-17.o .libs/libgncgnome.la-18.o .libs/libgncgnome.la-19.o .libs/libgncgnome.la-20.o .libs/libgncgnome.la-21.o .libs/libgncgnome.la-22.o .libs/libgncgnome.la-23.o .libs/libgncgnome.la-24.o .libs/libgncgnome.la-25.o .libs/libgncgnome.la-26.o .libs/libgncgnome.la-27.o .libs/libgncgnome.la-28.o .libs/libgncgnome.la-29.o .libs/libgncgnome.la-30.o .libs/libgncgnome.la-31.o .libs/libgncgnome.la-32.o .libs/libgncgnome.la-33.o .libs/libgncgnome.la-34.o

All these .o file get to be HUGE during the process!!!

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available