Re: `make check` doesn't pass on MacOS Catalina

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Gurjeet Singh <gurjeet(at)singh(dot)im>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Aleksander Alekseev <aleksander(at)timescale(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: `make check` doesn't pass on MacOS Catalina
Date: 2022-08-06 13:51:50
Message-ID: bfa93860-3552-6330-2ccc-7927a2646285@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 2022-08-06 Sa 06:49, Gurjeet Singh wrote:
> On Tue, Apr 20, 2021 at 9:06 AM Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>> On 4/20/21 11:02 AM, Tom Lane wrote:
>>> Aleksander Alekseev <aleksander(at)timescale(dot)com> writes:
>>>> While trying to build PostgreSQL from source (master branch, 95c3a195) on a
>>>> MacBook I discovered that `make check` fails:
>>> This is the usual symptom of not having disabled SIP :-(.
>>>
>>> If you don't want to do that, do "make install" before "make check".
>> FYI the buildfarm client has a '--delay-check' option that does exactly
>> this. It's useful on Alpine Linux as well as MacOS
> I was trying to set up a buildfarm animal, and this exact problem lead
> to a few hours of debugging and hair-pulling. Can the default
> behaviour be changed in buildfarm client to perform `make check` only
> after `make install`.
>
> Current buildfarm client code looks something like:
>
> make();
> make_check() unless $delay_check;
> ... other steps ...
> make_install();
> ... other steps-2...
> make_check() if $delay_check;
>
> There are no comments as to why one should choose to use --delay-check
> ($delay_check). This email, and the pointer to the paragraph buried in
> the docs, shared by Tom, are the only two ways one can understand what
> is causing this failure, and how to get around it.
>
> Naive question: What's stopping us from rewriting the code as follows.
> make();
> make_install();
> make_check();
> ... other steps ...
> ... other steps-2...
> # or move make_check() call here
>
> With a quick google search I could not find why --delay-check is
> necessary on Apline linux, as well; can you please elaborate.
>

I came across this when I was working on setting up some Dockerfiles for
the buildfarm. Apparently LD_LIBRARY_PATH doesn't work on Alpine, at
least out of the box, as it uses a different linker, and "make check"
relies on it (or the moral equivalent) if "make install" hasn't been run.

In general we want to run "make check" as soon as possible after running
"make" on the core code. That's why I didn't simply delay it
unconditionally.

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zhang Mingli 2022-08-06 14:05:41 Re: Allocator sizeof operand mismatch (src/backend/regex/regcomp.c)
Previous Message Zhang Mingli 2022-08-06 13:01:27 Re: [Code Comments]enum COPY_NEW_FE is removed