2025-04-06 05:54 BST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002824Buildsystem[All Projects] Generalpublic2024-11-11 12:08
ReporterJoão 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusnewResolutionopen 
PlatformOSGNU/HurdOS Version
Summary0002824: Porting to GNU/Hurd
DescriptionNetsurf 3.10 does not build on GNU/Hurd due to 2 documented issues:
GNU/Hurd uses the mach kernel but is not Apple and can use function clock_gettime()
https://www.gnu.org/software/hurd/hurd/porting/guidelines.html#mach_darwin

The macro PATH_MAX is not defined in POSIX and is not present in GNU/Hurd
https://www.gnu.org/software/hurd/hurd/porting/guidelines.html#PATH_MAX_tt_MAX_PATH_tt_MAXPATHL

The attached patch addresses these two issues. For the latter case, the string size is allocated dynamically using functions of the asprinf() family and realpath() called with the NULL argument. I don't know if these functions are present and work as intended on all platforms that Netsurf builds on. If this patch creates problems for other OS, would you consider using the Gnulib functions?
https://www.gnu.org/software/gnulib/manual/html_node/asprintf.html
https://www.gnu.org/software/gnulib/manual/html_node/realpath.html

The patch was created against version 3.10 on Debian.

With this patch, the functions filepath_find() and filepath_sfind() have become pretty much equivalent. I have not suppressed either to keep the patch minimal and to let you decide what you would like to do.
TagsNo tags attached.
Fixed in CI build #
Reported in CI build #
Attached Files
  • patch file icon fix_ftbfs_hurd.patch (13,179 bytes) 2021-06-05 22:39 +
  • ? file icon fix_ftbfs_hurd.patch2 (13,346 bytes) 2021-07-05 16:27
  • patch file icon fix-ftbfs-hurd.v3.patch (11,898 bytes) 2024-08-14 09:24 +

-Relationships

-Notes
John Scott

~0002344

John Scott (reporter)

Note that, since the pathlength is unlimited on GNU/Linux systems as well, it's technically a bug and a POSIX violation that PATH_MAX is defined there in the first place. Hence fixing the reliance on the definition of PATH_MAX is beneficial not just to enable builds on GNU/Hurd, but for correctness on any system with unlimited path lengths.
João

~0002345

João (reporter)

Uploading an updated patch after discussion in the debian-hurd mailing list
https://lists.debian.org/debian-hurd/2021/06/msg00006.html
João

~0002466

João (reporter)

Refresh patch to apply to version 3.11.
This bug is classified under Project "Buildsystem", which is probably incorrect, but I don't see how to change it. I don't know if this is causing lack of attention to this bug report.

-Issue History
Date Modified Username Field Change
2021-06-05 22:39 João New Issue
2021-06-05 22:39 João File Added: fix_ftbfs_hurd.patch
2021-06-29 20:31 John Scott Note Added: 0002344
2021-07-05 16:27 João File Added: fix_ftbfs_hurd.patch2
2021-07-05 16:27 João Note Added: 0002345
2024-08-14 09:24 João File Added: fix-ftbfs-hurd.v3.patch
2024-08-14 09:24 João Note Added: 0002466