Skip to content

Commit 9c8d519

Browse files
committed
Kludge to remove -lpam from LIBS in Makefiles.
Per Issue #7 from armanddp, it seems the RHEL/CentOS packages of Postgres are built against libpam, which shows up in the LIBS reported by pg_config. We don't actually need to link in libpam for pg_repack, so manually remove it from our LIBS. This helps a little bit for building on RHEL/CentOS, though the issue of libpgport.a missing on that platform still looms.
1 parent 95ce24c commit 9c8d519

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

bin/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ PG_CONFIG = pg_config
3030
PGXS := $(shell $(PG_CONFIG) --pgxs)
3131
include $(PGXS)
3232

33-
# remove dependency to libxml2 and libxslt
33+
# remove dependency on libxml2, libxslt, and libpam.
34+
# XXX: find a better way to make sure we are linking with libraries
35+
# from pg_config which we actually need.
3436
LIBS := $(filter-out -lxml2, $(LIBS))
3537
LIBS := $(filter-out -lxslt, $(LIBS))
36-
38+
LIBS := $(filter-out -lpam, $(LIBS))

lib/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,12 @@ USE_PGXS = 1
3535
PGXS := $(shell $(PG_CONFIG) --pgxs)
3636
include $(PGXS)
3737

38-
# remove dependency to libxml2 and libxslt
38+
# remove dependency on libxml2, libxslt, and libpam.
39+
# XXX: find a better way to make sure we are linking with libraries
40+
# from pg_config which we actually need.
3941
LIBS := $(filter-out -lxml2, $(LIBS))
4042
LIBS := $(filter-out -lxslt, $(LIBS))
43+
LIBS := $(filter-out -lpam, $(LIBS))
4144

4245
pg_repack.sql: pg_repack.sql.in
4346
echo "BEGIN;\n" > $@; \

0 commit comments

Comments
 (0)