Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: [Caml-list] Building camlimages programs on deb (and linux)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: chris.danx <chris.danx@n...>
Subject: Re: [Caml-list] Building camlimages programs on deb (and linux)
Jun.Furuse@inria.fr wrote:
> Hello,

Hi

> Duh, I cannot tell what is wrong. Even we, the authors, do not know
> about the script "camlimages-config". It is not from  the official
> camlimages distribution. (I guess it comes from Debian package, which
> is out of my control.) 

It doesn't come with debian (i wrote it), it simply echoes

-I /usr/lib/ocaml/3.07/camlimages ci_core.cma ci_gif.cma ci_jpeg.cma 
ci_tiff.cma ci_bmp.cma ci_ppm.cma ci_png.cma ci_ps.cma ci_xpm.cma

as in

#!/bin/sh
LIBDIR=/usr/lib/ocaml/3.07/camlimages

echo -I $LIBDIR ci_core.cma ci_gif.cma ci_jpeg.cma ci_tiff.cma 
ci_bmp.cma ci_ppm.cma ci_png.cma ci_ps.cma ci_xpm.cma



> I always use $(CAMLIMAGESLIBS) defined inside
> /usr/local/lib/ocaml/camlimages/Makefile.config for linking the
> camlimages to my programs. It should list all the libraries required.
> 
> BTW, it sounds still strange that you fail to link even with -lX11.
> Please send me what happens (including error messages) if you execute
> the following:
> 
> 	ocamlc -custom -verbose `camlimages-config` 
> 	-cclib "-L/usr/X11R6/lib -lxvthumb -lXpm 
> 	-lX11 -lpng -lfreetype -lz -ljpeg -lgif"

It fails on xvthumb, but if I take that out it links ok. :?

ocamlc -custom -verbose `camlimages-config` -cclib "-L/usr/X11R6/lib 
-lXpm -lX11 -lpng -lfreetype -ljpeg -lgif" monochrome.ml
+ gcc -Wl,-E -o 'a.out' -I'/usr/lib/ocaml/3.07' -L/usr/X11R6/lib 
-Wl,-rpath,/usr/X11R6/lib /tmp/camlprim88d632.c 
'-L/usr/lib/ocaml/3.07/camlimages' '-L/usr/lib/ocaml/3.07' '-lci_xpm' 
'-lXpm' '-lci_png' '-lpng' '-lz' '-lci_tiff' '-ltiff' '-lci_jpeg' 
'-ljpeg' '-lci_gif' '-lgif' '-L/usr/X11R6/lib' '-lXpm' '-lX11' '-lpng' 
'-lfreetype' '-ljpeg' '-lgif' -lcamlrun -lm  -ldl -lcurses -lpthread

with -lxvthumb, it gives an error saying it can't find the lib (it's not 
on the system).

Also if -custom is removed it fails.

> Camlimages libraries are separated into pieces so that you can link
> the libraries you really want. If you are not interested to read/write
> xpm images in your program, you need not to link ci_xpm.cma.

Yeah I know.  It's just that if I wanted to read xpm images, I'd have 
had a problem.


Thanks,
Chris

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners