discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Two questions about bundles


From: Peter Cooper
Subject: Re: Two questions about bundles
Date: Thu, 28 Aug 2008 23:26:18 +0200
User-agent: GNUMail (Version 1.2.0)

On 2008-08-28 22:43:01 +0200 David Chisnall <theraven@sucs.org> 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.

Thanks for your response!

I'm not sure I agree with you though - the dependency on a run-time linked gnustep-gui means that in a non-gui tool I get exceptions from GSFontEnumerator etc when I load the bundle and enumerate classes and methods (the class enumeration happens in code I don't control, at least officially). In a non-GUI tool doing certain kinds of introspection, it is very irritating.

Thanks for the list of the library functions. I've come across most of them at some level of detail in the past ;-).

My question is how do I restrict them to a minimum list using GNUstep-make. I've hand-linked the bundle down to the following

        linux-gate.so.1 =>  (0xb7f07000)
        libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7d53000)
        /lib/ld-linux.so.2 (0xb7f08000)

And a custom library and it still works (for my needs) - no problems using gnustep-base objects and methods (they're linked after all in the code I'm using to load the bundle, and are quite available at truntime to the code actually i the bundle).

...

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

I think a google search will show you people with corner-case problems with this.


Failing to understand the output from ldd, which is not entirely your fault,

Thanks ;-) I suspect I understand it well enough for my purposes, though.

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.

Again, this is output from ldd against a bundle. Not an "executable" or at least not standalone. It is due to be runtime linked into something which has these libraries (although there's some hand-waving social-contract stuff about who will link to what which is needed in commercial distribution environments I think: normally that's easy to regulate).

For bundles and frameworks it doesn't have to be this way, at least as far as I understand: it seems to me to potentially being a misfeature at link time using GNUstep-make for bundles; they certainly work after having a manual link with far fewer libraries on my particular platform, and in my particular case that's a real win.

Thanks again for your views

Peter






reply via email to

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