caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Pierre-Etienne Meunier <pierreetienne.meunier@gmail.com>
To: Samuel Hornus <samuel.hornus@inria.fr>
Cc: O Caml <caml-list@inria.fr>
Subject: Re: [Caml-list] camlimages problems on mac
Date: Wed, 7 Nov 2012 11:43:30 -0300	[thread overview]
Message-ID: <63455026-B336-4506-A3C2-E3A87AE9052D@gmail.com> (raw)
In-Reply-To: <3A52788A-5B74-490E-9678-5C5C1578C524@inria.fr>

[-- Attachment #1: Type: text/plain, Size: 639 bytes --]

A while ago, I sent Pierre Weis a patch to make camlimages compatible with the new versions of libpng. I do not know if he used it, but please find it attached. This should solve the first problem. Next, there is a bug in omake, which prevents the libraries from being detected properly. The "dummy" version of the files get used instead of the correct ones. A friend of mine, Florian Hatat, sent a correction for ubuntu. We did not test it on mac.

Maybe some ocamlbuild expert could write some tags to make camlimages compile with ocamlbuild ? This library is really useful, only the build system is hard to use.

Cheers,
Pierre


[-- Attachment #2: png.diff --]
[-- Type: application/octet-stream, Size: 2042 bytes --]

--- src/pngwrite.c.old	2011-06-22 20:04:32.000000000 +0200
+++ src/pngwrite.c	2012-10-19 09:26:26.000000000 +0200
@@ -62,7 +62,7 @@
   }
 
   /* error handling */
-  if (setjmp(png_ptr->jmpbuf)) {
+  if (setjmp(png_jmpbuf(png_ptr))) {
     /* Free all of the memory associated with the png_ptr and info_ptr */
     png_destroy_write_struct(&png_ptr, &info_ptr);
     fclose(fp);
@@ -171,7 +171,7 @@
   }
 
   /* error handling */
-  if (setjmp(png_ptr->jmpbuf)) {
+  if (setjmp(png_jmpbuf(png_ptr))) {
     /* Free all of the memory associated with the png_ptr and info_ptr */
     png_destroy_write_struct(&png_ptr, &info_ptr);
     fclose(fp);
--- src/pngread.c.old	2011-06-22 20:04:32.000000000 +0200
+++ src/pngread.c	2012-10-19 09:26:36.000000000 +0200
@@ -69,7 +69,7 @@
   }
 
   /* error handling */
-  if (setjmp(png_ptr->jmpbuf)) {
+  if (setjmp(png_jmpbuf(png_ptr))) {
     /* Free all of the memory associated with the png_ptr and info_ptr */
     png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
     fclose(fp);
@@ -134,7 +134,7 @@
     png_set_rows(png_ptr, info_ptr, row_pointers);
 
     /* Later, we can return something */
-    if (setjmp(png_ptr->jmpbuf)) {
+    if (setjmp(png_jmpbuf(png_ptr))) {
       /* Free all of the memory associated with the png_ptr and info_ptr */
       png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
       fclose(fp);
@@ -243,7 +243,7 @@
   }
 
   /* error handling */
-  if (setjmp(png_ptr->jmpbuf)) {
+  if (setjmp(png_jmpbuf(png_ptr))) {
     /* Free all of the memory associated with the png_ptr and info_ptr */
     png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
     fclose(fp);
@@ -302,7 +302,7 @@
     png_set_rows(png_ptr, info_ptr, row_pointers);
 
     /* Later, we can return something */
-    if (setjmp(png_ptr->jmpbuf)) {
+    if (setjmp(png_jmpbuf(png_ptr))) {
       /* Free all of the memory associated with the png_ptr and info_ptr */
       png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
       fclose(fp);

[-- Attachment #3: Type: text/plain, Size: 954 bytes --]





Em 07/11/2012, às 09:52, Samuel Hornus escreveu:

> 
> Hello,
> 
> When installing camlimages 4.0.1 with MacPort (Mac OS X 10.7.5, Latest MacPorts),
> the resulting camlimages has no support for JPEG, PNG, PPM, XPM, etc… which makes it sort of useless.
> 
> When compiling the source using omake, the same happens. It can find the header files, but can't find specific functions inside.
> 
> The source code for camlimages seems perhaps outdated w.r.t. changes in the API of libpng, libjpg, giflib, tifflib, etc… 
> 
> Could anyone confirms this dire state of affairs? Is there a "modernizer" patch floating around? or some work in progress? Is it the same on Linux?
> 
> Thank you,
> Samuel
> -- 
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs


  parent reply	other threads:[~2012-11-07 14:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-07 12:52 Samuel Hornus
2012-11-07 13:20 ` Alan Schmitt
2012-11-07 14:04   ` Samuel Hornus
2012-11-07 14:22     ` AW: " Gerd Stolpmann
2012-11-07 14:30     ` Alan Schmitt
2012-11-07 14:43 ` Pierre-Etienne Meunier [this message]
2012-11-13 11:28   ` Samuel Hornus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=63455026-B336-4506-A3C2-E3A87AE9052D@gmail.com \
    --to=pierreetienne.meunier@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=samuel.hornus@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).