Re: Building with meson on NixOS/nixpkgs

From: walther(at)technowledgy(dot)de
To: Peter Eisentraut <peter(at)eisentraut(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Building with meson on NixOS/nixpkgs
Date: 2024-04-17 12:02:41
Message-ID: ab26849b-58bc-4a44-8383-db39072d857d@technowledgy.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut:
> On 29.03.24 19:47, walther(at)technowledgy(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jelte Fennema-Nio 2024-04-17 12:03:37 Re: Speed up clean meson builds by ~25%
Previous Message Peter Eisentraut 2024-04-17 11:49:53 Re: Building with meson on NixOS/nixpkgs