Skip to content

Commit

Permalink
Kludge to remove -lpam from LIBS in Makefiles.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
schmiddy committed May 24, 2013
1 parent 95ce24c commit 9c8d519
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions bin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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))
5 changes: 4 additions & 1 deletion lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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" > $@; \
Expand Down

0 comments on commit 9c8d519

Please sign in to comment.