* Re: [Caml-list] Building camlimages programs on deb (and linux) [not found] <D4DBD8568F05D511A1C20002A55C008C11AC0796@uswaumsx03medge.med.ge.com> @ 2003-11-24 18:48 ` chris.danx 2003-11-24 20:46 ` Jun.Furuse 0 siblings, 1 reply; 9+ messages in thread From: chris.danx @ 2003-11-24 18:48 UTC (permalink / raw) To: Gurr, David (MED, self), Caml Mailing List Gurr, David (MED, self) wrote: > Unix linkers can be very "helpful". Forgive me if you > already know this but the link order is important. No I didn't know what, thanks. > The dependant lib comes before the lib that it depends on. > And if you have circular dependencies you will need to > link a lib multiple times. So: > >>ocamlc `camlimages-config` -cclib "-L/usr/X11R6/lib >> -lxvthumb -lXpm -lX11 -lpng -lfreetype -lz -ljpeg -lgif" >>monochrome.ml Just tried that... :( I updated my system, if there is a bug in Xpm it hasn't been fixed (some how I doubt it's a bug - it's more likely me doing something daft). Interestingly if I take the program off it still complains... ocamlc `camlimages-config` -cclib "-L/usr/X11R6/lib -lxvthumb -lXpm -lX11 -lpng -lfreetype -lz -ljpeg -lgif" So I guess that it comes from linking with the ocaml files specified in camlimages-config with the libraries... -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 If i leave ci_xpm.cma off, it links. I don't know if it's safe to leave it off. I suppose if I don't use XPM it'll be ok, but it's not the greatest solution. 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Caml-list] Building camlimages programs on deb (and linux) 2003-11-24 18:48 ` [Caml-list] Building camlimages programs on deb (and linux) chris.danx @ 2003-11-24 20:46 ` Jun.Furuse 2003-11-24 23:02 ` chris.danx 0 siblings, 1 reply; 9+ messages in thread From: Jun.Furuse @ 2003-11-24 20:46 UTC (permalink / raw) To: chris.danx; +Cc: Gurr, David (MED, self), Caml Mailing List Hello, > ocamlc `camlimages-config` -cclib "-L/usr/X11R6/lib -lxvthumb -lXpm > -lX11 -lpng -lfreetype -lz -ljpeg -lgif" 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.) 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" > If i leave ci_xpm.cma off, it links. I don't know if it's safe to leave > it off. I suppose if I don't use XPM it'll be ok, but it's not the > greatest solution. 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. Anyway, you found a bug of camlimages. Usually Xpm requires X11, but I forgot to link it. I will fix the problem. -- Jun ------------------- 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Caml-list] Building camlimages programs on deb (and linux) 2003-11-24 20:46 ` Jun.Furuse @ 2003-11-24 23:02 ` chris.danx 2003-11-25 10:42 ` Jun.Furuse 0 siblings, 1 reply; 9+ messages in thread From: chris.danx @ 2003-11-24 23:02 UTC (permalink / raw) To: Jun.Furuse; +Cc: Caml Mailing List 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Caml-list] Building camlimages programs on deb (and linux) 2003-11-24 23:02 ` chris.danx @ 2003-11-25 10:42 ` Jun.Furuse 0 siblings, 0 replies; 9+ messages in thread From: Jun.Furuse @ 2003-11-25 10:42 UTC (permalink / raw) To: chris.danx; +Cc: Jun.Furuse, Caml Mailing List > > 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. :? Oops, sorry. You are correct. There is no libxvthumb. > 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 Everyhing seems to be ok. > Also if -custom is removed it fails. Yes, it also happens in my system, too. This is due to a bug that the dynlink options of ci_xpm.cma lack -lX11. I did not notice this bug since I always linked ci_xpm.cma with ci_graphics.cma together, which links -lX11. I will fix this soon. -- Jun ------------------- 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Caml-list] Building camlimages programs on deb (and linux) @ 2003-11-24 0:27 chris.danx 2003-11-24 1:08 ` Issac Trotts 0 siblings, 1 reply; 9+ messages in thread From: chris.danx @ 2003-11-24 0:27 UTC (permalink / raw) To: Caml Mailing List Hi, I'm in the process of making a script to build programs with camlimages easier but have hit a snag linking... the output is Error on dynamically loaded library: /usr/X11R6/lib/libXpm.so.4: undefined symbol: XDefaultScreen Does anyone else get this problem? ocamlc `camlimages-config` monochrome.ml -cclib "-L/usr/X11R6/lib -lXpm -lpng -lfreetype -lz -ljpeg -gif" camlimages-config is simply #!/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_xpm.cma ci_bmp.cma ci_ppm.cma ci_png.cma ci_ps.cma ci_xvthumb.cma ------------------- 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Caml-list] Building camlimages programs on deb (and linux) 2003-11-24 0:27 chris.danx @ 2003-11-24 1:08 ` Issac Trotts 2003-11-24 17:34 ` chris.danx 0 siblings, 1 reply; 9+ messages in thread From: Issac Trotts @ 2003-11-24 1:08 UTC (permalink / raw) To: caml-list On Mon, Nov 24, 2003 at 12:27:37AM +0000, chris.danx wrote: > Hi, > > I'm in the process of making a script to build programs with camlimages > easier but have hit a snag linking... the output is > > Error on dynamically loaded library: /usr/X11R6/lib/libXpm.so.4: > undefined symbol: XDefaultScreen $ grep XDefaultScreen /usr/X11R6/lib/* Binary file /usr/X11R6/lib/libX11.a matches Binary file /usr/X11R6/lib/libX11.so matches Binary file /usr/X11R6/lib/libX11.so.6 matches Binary file /usr/X11R6/lib/libX11.so.6.2 matches Binary file /usr/X11R6/lib/libXpm.a matches Binary file /usr/X11R6/lib/libXpm.so matches Binary file /usr/X11R6/lib/libXpm.so.4 matches Binary file /usr/X11R6/lib/libXpm.so.4.11 matches so maybe it will work if you include -lX11 in your link line. ocamlc `camlimages-config` monochrome.ml -cclib "-L/usr/X11R6/lib -lX11 -lXpm -lpng -lfreetype -lz -ljpeg -gif" > > Does anyone else get this problem? > > ocamlc `camlimages-config` monochrome.ml -cclib "-L/usr/X11R6/lib -lXpm > -lpng -lfreetype -lz -ljpeg -gif" > > > camlimages-config is simply > > #!/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_xpm.cma ci_bmp.cma ci_ppm.cma ci_png.cma ci_ps.cma ci_xvthumb.cma > > > ------------------- > 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 > -- Issac Trotts ------------------- 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Caml-list] Building camlimages programs on deb (and linux) 2003-11-24 1:08 ` Issac Trotts @ 2003-11-24 17:34 ` chris.danx 2003-11-24 18:50 ` Matt Gushee 0 siblings, 1 reply; 9+ messages in thread From: chris.danx @ 2003-11-24 17:34 UTC (permalink / raw) To: caml-list Issac Trotts wrote: > $ grep XDefaultScreen /usr/X11R6/lib/* > Binary file /usr/X11R6/lib/libX11.a matches > Binary file /usr/X11R6/lib/libX11.so matches > Binary file /usr/X11R6/lib/libX11.so.6 matches > Binary file /usr/X11R6/lib/libX11.so.6.2 matches > Binary file /usr/X11R6/lib/libXpm.a matches > Binary file /usr/X11R6/lib/libXpm.so matches > Binary file /usr/X11R6/lib/libXpm.so.4 matches > Binary file /usr/X11R6/lib/libXpm.so.4.11 matches > > so maybe it will work if you include -lX11 in your link line. I tried your suggestion, but it didn't work. :( It's defined in Xlib.h, so I included Xlib in the link options, but it didn't complete the link (same error). ocamlc `camlimages-config` -cclib "-L/usr/X11R6/lib -L/usr/X11R6/lib/X11 -lX11 -lXlib -lxvthumb -lXpm -lpng -lfreetype -lz -ljpeg -lgif" monochrome.ml Wonder if the lib is mangled? I'll do an update to see... Cheers, 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Caml-list] Building camlimages programs on deb (and linux) 2003-11-24 17:34 ` chris.danx @ 2003-11-24 18:50 ` Matt Gushee 2003-11-24 19:10 ` chris.danx 0 siblings, 1 reply; 9+ messages in thread From: Matt Gushee @ 2003-11-24 18:50 UTC (permalink / raw) To: caml-list On Mon, Nov 24, 2003 at 05:34:41PM +0000, chris.danx wrote: [ ... about troubles compiling CamlImages ... ] I'm afraid I can't help with CamlImages, but a possible alternative is GD4O, which is a wrapper for the GD graphics library. Since you haven't stated your plans very specifically, it's hard to say if it will do what you need. also, the OCaml wrapper is incomplete and I consider it to be alpha-quality code; but when it is finished, it will be a complete implementation of the GD API, providing a very nice set of drawing functions and a modest set of transformation functions. The GD API is described at: http://www.boutell.com/gd/manual2.0.15.html And the following document describes which functions are currently implemented in GD4O: http://havenrock.com/software/gd4o/doc/api-xref.html You will notice that none of the copying and resizing functions are implemented yet, but--since they happen to be quite simple to code, and I happen to have a little time today--I'm just going to go ahead and implement them right now. And even if you're not interested, I don't mind: they need to be done sooner or later anyway. Feel free to get in touch if you have questions. -- Matt Gushee When a nation follows the Way, Englewood, Colorado, USA Horses bear manure through mgushee@havenrock.com its fields; http://www.havenrock.com/ When a nation ignores the Way, Horses bear soldiers through its streets. --Lao Tzu (Peter Merel, trans.) ------------------- 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Caml-list] Building camlimages programs on deb (and linux) 2003-11-24 18:50 ` Matt Gushee @ 2003-11-24 19:10 ` chris.danx 0 siblings, 0 replies; 9+ messages in thread From: chris.danx @ 2003-11-24 19:10 UTC (permalink / raw) To: caml-list Matt Gushee wrote: > > I'm afraid I can't help with CamlImages, but a possible alternative is > GD4O, which is a wrapper for the GD graphics library. Since you haven't > stated your plans very specifically, it's hard to say if it will do what > you need. also, the OCaml wrapper is incomplete and I consider it to be > alpha-quality code; but when it is finished, it will be a complete > implementation of the GD API, providing a very nice set of drawing > functions and a modest set of transformation functions. Thanks for the pointer. My intentions are twofold, first I want to load textures in different formats to use with OpenGL (png and jpeg specifically). I also want to develop an image processing program. I started doing it in Ada, but got fed up having to bind to libjpeg, libpng, ... write bmp loading code, etc. I probably would've went on with it in Ada, but I wanted to use a functional language for something sizeable. 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2003-11-25 10:42 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <D4DBD8568F05D511A1C20002A55C008C11AC0796@uswaumsx03medge.med.ge.com> 2003-11-24 18:48 ` [Caml-list] Building camlimages programs on deb (and linux) chris.danx 2003-11-24 20:46 ` Jun.Furuse 2003-11-24 23:02 ` chris.danx 2003-11-25 10:42 ` Jun.Furuse 2003-11-24 0:27 chris.danx 2003-11-24 1:08 ` Issac Trotts 2003-11-24 17:34 ` chris.danx 2003-11-24 18:50 ` Matt Gushee 2003-11-24 19:10 ` chris.danx
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox