minaco2 / distcc

Automatically exported from code.google.com/p/distcc
GNU General Public License v2.0
0 stars 0 forks source link

distcc doesn't build on Debian GNU Hurd-i386 because of requiring PATH_MAX #77

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
distcc 3.1 fails to build on Debian Hurd, because it depends on the PATH_MAX 
macro, which is not defined on Hurd.

The build failure is in 
<https://buildd.debian.org/fetch.cgi?&pkg=distcc&ver=3.1-3.2&arch=hurd-i386&stam
p=1291631237&file=log> and the key error is:

src/stringmap.c: In function 'stringmap_load':
src/stringmap.c:41: error: 'PATH_MAX' undeclared (first use in this function)
src/stringmap.c:41: error: (Each undeclared identifier is reported only once
src/stringmap.c:41: error: for each function it appears in.)

To fix this, distcc needs to be changed to not count on there being any static 
limit to path lengths: 
http://www.gnu.org/software/hurd/hurd/porting/guidelines.html#PATH_MAX_tt_MAX_PA
TH_tt_MAXPATHL

Original issue reported on code.google.com by martinp...@gmail.com on 14 Dec 2010 at 10:30

GoogleCodeExporter commented 9 years ago
There is a patch for this on Debian BTS[1] which you may be aware of.

src/stringmap.c uses PATH_MAX to size a read buffer, not to actually store 
paths.  Looks like the patch author opted to just set this to a reasonable 
default instead of (more appropriately) renaming the constant.

src/zeroconf.c doesn't need PATH_MAX as the size of the paths are known in 
advance.

Both of which seem acceptable solutions.  After applying the program compiles 
on all Debian buildds.[2]

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=638258
[2] https://buildd.debian.org/status/package.php?p=distcc

Original comment by mand...@gmail.com on 16 Mar 2012 at 3:59

GoogleCodeExporter commented 9 years ago
The patch looks good to me.
Applied to the distcc svn repository in revision 765.

Original comment by fergus.h...@gmail.com on 10 Apr 2012 at 5:24