From 9c8d519415194f22c447b219e3d97368606d10be Mon Sep 17 00:00:00 2001 From: Josh Kupershmidt Date: Thu, 23 May 2013 20:31:56 -0400 Subject: [PATCH] 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. --- bin/Makefile | 6 ++++-- lib/Makefile | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/bin/Makefile b/bin/Makefile index 8d1e733a..aec64c29 100644 --- a/bin/Makefile +++ b/bin/Makefile @@ -30,7 +30,9 @@ PG_CONFIG = pg_config PGXS := $(shell $(PG_CONFIG) --pgxs) include $(PGXS) -# remove dependency to libxml2 and libxslt +# remove dependency on libxml2, libxslt, and libpam. +# XXX: find a better way to make sure we are linking with libraries +# from pg_config which we actually need. LIBS := $(filter-out -lxml2, $(LIBS)) LIBS := $(filter-out -lxslt, $(LIBS)) - +LIBS := $(filter-out -lpam, $(LIBS)) diff --git a/lib/Makefile b/lib/Makefile index c9178c20..3d817acc 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -35,9 +35,12 @@ USE_PGXS = 1 PGXS := $(shell $(PG_CONFIG) --pgxs) include $(PGXS) -# remove dependency to libxml2 and libxslt +# remove dependency on libxml2, libxslt, and libpam. +# XXX: find a better way to make sure we are linking with libraries +# from pg_config which we actually need. LIBS := $(filter-out -lxml2, $(LIBS)) LIBS := $(filter-out -lxslt, $(LIBS)) +LIBS := $(filter-out -lpam, $(LIBS)) pg_repack.sql: pg_repack.sql.in echo "BEGIN;\n" > $@; \