[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Two questions about bundles

From: David Chisnall
Subject: Re: Two questions about bundles
Date: Thu, 28 Aug 2008 21:43:01 +0100

On 28 Aug 2008, at 21:27, Peter Cooper wrote:


I'm looking at using bundles for a non-gui tool. A curious thing is that I get a lot of superfluous libraries automatically linked.

These are not superfluous.

        linux-gate.so.1 =>  (0xb7f31000)

System call interface for glibc.

libgnustep-gui.so.0.14 => /usr/GNUstep/System/Library/ Libraries/libgnustep-gui.so.0.14 (0xb7b67000)

GNUstep AppKit implementation. Possibly superfluous for a tool, but it contains things like NSImage and the NSAttributedString additions, and so it's sometimes useful.

libgnustep-base.so.1.17 => /usr/GNUstep/System/Library/ Libraries/libgnustep-base.so.1.17 (0xb77a5000)

GNUstep Foundation implementation.

libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb777a000)

POSIX threading library.  Needed by libobjc and by NSThread.

        libobjc.so.2 => /usr/lib/libobjc.so.2 (0xb7760000)

Objective-C runtime library.  Needed by all Objective-C code.

        libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb773b000)

Maths library.  Provides implementations of things in math.h.

        libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb75ec000)

C standard library.

(lots removed)

        /lib/ld-linux.so.2 (0xb7f32000)

Loader stubs.  Needed by any program

        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb72d8000)

GCC stub routines. Contains things that are instructions on some architectures.

        libtasn1.so.3 => /usr/lib/libtasn1.so.3 (0xb72c8000)

asn1 parsing library.

        libgcrypt.so.11 => /lib/libgcrypt.so.11 (0xb727b000)
        libgpg-error.so.0 => /lib/libgpg-error.so.0 (0xb7277000)

Encryption routines needed by various parts of Foundation.

I'm running on an Ubuntu Dapper 32 bit i386 system, with GNUstep being a fairly recent check-out from svn.

What am I doing wrong?

Failing to understand the output from ldd, which is not entirely your fault, and is more to do with the fact that the UNIX linker is monumentally stupid. While you would expect to only link against the libraries you use, and have the routines they use exposed to you (as it worked in VMS, Multics, and pretty much any real OS), this is not what happens on UNIX. Instead, every library you use and every library it uses (and so on) is linked directly against your program, and pollutes your namespace. The output from ldd lists every library you use, and every library it uses. It's not unusual for this to be a really long list even for fairly simple programs.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]