On 2022-08-06 Sa 06:49, Gurjeet Singh wrote:
> On Tue, Apr 20, 2021 at 9:06 AM Andrew Dunstan <andrew@dunslane.net> wrote:
>> On 4/20/21 11:02 AM, Tom Lane wrote:
>>> Aleksander Alekseev <aleksander@timescale.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