[gdal-dev] Error when compiling GDAL trunk

Even Rouault even.rouault at mines-paris.org
Thu Mar 22 15:55:47 EDT 2012


Le jeudi 22 mars 2012 17:28:14, Jean-Claude Repetto a écrit :
> Le 22/03/2012 16:35, Kyle Shannon a écrit :
> > Jean Claude,
> > I have a gdal test machine running Ubuntu 11.10.  I build zlib 1.2.6 and
> > built and linked gdal against it no problems.  Probably doesn't help
> > much.
> 
> It seems the problem is specific to Gentoo. Please read
> https://bugs.gentoo.org/show_bug.cgi?id=383179 .
> 
> Some people say that the OF macro is a zlib internal macro and should
> not be used in applications.

Yeah, that's because we have a copy of minizip which happens to uses the OF 
macro.

You can probably fix the issue with the following patch (untested) :

$ svn diff port/cpl_minizip_ioapi.h 
Index: port/cpl_minizip_ioapi.h
===================================================================
--- port/cpl_minizip_ioapi.h	(révision 24142)
+++ port/cpl_minizip_ioapi.h	(copie de travail)
@@ -21,6 +21,12 @@
 #include "cpl_vsi.h"
 #define uLong64 vsi_l_offset
 
+/* Gentoo removed OF from their copy of zconf.h 
(https://bugs.gentoo.org/show_bug.cgi?id=383179) */
+/* but our copy of minizip needs it. */
+#ifndef OF
+#define OF(args) args
+#endif
+
 #define ZLIB_FILEFUNC_SEEK_CUR (1)
 #define ZLIB_FILEFUNC_SEEK_END (2)
 #define ZLIB_FILEFUNC_SEEK_SET (0)

I'm a bit hesitant to apply that for now. Hopefully Gentoo will revert their 
change under user pressure. Please complain loudly in the ticket ;-)

> 
> Regards,
> Jean-Claude
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list