Search Postgresql Archives

Re: EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round 2 - compilation issues.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/05/2017 16:48, Adrian Klaver wrote:
On 05/12/2017 08:30 AM, Martin Goodson wrote:
On 12/05/2017 16:18, Joshua D. Drake wrote:


Thanks for the response. The problem is I'm kind of stuck with using EnterpriseDB's community edition installers. It's a company policy. I can't install PostgreSQL using repositories, I ** have ** to use the 'Universal Installer' from EnterpriseDB.

Surely there must be a way to build repmgr for, and integrate it into, a PostgreSQL db cluster built using EnterpriseDB? Am I really somehow running up against a hard limit or am I simply missing something?

To follow up. If information in this post is still correct:

https://www.postgresql.org/message-id/CAG7mmozd7VAtdGLyE8pMaxu2KRmJxNTvLTyA0N92nEhXZ4k6hQ%40mail.gmail.com

the EDB pg_config should be in:

/opt/PostgreSQL/<version_number>/bin/


The EDB installer allows you to specify where to install PostgreSQL, and uses /opt/PostgreSQL/<version> for the default. So yeah, mostly :)

My PATH is this:
/postgresql/software/pg/9.6.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin

So it should already be picking up the EDB pg_config :)

For comparison purposes, here's pg_config when run from the cluster owner (testdb), which should pick up pg_config from the EnterpriseDB settings:

(testdb@repm:/postgresql/software/repmgr/repmgr-3.3.1$ type pg_config
pg_config is /postgresql/software/pg/9.6.2/bin/pg_config)

BINDIR = /postgresql/software/pg/9.6.2/bin
DOCDIR = /postgresql/software/pg/9.6.2/doc/postgresql
HTMLDIR = /postgresql/software/pg/9.6.2/doc/postgresql
INCLUDEDIR = /postgresql/software/pg/9.6.2/include
PKGINCLUDEDIR = /postgresql/software/pg/9.6.2/include/postgresql
INCLUDEDIR-SERVER = /postgresql/software/pg/9.6.2/include/postgresql/server
LIBDIR = /postgresql/software/pg/9.6.2/lib
PKGLIBDIR = /postgresql/software/pg/9.6.2/lib/postgresql
LOCALEDIR = /postgresql/software/pg/9.6.2/share/locale
MANDIR = /postgresql/software/pg/9.6.2/share/man
SHAREDIR = /postgresql/software/pg/9.6.2/share/postgresql
SYSCONFDIR = /postgresql/software/pg/9.6.2/etc/postgresql
PGXS = /postgresql/software/pg/9.6.2/lib/postgresql/pgxs/src/makefiles/pgxs.mk CONFIGURE = '--enable-debug' '--with-libs=/opt/local/Current/lib' '--with-includes=/opt/local/Current/include/libxml2:/opt/local/Current/include' '--prefix=/mnt/hgfs/pginstaller.auto/server/staging/linux-x64' '--with-ldap' '--with-openssl' '--with-perl' '--with-python' '--with-tcl' '--with-tclconfig=/opt/local/EnterpriseDB/LanguagePack/9.6/Tcl-8.5/lib' '--with-pam' '--enable-thread-safety' '--with-libxml' '--with-ossp-uuid' '--docdir=/mnt/hgfs/pginstaller.auto/server/staging/linux-x64/doc/postgresql' '--with-libxslt' '--with-libedit-preferred' '--with-gssapi' 'LD_LIBRARY_PATH=/opt/local/Current/lib' 'CFLAGS=-O2 -DMAP_HUGETLB=0x40000'
CC = gcc
CPPFLAGS = -DFRONTEND -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000
CFLAGS_SL = -fpic
LDFLAGS = -L../../src/common -L/opt/local/Current/lib -Wl,--as-needed -Wl,-rpath,'/mnt/hgfs/pginstaller.auto/server/staging/linux-x64/lib',--enable-new-dtags
LDFLAGS_EX =
LDFLAGS_SL =
LIBS = -lpgcommon -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -ledit -lrt -lcrypt -ldl -lm
VERSION = PostgreSQL 9.6.2

And THIS is the output of pg_config when run from another user:

(master@repm:~/repmgr-3.3.1$ type pg_config
pg_config is hashed (/usr/bin/pg_config)   )

