Re: [RFC] building postgres with meson - Mailing list pgsql-hackers

From Andres Freund
Subject Re: [RFC] building postgres with meson
Date
Msg-id 20220309165537.yx55g44wkadjsapx@alap3.anarazel.de
Whole thread Raw
In response to [RFC] building postgres with meson  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Hi,

One thing that's pretty cool with ninja based builds is that it contains a
dependency log of "discovered" dependencies as well as information about
dependencies "encoded" in the build specification. LLVM contains a script that
uses that dependency information to see whether the build specification is
missing any dependencies - this helped me find several "build bugs".

The script is at:
https://github.com/llvm/llvm-project/blob/main/llvm/utils/check_ninja_deps.py

It just needs to be invoked in the build directory after a build.

If I e.g. remove the dependency from libpgcommon_srv.a to the lwlocknames.h
generation (*) it complains with:
error: src/common/libpgcommon_srv.a.p/cryptohash_openssl.c.o requires src/include/storage/lwlocknames.h but has no
dependencyon it
 
error: src/common/libpgcommon_srv.a.p/hmac_openssl.c.o requires src/include/storage/lwlocknames.h but has no dependency
onit
 


I wonder if it's worth having a build target invoking it? But how to get the
path to the script? We could just copy it into src/tools? It's permissively
licensed...

Greetings,

Andres Freund


(*) It seems architecturally pretty darn ugly for pgcommon to acquire lwlocks.



pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: New developer papercut - Makefile references INSTALL
Next
From: Tom Lane
Date:
Subject: Re: New developer papercut - Makefile references INSTALL