Skip to content

Commit

Permalink
Fix dockerfile build-dependencies. (#37)
Browse files Browse the repository at this point in the history
Now that we're using $(shell $(PG_CONFIG) --libs) to have the list of
librairies we depend on, we must align the build dependencies of
pg_auto_failover with the Postgres build dependencies on the platform where
we build.

In debian, that means having build dependencies towards readline
support (that's libedit), pam, zlib, xml, xstl, and selinux.

Also, switch to using `pg_config --ldflags`, which is supposed to be right on all platforms.
From local tests it seems like we still need --pkglibdir at least when
building on debian (make build-test does that in a docker container).

See #34.
  • Loading branch information
DimCitus committed Jul 3, 2019
1 parent 5a50002 commit fe00ba6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ RUN apt-get update \
libicu-dev \
libkrb5-dev \
libssl-dev \
libedit-dev \
libpam-dev \
zlib1g-dev \
libxml2-dev \
libxslt1-dev \
libselinux1-dev \
make \
openssl \
pipenv \
Expand Down
4 changes: 2 additions & 2 deletions src/bin/pg_autoctl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ CFLAGS += -I $(shell $(PG_CONFIG) --cflags)
CFLAGS += -Wformat
CFLAGS += $(COMMON_LIBS)

LIBS = -L $(shell $(PG_CONFIG) --libdir)
LIBS += -L $(shell $(PG_CONFIG) --pkglibdir)
LIBS = -L $(shell $(PG_CONFIG) --pkglibdir)
LIBS += $(shell $(PG_CONFIG) --ldflags)
LIBS += $(shell $(PG_CONFIG) --libs)
LIBS += -lpq

Expand Down

0 comments on commit fe00ba6

Please sign in to comment.