On 09/16/2010 09:50 AM, Jason Grout wrote: > As a follow-up, I've implemented the patch for CXX and also patches for > the other files which do not include Python.h first here: > > http://github.com/jasongrout/matplotlib/commit/a961c299f5d589dae87e06caf54975eb657ebf3b > > > I've also attached the patch. > > This patch gets rid of the warnings about redefining things on OSX > 10.6.4 (see my last message on this thread). > > Thanks, > > Jason
Jason, I tested your patch with Ubuntu 10.10, and it failed. The problem is that something is including setjmp.h before libpng.h tries to do so via pngconf.h, resulting in an error as the compiler trips over the following: # ifndef PNG_SKIP_SETJMP_CHECK # ifdef __linux__ # ifdef _BSD_SOURCE # define PNG_SAVE_BSD_SOURCE # undef _BSD_SOURCE # endif # ifdef _SETJMP_H /* If you encounter a compiler error here, see the explanation * near the end of INSTALL. */ __pngconf.h__ in libpng already includes setjmp.h; __dont__ include it again.; # endif # endif /* __linux__ */ # endif /* PNG_SKIP_SETJMP_CHECK */ The relevant part of INSTALL is: If you encounter a compiler error message complaining about the lines __png.h__ already includes setjmp.h; __dont__ include it again.; this means you have compiled another module that includes setjmp.h, which is hazardous because the two modules might not include exactly the same setjmp.h. If you are sure that you know what you are doing and that they are exactly the same, then you can comment out or delete the two lines. Better yet, use the cexcept interface instead, as demonstrated in contrib/visupng of the libpng distribution. For the most part your patch looks like the right thing, but I don't know what to do about this show-stopping glitch. I looked around, but could not figure out what was including setjmp.h after your patch, but not before. Maybe Mike will see it. Eric ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel