doing something about the broken dynloader.h symlink - Mailing list pgsql-hackers

From Peter Eisentraut
Subject doing something about the broken dynloader.h symlink
Date
Msg-id 98c912de-4333-9e02-e1b5-b38462159101@2ndquadrant.com
Whole thread Raw
Responses Re: doing something about the broken dynloader.h symlink
Re: doing something about the broken dynloader.h symlink
List pgsql-hackers
When you switch a built REL_11_STABLE or earlier to REL_12_STABLE or 
later, you get during make install (or, therefore, make check) an error

cp ./*.h 'PREFIX/include/server'/
cp: cannot stat './dynloader.h': No such file or directory

This is because version 11 and earlier created src/include/dynloader.h 
as a symlink during configure, but this was changed in version 12, and 
the target that the symlink points to is no longer there in that branch.

This has been known for some time, and I figured the issue would go 
away, but people keep complaining to me, so maybe a simple fix could be 
applied.

Even if it's quite late to fix this, it's perhaps worth establishing a 
principled solution, in case we ever change any of the other symlinks 
currently created by configure.

It is worth noting that half the problem is that the cp command uses 
wildcards, where in a puristic situation all the files would be listed 
explicitly and any extra files left around would not pose problems. 
However, it seems generally bad to leave broken symlinks lying around, 
since that can also trip up other tools.

My proposed fix is to apply this patch:

diff --git a/configure.in b/configure.in
index 7d63eb2fa3..84221690e0 100644
--- a/configure.in
+++ b/configure.in
@@ -2474,7 +2474,10 @@ AC_CONFIG_LINKS([
    src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}
    src/include/pg_config_os.h:src/include/port/${template}.h
    src/Makefile.port:src/makefiles/Makefile.${template}
-])
+], [],
+[# Remove links created by old versions of configure, so that there
+# are no broken symlinks in the tree
+rm -f src/include/dynloader.h])

  if test "$PORTNAME" = "win32"; then
  AC_CONFIG_COMMANDS([check_win32_symlinks],[

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: min_safe_lsn column in pg_replication_slots view
Next
From: Peter Eisentraut
Date:
Subject: Re: More tzdb fun: POSIXRULES is being deprecated upstream