[tex-live] Mac OS X compilation failure (revision 3204)

Jonathan Kew jonathan_kew at sil.org
Mon Jan 8 11:12:41 CET 2007

On 8 Jan 2007, at 7:45 am, Gerben Wierda wrote:

> On Mac OS X compilation fails after
> gcc -g -O2 -o xdvipdfmx [..SNIP..]  /usr/local/lib/libpng12.dylib - 
> lz ../../../libs/freetype2/.libs/libfreetype.a /usr/local/Build/ 
> powerpc/TeXLive.2006/texk/kpathsea/.libs/libkpathsea.a -lm
> gcc: /usr/local/lib/libpng12.dylib: No such file or directory
> make[6]: *** [xdvipdfmx] Error 1
> The reason is configuration with --with-system-pnglib, where the  
> installed png lib is available as .a but not as .dylib, while the  
> makefile assumes a hardcoded location of the dylib in /usr/local/lib
> -rw-r--r--   1 root  admin  1134676 Sep 28 17:29 /usr/local/lib/ 
> libpng.a
> lrwxrwxrwx   1 root  admin       11 Sep 28 17:36 /usr/local/lib/ 
> libpng.la -> libpng12.la
> -rw-r--r--   1 root  admin  1134676 Sep 28 17:29 /usr/local/lib/ 
> libpng12.a
> -rwxr-xr-x   1 root  admin      818 Sep 28 17:29 /usr/local/lib/ 
> libpng12.la

Offhand, I don't know quite where this would be coming from (can you  
point to it in the Makefile?). I'm guessing that it is a side effect  
of using libtool for the link, and libtool is finding the library  
location but then assuming it should be a dylib rather than static lib.

While it's true that the make seems to be broken under these  
circumstances, I'm wondering why you'd want to build in this way. If  
you only have a static libpng installed, why link with that rather  
than use the default configuration which uses a static libpng from  
TL's own sources?

I thought the purpose of the --with-system-* options was to link  
against installed *dynamic* libs, so that the footprint of the  
binaries would be smaller and so they could benefit from updates to  
installed libs without needing to relink. If you link with a static  
lib, you don't get these benefits.

Further, for the purpose of TL binaries, at least, I don't think we  
should be linking against anything in /usr/local/lib anyway.

So, ideas on how to fix this properly would be welcome, but I think  
the simplest approach is for you to stop using --with-system-pnglib,  
at least if you're building binaries intended for TL.


More information about the tex-live mailing list