Re: Building with meson on NixOS/nixpkgs - Mailing list pgsql-hackers

From Wolfgang Walther
Subject Re: Building with meson on NixOS/nixpkgs
Date
Msg-id 97ba8976-9a08-45b3-ad2c-fe13bbc7d140@technowledgy.de
Whole thread Raw
In response to Re: Building with meson on NixOS/nixpkgs  ("Tristan Partin" <tristan@partin.io>)
List pgsql-hackers
Tristan Partin:
> On Fri Aug 9, 2024 at 11:14 AM CDT, Andres Freund wrote:
>> commit 4d8de281b5834c8f5e0be6ae21e884e69dffd4ce
>> Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
>> Date:   2024-07-27 13:53:11 +0300
>>
>>     Fallback to clang in PATH with meson
>> [..]
>>
>> I think this is a bad change unfortunately - this way clang and llvm 
>> version
>> can mismatch. Yes, we've done it that way for autoconf, but back then 
>> LLVM
>> broke compatibility far less often.
> 
> See the attached patch on how we could make this situation better.

Works great.

With the correct clang on path:

Program clang found: YES 18.1.8 18.1.8 
(/nix/store/mr1y1rxkx59dr2bci2akmw2zkbbpmc15-clang-wrapper-18.1.8/bin/clang)

With a mismatching version on path:

Program 
/nix/store/x4gwwwlw2ylv0d9vjmkx3dmlcb7gingd-llvm-18.1.8/bin/clang clang 
found: NO found 16.0.6 but need: '18.1.8' 
(/nix/store/r85xsa9z0s04n0y21xhrii47bh74g2a8-clang-wrapper-16.0.6/bin/clang)

Yes, the match is exact, also fails with a newer version:

Program 
/nix/store/x4gwwwlw2ylv0d9vjmkx3dmlcb7gingd-llvm-18.1.8/bin/clang clang 
found: NO found 19.1.0 but need: '18.1.8' 
(/nix/store/rjsfx6sxjpkgd4f9hl9apm0n8dk7jd9w-clang-wrapper-19.1.0-rc2/bin/clang)

+1 for this patch.

Best,

Wolfgang



pgsql-hackers by date:

Previous
From: Wolfgang Walther
Date:
Subject: Re: Building with meson on NixOS/nixpkgs
Next
From: Thomas Munro
Date:
Subject: Re: Restart pg_usleep when interrupted