Build errors 6.4.8-8

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
iEF
Posts: 1
Joined: 2013-04-12T20:03:45-07:00
Authentication code: 6789
Location: ~/

Build errors 6.4.8-8

Post by iEF »

OS: OS X 10.7.5
IM: 6.4.8-8
(w/ libpng-1.6.1, jpeg-9, libtiff-4.0.3)
- - - - -

I updated to 6.4.8-8 yesterday, and I had some errors, so I thought I should report them. Last configure/update I made was 6.4.8-4 and that one was ok with the same configure line:

Code: Select all

./configure --prefix=/usr/local --disable-dependency-tracking --without-perl
When running make:

Code: Select all

coders/jpeg.c: In function 'FillInputBuffer':
coders/jpeg.c:248: error: 'FALSE' undeclared (first use in this function)
coders/jpeg.c:248: error: (Each undeclared identifier is reported only once
coders/jpeg.c:248: error: for each function it appears in.)
coders/jpeg.c:257: error: 'TRUE' undeclared (first use in this function)
coders/jpeg.c: In function 'InitializeSource':
coders/jpeg.c:274: error: 'TRUE' undeclared (first use in this function)
coders/jpeg.c: In function 'EmptyOutputBuffer':
coders/jpeg.c:1564: error: 'TRUE' undeclared (first use in this function)
make[2]: *** [coders/magick_libMagickCore_6_Q16_la-jpeg.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
(+ line 256 ... also had captial letters)

I could fix it by changing the TRUE/FALSE to small letters. Then the install was ok.
It's like they were treated like constants intead of bool values when being in capital letters? Perhaps I should make all the NULL -> null to?



Here's a patch of my bypass:

Code: Select all

--- jpeg.c.original	2013-04-07 18:20:50.000000000 +0200
+++ jpeg.c	2013-04-12 04:42:24.000000000 +0200
@@ -246,5 +246,5 @@ static boolean FillInputBuffer(j_decompr
   if (source->manager.bytes_in_buffer == 0)
     {
-      if (source->start_of_blob != FALSE)
+      if (source->start_of_blob != false)
         ERREXIT(cinfo,JERR_INPUT_EMPTY);
       WARNMS(cinfo,JWRN_JPEG_EOF);
@@ -254,6 +254,6 @@ static boolean FillInputBuffer(j_decompr
     }
   source->manager.next_input_byte=source->buffer;
-  source->start_of_blob=FALSE;
-  return(TRUE);
+  source->start_of_blob=false;
+  return(true);
 }
 
@@ -272,5 +272,5 @@ static void InitializeSource(j_decompres
 
   source=(SourceManager *) cinfo->src;
-  source->start_of_blob=TRUE;
+  source->start_of_blob=true;
 }
 
@@ -1562,5 +1562,5 @@ static boolean EmptyOutputBuffer(j_compr
     ERREXIT(cinfo,JERR_FILE_WRITE);
   destination->manager.next_output_byte=destination->buffer;
-  return(TRUE);
+  return(true);
 }
 
/Eric
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Build errors 6.4.8-8

Post by magick »

FALSE / TRUE are defines declared in the JPEG jmorecfg.h header file. This same code has compiled without complaint for 10+ years now. We're not sure why its failing for you.
ryandesign
Posts: 17
Joined: 2012-05-22T18:37:42-07:00
Authentication code: 13

Re: Build errors 6.4.8-8

Post by ryandesign »

It's because jpeg 9 removed those defines.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Build errors 6.4.8-8

Post by magick »

Perhaps they have been restored. Downloaded http://ijg.org/files/jpegsrc.v9a.tar.gz and jmorecfg.h includes declarations for TRUE / FALSE and they are used throughout the JPEG library source distribution. The JPEG library usage docs, libjpeg.txt, includes numerous references to using TRUE and FALSE.
Post Reply