Обсуждение: Building with meson on NixOS/nixpkgs

Поиск
Список
Период
Сортировка

Building with meson on NixOS/nixpkgs

От
Wolfgang Walther
Дата:
To build on NixOS/nixpkgs I came up with a few small patches to 
meson.build. All of this works fine with Autoconf/Make already.
Вложения

Re: Building with meson on NixOS/nixpkgs

От
Nazir Bilal Yavuz
Дата:
Hi,

Thank you for the patches!

On Sat, 16 Mar 2024 at 14:48, Wolfgang Walther <walther@technowledgy.de> wrote:
>
> To build on NixOS/nixpkgs I came up with a few small patches to
> meson.build. All of this works fine with Autoconf/Make already.

I do not have NixOS but I confirm that patches cleanly apply to master
and do pass CI. I have a small feedback:

0001 & 0002: Adding code comments to explain why they have fallback
could be nice.
0003: Looks good to me.

-- 
Regards,
Nazir Bilal Yavuz
Microsoft



Re: Building with meson on NixOS/nixpkgs

От
Alvaro Herrera
Дата:
On 2024-Mar-16, Wolfgang Walther wrote:

> The upstream name for the ossp-uuid package / pkg-config file is "uuid". Many
> distributions change this to be "ossp-uuid" to not conflict with e2fsprogs.

I can confirm that this is true for Debian, at least; the packaging
rules have this in override_dh_install:

    install -D -m 644 debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/uuid.pc \
        debian/libossp-uuid-dev/usr/lib/pkgconfig/ossp-uuid.pc

which matches the fact that Engelschall's official repository has the
file named simply uuid.pc:
https://github.com/rse/uuid/blob/master/uuid.pc.in

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/



Re: Building with meson on NixOS/nixpkgs

От
Wolfgang Walther
Дата:
Nazir Bilal Yavuz:
> 0001 & 0002: Adding code comments to explain why they have fallback
> could be nice.
> 0003: Looks good to me.

Added some comments in the attached.

Best,

Wolfgang
Вложения

Re: Building with meson on NixOS/nixpkgs

От
walther@technowledgy.de
Дата:
Wolfgang Walther:
> To build on NixOS/nixpkgs I came up with a few small patches to 
> meson.build. All of this works fine with Autoconf/Make already.

In v3, I added another small patch for meson, this one about proper 
handling of -Dlibedit_preferred when used together with -Dreadline=enabled.

Best,

Wolfgang
Вложения

Re: Building with meson on NixOS/nixpkgs

От
Nazir Bilal Yavuz
Дата:
Hi,

From your prior reply:

On Thu, 21 Mar 2024 at 23:44, Wolfgang Walther <walther@technowledgy.de> wrote:
>
> Nazir Bilal Yavuz:
> > 0001 & 0002: Adding code comments to explain why they have fallback
> > could be nice.
> > 0003: Looks good to me.
>
> Added some comments in the attached.

Comments look good, thanks.

On Fri, 29 Mar 2024 at 21:48, <walther@technowledgy.de> wrote:
>
> In v3, I added another small patch for meson, this one about proper
> handling of -Dlibedit_preferred when used together with -Dreadline=enabled.

You are right. I confirm the bug and your proposed patch fixes this.

-- 
Regards,
Nazir Bilal Yavuz
Microsoft



Re: Building with meson on NixOS/nixpkgs

От
Peter Eisentraut
Дата:
On 29.03.24 19:47, walther@technowledgy.de wrote:
 > -    uuid = dependency('ossp-uuid', required: true)
 > +    # upstream is called "uuid", but many distros change this to 
"ossp-uuid"
 > +    uuid = dependency('ossp-uuid', 'uuid', required: true)

How would this behave if you have only uuid.pc from e2fsprogs installed 
but choose -Duuid=ossp?  Then it would pick up uuid.pc here, but fail to 
compile later?




Re: Building with meson on NixOS/nixpkgs

От
walther@technowledgy.de
Дата:
Peter Eisentraut:
> On 29.03.24 19:47, walther@technowledgy.de wrote:
>  > -    uuid = dependency('ossp-uuid', required: true)
>  > +    # upstream is called "uuid", but many distros change this to 
> "ossp-uuid"
>  > +    uuid = dependency('ossp-uuid', 'uuid', required: true)
> 
> How would this behave if you have only uuid.pc from e2fsprogs installed 
> but choose -Duuid=ossp?  Then it would pick up uuid.pc here, but fail to 
> compile later?

It would still fail the meson setup step, because for e2fs we have:

uuidfunc = 'uuid_generate'
uuidheader = 'uuid/uuid.h'

while for ossp we have:

uuidfunc = 'uuid_export'
uuidheader = 'uuid.h'

and later we do:

if not cc.has_header_symbol(uuidheader, uuidfunc, args: test_c_args, 
dependencies: uuid)
     error('uuid library @0@ missing required function 
@1@'.format(uuidopt, uuidfunc))
endif

Best,

Wolfgang