From: | 'Alvaro Herrera' <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | Regina Obe <lr(at)pcorp(dot)us> |
Cc: | 'Postgres hackers' <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Can't compile PG 17 (master) from git under Msys2 autoconf |
Date: | 2024-04-05 18:10:01 |
Message-ID: | 202404051810.et6ufj5snhmt@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2024-Apr-05, Regina Obe wrote:
> I think it ends up doing a copy thus the copy error in my log failures which don't exist anywhere in the Makefil
>
> cp -pR ../../backend/storage/lmgr/lwlocknames.h
>
> Sorry for not checking on a linux system. I was thinking I should have done that first.
Ah yeah, that's per configure:
if ln -s conf$$.file conf$$ 2>/dev/null; then
as_ln_s='ln -s'
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
# In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
as_ln_s='cp -pR'
I guess we need to patch the rule so that the LN_S is called so that
it'd resolve correctly in both cases. I guess the easy option is to go
back to the original recipe and update the comment to indicate that we
do it to placate Msys2. Here it is with the old comment:
-# The point of the prereqdir incantation in some of the rules below is to
-# force the symlink to use an absolute path rather than a relative path.
-# For headers which are generated by make distprep, the actual header within
-# src/backend will be in the source tree, while the symlink in src/include
-# will be in the build tree, so a simple ../.. reference won't work.
-# For headers generated during regular builds, we prefer a relative symlink.
$(top_builddir)/src/include/storage/lwlocknames.h: storage/lmgr/lwlocknames.h
- prereqdir=`cd '$(dir $<)' >/dev/null && pwd` && \
- cd '$(dir $@)' && rm -f $(notdir $@) && \
- $(LN_S) "$$prereqdir/$(notdir $<)" .
Maybe it's possible to make this simpler, as it looks overly baroque,
and we don't really need absolute paths anyway -- we just need the path
resolved at the right time.
--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2024-04-05 18:15:16 | Re: [HACKERS] make async slave to wait for lsn to be replayed |
Previous Message | Dave Cramer | 2024-04-05 18:06:50 | Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs |