ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Urlader/Urlader.pm
(Generate patch)

Comparing Urlader/Urlader.pm (file contents):
Revision 1.5 by root, Sun Jan 8 09:12:52 2012 UTC vs.
Revision 1.6 by root, Mon Jan 9 14:08:28 2012 UTC

346 346
347These can be found at 347These can be found at
348L<http://cvs.schmorp.de/deliantra/Deliantra-Client/util/>, but looking at 348L<http://cvs.schmorp.de/deliantra/Deliantra-Client/util/>, but looking at
349them can lead to premature blindless. 349them can lead to premature blindless.
350 350
351=item Shared Libraries
352
353It is often desirable to package shared libraries - for example the
354Deliantra client packages SD>, Berkely DB, Pango and amny other libraries
355that are unlikely to be available on the target system.
356
357This usually requires some fiddling (see below), and additionally some
358environment variables to be set.
359
360For example, on ELF systems you usually want F<LD_LIBRARY_PATH=.> and on
361OS X, you want F<DYLD_LIBRARY_PATH=.> (these are effectively the default
362on windows).
363
364These can most easily be specified when building the packfile:
365
366 urlader-util ... LD_LIBRARY_PATH=. ./perl run
367
368=item Portability: RPATH
369
370Often F<perl> is linked against a shared F<libperl.so> - and might be so
371using an rpath. Perl extensikns likewise might use an rpath, which means
372the binary will mostly ignore LD_LIBRARY_PATH, which leads to trouble.
373
374There is an utility called F<chrpath>, whose F<-d> option can remove the
375rpath from binaries, shared library and shared objects.
376
377=item Portability: OS X DLL HELL
378
379OS X has the most severe form of DLL hell I have seen - if you link
380against system libraries, which is practically unavoidable, you get
381libraries of well-known names (e.g. libjpeg) that have nothing to do with
382what you normally expect libjpeg to be, and there is no way to get your
383version of libjpeg into your program.
384
385Moreover, even if apple ships well-known libraries (e.g. libiconv), they
386often ship patched versions which have a different ABI or even API then
387the real releases.
388
389The only way aorund this I found was to change all library names
390in my releases (libjpeg.dylib becomes libdeliantra-jpeg.dylin and
391so on), by patching the paths in the share dlibraries and shared
392objects. F<install-name-tool> (with F<-id> and F<-change>) works in many
393cases, but often paths are embedded indirectly, so you might have to use a
394I<dirty> string replacement.
395
351=back 396=back
352 397
353=head1 AUTHOR 398=head1 AUTHOR
354 399
355 Marc Lehmann <schmorp@schmorp.de> 400 Marc Lehmann <schmorp@schmorp.de>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines