#1142341 cpp-httplib: FTBFS on hurd-amd64 due to missing PATH_MAX

Package:
cpp-httplib
Source:
cpp-httplib
Submitter:
Paolo Torelli
Date:
2026-07-18 20:25:03 UTC
Severity:
normal
Tags:
#1142341#5
Date:
2026-07-18 01:24:38 UTC
From:
To:
Dear Maintainers,

The package cpp-httplib fails to build from source (FTBFS) on the
GNU/Hurd 64-bit architecture (hurd-amd64).

The build process terminates with the following compiler error:
"error: ‘PATH_MAX’ was not declared in this scope"

This happens because GNU/Hurd does not impose any arbitrary
restrictions on file path lengths, and therefore deliberately does not
define the PATH_MAX constant in its headers.

To fix this issue, I implemented a standard fallback macro inside the
affected source file. If PATH_MAX is not defined by the system, it is
dynamically set to a safe temporary default value of 4096.

I have successfully verified this fix by compiling the package locally
using `dpkg-buildpackage` on a running hurd-amd64 environment. A simple
HTTP test server using the compiled .deb package was launched and
verified to work correctly.

Please find attached the patch file ('hurd-path_max.patch') containing
the exact diff for this resolution.

Thank you for your time and for maintaining this package.

Best regards,
[Torelli Paolo / Compsognathus]

#1142341#10
Date:
2026-07-18 01:38:39 UTC
From:
To:
Hi Paolo, brief reply.

Sorry for the brevity, but replying from my phone. Bye!

#1142341#19
Date:
2026-07-18 20:14:17 UTC
From:
To:
Here is the updated patch implementing the dynamic allocation with
realpath(path, nullptr) and std::unique_ptr as suggested. It builds
cleanly and fixes the FTBFS.