php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48389 simple fix to make PHP build on GNU/Hurd
Submitted: 2009-05-25 18:12 UTC Modified: 2009-06-02 01:00 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: thijs at debian dot org Assigned:
Status: No Feedback Package: Compile Failure
PHP Version: 5.2.9 OS: GNU/Hurd
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2009-05-25 18:12 UTC] thijs at debian dot org
Description:
------------
We got a request to make PHP5 on the Hurd operating system. Currently it fails but there's a simple patch that makes it work. Here's the patch to fix the issue, please consider applying it:
http://www.a-eskwadraat.nl/~kink/php5_build_hurd.patch


Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-05-25 18:53 UTC] rasmus@php.net
That patch doesn't make much sense to me.  You are adding it to php.h and also to files that are already including php.h.  And proc_open.c only uses PATH_MAX inside a block of code surrounded by 

#elif defined(NETWARE)

and presumably Hurd does not look like Netware so why are you adding it there?

And tsrm_config_common.h already has a check for whether PATH_MAX is defined.  

We would love to support Hurd, but let's have a cleaner patch.  How about posting the build errors from an unpatched PHP build?
 [2009-05-25 23:12 UTC] duck at hurdfr dot org
Using the .h files was in order to centralize the code addition, but perhaps i missed part of the include chain and it can be reduced again, sorry.

The important thing to know about this bug is that relying unconditionnally on PATH_MAX (and MAXPATHLEN and friends) is an important POSIX incompatibility. On Hurd, there no such limit, then PATH_MAX is not defined at all. So, the perfect patch would be to use dynamic allocation whereas PATH_MAX is undefined and use PATH_MAX if it is, but this would require quite more work. As we are working on inner Hurd code, we do not have time to produce so many long patch for all the non-POSIX-aware code of the world, but this patch is a simple and perfectly working workaround. PHP is an important piece of software, blocking a large amount of other softwares to build/run, so we really do need this fixed.

Thanks for your help.
 [2009-06-02 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 08:01:28 2024 UTC