The GNU Hurd operating system is mostly POSIX compliant[1], and adding
it to the lists of platforms considered "posix" by muon makes the build
succeed.
[1]: https://www.gnu.org/software/hurd/faq/posix_compatibility.html
---
meson.build | 1 +
1 file changed, 1 insertion(+)
diff --git a/meson.build b/meson.build
index bbdeb076..16a120cc 100644
--- a/meson.build+++ b/meson.build
@@ -45,6 +45,7 @@ if (
'msys2',
'netbsd',
'openbsd',
+ 'gnu', 'sunos',
'emscripten',
]
--
2.43.0
hello
just for my information, have you tried to bootstrap muon on Hurd with
that patch ?
Vincent Torri
On Tue, Jul 16, 2024 at 1:15 AM Andrea Pappacoda <andrea@pappacoda.it> wrote:
>> The GNU Hurd operating system is mostly POSIX compliant[1], and adding> it to the lists of platforms considered "posix" by muon makes the build> succeed.>> [1]: https://www.gnu.org/software/hurd/faq/posix_compatibility.html> ---> meson.build | 1 +> 1 file changed, 1 insertion(+)>> diff --git a/meson.build b/meson.build> index bbdeb076..16a120cc 100644> --- a/meson.build> +++ b/meson.build> @@ -45,6 +45,7 @@ if (> 'msys2',> 'netbsd',> 'openbsd',> + 'gnu',> 'sunos',> 'emscripten',> ]> --> 2.43.0>
Hi Vincent,
On Tue Jul 16, 2024 at 5:05 AM CEST, Vincent Torri wrote:
> just for my information, have you tried to bootstrap muon on Hurd with > that patch ?
Of course! It built successfully with the latest Debian GNU/Hurd
release. All tests pass too, apart from the has_function() one; this is
a known upstream Meson bug in their test suite, according to the patch
which introduced Hurd into .system(). From
<https://github.com/mesonbuild/meson/pull/4351>:> Hurd can't run the project tests because it lacks the primitives to > run concurrent.futures, half the tests that do run don't pass because > sendmmsg is a stub, and I really don't care about the rest.
I think the has_function() test should be changed to not depend on
a Linux-only interface (well, it is now supported by BSDs too, but
still), but this is not the place where such change should happen :)
Bye!
So what I have done is to replace this condition with simply:
```
platform = host_machine.system()
if platform != 'windows'
platform = 'posix'
endif
```
This should remove the need for this patch and should hopefully prevent
issues on other "unknown" platforms. Platforms that muon supports that
are not posix compatible may be added as needed.
Thanks,
Stone
On Mon Jul 22, 2024 at 8:20 PM CEST, Stone Tickle wrote:
> So what I have done is to replace this condition with simply:>> ```> platform = host_machine.system()> if platform != 'windows'> platform = 'posix'> endif> ```>> This should remove the need for this patch and should hopefully prevent> issues on other "unknown" platforms. Platforms that muon supports that> are not posix compatible may be added as needed.
Makes sense! I found that listing all known posix platforms was
suboptimal as well.
Another solution I was thinking about was checking the `_POSIX_VERSION`
variable, and if needed the `_POSIX2_VERSION` macro too, to be sure that
the platform really is POSIX. According to
<https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/unistd.h.html>,
the first variable is used to check for compliance of the C library
interfaces, while the latter checks for support of shell and utilities.
In any case, any of these solutions would fix Hurd support, so I'm happy
anyway. Thanks :)