~lattis/muon

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
4 3

[PATCH] Fix build on GNU Hurd

Details
Message ID
<20240715231527.29719-1-andrea@pappacoda.it>
DKIM signature
pass
Download raw message
Patch: +1 -0
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
Details
Message ID
<CAMq1adrEuEVDZK+dybztXdh-R9HpVev+CEe7k84=DQ9dt4G0HQ@mail.gmail.com>
In-Reply-To
<20240715231527.29719-1-andrea@pappacoda.it> (view parent)
DKIM signature
pass
Download raw message
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
>
Details
Message ID
<D2QVV8SDI8TQ.6R3W5MWR9CUB@pappacoda.it>
In-Reply-To
<CAMq1adrEuEVDZK+dybztXdh-R9HpVev+CEe7k84=DQ9dt4G0HQ@mail.gmail.com> (view parent)
DKIM signature
pass
Download raw message
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!
Details
Message ID
<cfpatfwn73vkorobqgk4adgyypypiy3tr4ltqxig6bbw73hdh3@sl7f3ujtkyjy>
In-Reply-To
<20240715231527.29719-1-andrea@pappacoda.it> (view parent)
DKIM signature
pass
Download raw message
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
Details
Message ID
<D2WV8DX2HSQN.20YNZMY6VWGET@pappacoda.it>
In-Reply-To
<cfpatfwn73vkorobqgk4adgyypypiy3tr4ltqxig6bbw73hdh3@sl7f3ujtkyjy> (view parent)
DKIM signature
pass
Download raw message
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 :)
Reply to thread Export thread (mbox)