Version française
Home     About     Download     Resources     Contact us    
Browse thread
OS_X_and_camlimages
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Daniel_Bünzli <daniel.buenzli@e...>
Subject: Re: [Caml-list] OS X and camlimages

Le 6 déc. 04, à 22:57, Christophe Raffalli a écrit :


> * I failed to compile cleanly camlimages on OS X (with fink) (I had to 
> add -L/
> sw/lib and -I/sw/include at the proper places ...

Maybe this should be documented in the INSTALL file :

 > ./configure --help
[...]
Some influential environment variables:
   CC          C compiler command
   CFLAGS      C compiler flags
   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
               nonstandard directory <lib dir>
   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
               headers in a nonstandard directory <include dir>
   CPP         C preprocessor



> * By the way, do you know if and what part of camlimages can be 
> compiled on
> OS X without any fink library.

Here, with X11 and ghostscript installed, configure ends with :

External libraries: lablgl bmp ppm xpm freetype(2) ps

So I think that if you have a standard installation (which does _not_ 
include X11 by default) then you get only the minimum listed in the 
INSTALL files, that is BMP, PPM, PGM, PBM.

> Finally, when linking with GlSurf, I got the following problem which 
> tend to
> prove that libpng is already in the standard OS X library (but I could 
> not find
> the headers, may be I am missing some SDK in xcode):
[...]

> ld: warning multiple definitions of symbol _png_get_uint_31
> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit(single
> module) definition of _png_get_uint_31
> /sw/lib/libpng.dylib(pngrutil.pic.o) definition of _png_get_uint_31

I don't think libpng is present on the system, it is not in /usr/lib. 
And if you look at
the output of

 > otool -L /System/Library/Frameworks/AppKit.framework/AppKit

you will see that the AppKit is not dynamically linked against any 
libpng. If you grep for 'png' in the output of

 > nm /System/Library/Frameworks/AppKit.framework/AppKit

you'll see the symbols of png's api so it must be statically linked in 
the Appkit.

Greetings,

Daniel

P.S. More about that warning in man ld