[OS X TeX] iInstaller and manually installed components

Anthony Morton anthony.morton at eng.monash.edu.au
Mon Nov 29 21:03:10 EST 2004

> But here is a warning in the opposite direction: If you want to 
> compile your own Unix software, whether with Fink or darwinports or 
> "by hand", then do *not* install i-installer packages like libjpeg, 
> libpng, libwmf, imagemagick and so on. The reason is that these 
> packages install headers into /usr/local/include, libraries into 
> /usr/local/lib, and some config scripts into /usr/local/bin. Every 
> configure script and every preprocessor, compiler and linker will pick 
> these up, if you want it or not, because these directories are in 
> their standard search paths.

This is as it's supposed to be.  /usr/local/lib and /usr/local/include 
exist precisely so that you can install shared libraries there for use 
by Unix software.  Most roll-your-own software distributions require 
that you've already installed some common libraries such as libjpeg or 
zlib, and there are any number of ways of getting hold of them: the 
i-package, GNU-Darwin and many other distributions are completely 
interoperable and quite standard.  No well-behaved software should 
break when linked against them.

> Some compilations will already break early on because of this, others 
> will compile successfully, but the executables will be linked to these 
> libraries, and when you later on update or remove the i-packages in 
> question, your executables will crash. You also cannot run your 
> executables on another machine, unless it has exactly the same 
> collection of i-packages with the same versions installed.

The idea is that once you install a shared library on your system you 
don't remove it, unless it's as part of a process of removing all your 
third-party software and returning to an out-of-the-box installation.  
It becomes part of your OS configuration.  Similarly, if you remove X11 
from your system you don't expect everything that depends on X11 to 
still run.  If you get a newer version of the library you just leave 
the old version there, and any software still linked against the old 
version continues to run.  If you can be bothered you recompile the 
software (which probably has newer versions available too), and then 
you can safely get rid of the old library.

Dependencies are par for the course in the Unix world.  If you're 
writing your own software that uses libjpeg or some other commonly 
available shared library, it's standard practice to expect the user to 
have it installed on their system, rather than bundle the whole library 
with your own application, which just wastes disk space.

There's no reason you should have to hide /usr/local from the linker 
when compiling your own software.  The software will link against the 
latest versions of the shared libraries you have installed, which is as 
it should be.  I compile software by hand fairly regularly, and keep a 
whole bunch of shared libraries in /usr/local for just this purpose.

Tony M.

--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>

More information about the MacOSX-TeX mailing list