BINDIR = /usr/lib/postgresql/9.6/bin
DOCDIR = /usr/share/doc/postgresql-doc-9.6
HTMLDIR = /usr/share/doc/postgresql-doc-9.6
INCLUDEDIR = /usr/include/postgresql
PKGINCLUDEDIR = /usr/include/postgresql
INCLUDEDIR-SERVER = /usr/include/postgresql/9.6/server
LIBDIR = /usr/lib/x86_64-linux-gnu
PKGLIBDIR = /usr/lib/postgresql/9.6/lib
LOCALEDIR = /usr/share/locale
MANDIR = /usr/share/postgresql/9.6/man
SHAREDIR = /usr/share/postgresql/9.6
SYSCONFDIR = /etc/postgresql-common
PGXS = /usr/lib/postgresql/9.6/lib/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--with-tcl' '--with-perl' '--with-python' '--with-pam' '--with-openssl' '--with-libxml' '--with-libxslt' '--with-tclconfig=/usr/lib/x86_64-linux-gnu/tcl8.6' '--with-includes=/usr/include/tcl8.6' 'PYTHON=/usr/bin/python' '--mandir=/usr/share/postgresql/9.6/man' '--docdir=/usr/share/doc/postgresql-doc-9.6' '--sysconfdir=/etc/postgresql-common' '--datarootdir=/usr/share/' '--datadir=/usr/share/postgresql/9.6' '--bindir=/usr/lib/postgresql/9.6/bin' '--libdir=/usr/lib/x86_64-linux-gnu/' '--libexecdir=/usr/lib/postgresql/' '--includedir=/usr/include/postgresql/' '--enable-nls' '--enable-integer-datetimes' '--enable-thread-safety' '--enable-tap-tests' '--enable-debug' '--disable-rpath' '--with-uuid=e2fs' '--with-gnu-ld' '--with-pgport=5432' '--with-system-tzdata=/usr/share/zoneinfo' '--with-systemd' 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -I/usr/include/mit-krb5 -fPIC -pie -fno-omit-frame-pointer' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -L/usr/lib/mit-krb5 -L/usr/lib/x86_64-linux-gnu/mit-krb5' '--with-krb5' '--with-gssapi' '--with-ldap' '--with-selinux' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2'
CC = gcc
CPPFLAGS = -DFRONTEND -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/tcl8.6 CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -I/usr/include/mit-krb5 -fPIC -pie -fno-omit-frame-pointer
CFLAGS_SL = -fpic
LDFLAGS = -L../../src/common -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -L/usr/lib/mit-krb5 -L/usr/lib/x86_64-linux-gnu/mit-krb5 -Wl,--as-needed
LDFLAGS_EX =
LDFLAGS_SL =
LIBS = -lpgcommon -lpgport -lselinux -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -ledit -lrt -lcrypt -ldl -lm
VERSION = PostgreSQL 9.6.2

'Standard' : LIBS = -lpgcommon -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -ledit -lrt -lcrypt -ldl -lm EnterpriseDB: LIBS = -lpgcommon -lpgport -lselinux -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -ledit -lrt -lcrypt -ldl -lm

Should I have to somehow override any of that? Surely, if EnterpriseDB was built with the libs it specifies there I should be able to reference them?

Current output is:
testdb@repm:/postgresql/software/repmgr/repmgr-3.3.1$ sudo make USE_PGXS=1 install gcc -o repmgrd -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -g -O2 -fdebug-prefix-map=/build/postgresql-9.6-jQU1kx/postgresql-9.6-9.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -I/usr/include/mit-krb5 -fPIC -pie -fno-omit-frame-pointer dbutils.o config.o repmgrd.o log.o strutil.o -L/usr/lib/x86_64-linux-gnu -lpgcommon -lpgport -L/usr/lib/x86_64-linux-gnu -lpq -L/usr/lib/x86_64-linux-gnu -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -L/usr/lib/mit-krb5 -L/usr/lib/x86_64-linux-gnu/mit-krb5 -Wl,--as-needed -lpgcommon -lpgport -lselinux -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -ledit -lrt -lcrypt -ldl -lm
/usr/bin/ld: cannot find -lselinux
/usr/bin/ld: cannot find -lssl
/usr/bin/ld: cannot find -lcrypto
/usr/bin/ld: cannot find -lgssapi_krb5
/usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
Makefile:20: recipe for target 'repmgrd' failed
make: *** [repmgrd] Error 1

As mentioned : I don't have much experience with compiling on linux, so I may be missing something horribly obvious :)

Martin.
--
Martin Goodson

"Have you thought up some clever plan, Doctor?"
"Yes, Jamie, I believe I have."
"What're you going to do?"
"Bung a rock at it."


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux