Re: [RFC] building postgres with meson

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [RFC] building postgres with meson
Date: 2022-03-09 16:55:37
Message-ID: 20220309165537.yx55g44wkadjsapx@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 dependency on it
error: src/common/libpgcommon_srv.a.p/hmac_openssl.c.o requires src/include/storage/lwlocknames.h but has no dependency on it

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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-03-09 17:06:48 Re: New developer papercut - Makefile references INSTALL
Previous Message Magnus Hagander 2022-03-09 16:51:40 Re: New developer papercut - Makefile references INSTALL