GNOME Bugzilla – Bug 635038
Fails to build on GNU/Hurd
Last modified: 2011-03-21 22:41:55 UTC
From http://bugs.debian.org/601906: gimp FTBFS on Debian GNU/Hurd, because one of its plugins uses the PATH_MAX constant unconditionnally. PATH_MAX is optional in POSIX and undefined on GNU/Hurd, as there is no global limit to path sizes. Here is a very simple patch to fix the problem. A better solution would be to use dynamic allocation instead of fixed-size buffers, but that would require a much larger patch. diff -Nurp gimp-2.6.11.orig/plug-ins/common/qbist.c gimp-2.6.11/plug-ins/common/qbist.c --- gimp-2.6.11.orig/plug-ins/common/qbist.c 2010-07-03 00:51:56.000000000 +0200 +++ gimp-2.6.11/plug-ins/common/qbist.c 2010-10-31 01:08:03.764667339 +0200 @@ -41,8 +41,14 @@ #include "libgimp/stdplugins-intl.h" -#if ! defined PATH_MAX && defined _MAX_PATH -# define PATH_MAX _MAX_PATH +#if ! defined PATH_MAX +# if defined _MAX_PATH +# define PATH_MAX _MAX_PATH +# elif defined MAXPATHLEN +# define PATH_MAX MAXPATHLEN +# else +# define PATH_MAX 1024 +# endif #endif /** qbist renderer ***********************************************************/
Ew. I would much rather see this fixed by handling any path size using GLib stuff like GString.
Ari, you can simply push whatever it takes (and is correct of course) to fix the build for 2.6. What Martin said applies to master of course.
No point in having this on the 2.6 milestone without a patch attached
But it's a real build failure that should be fixed at least in 2.8, and I have no problem to take the quick fix from the initial comment.
What the heck, it's just a plugin, applied the proposed patch: commit 28aa26fb281d3d4c0bb5b674fb10ca901bf81071 Author: Michael Natterer <mitch@gimp.org> Date: Mon Mar 21 23:40:05 2011 +0100 Bug 635038 - Fails to build on GNU/Hurd Apply patch from Ari Pollak that tries harder to get a value for PATH_MAX. plug-ins/common/qbist.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)