Thread: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round 2 -compilation issues.
[GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round 2 -compilation issues.
Hello.
Yesterday I had problems getting repmgr installed, since our PostgreSQL installs to a non-standard place, and doesn't use any postgresql repositories/packages. The responses I got generally seemed to be 'you need to compile it'.
Time for round 2, trying to compile it with our own environment. Many apologies if I'm doing something obviously stupid, I have *very little* experience with compiling things on linux.
To speed things up I'm doing my attempted compiles on my laptop instead of our servers, since I can install packages etc as required myself without having to wait on our tech support team. I want to verify that I can get repmgr up and running on as minimal a test server as I can before rolling it out to slightly more hefty boxes :)
I'm running ubuntu server 17.04. The EnterpriseDB installer was used to quickly install a quick test PostgreSQL db, "testdb" under owning userid "testdb". Here is the output of pg_config:
testdb@repm:/postgresql/software/repmgr/repmgr-3.3.1$ 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
testdb@repm:/postgresql/software/repmgr/repmgr-3.3.1$
PostgreSQL is up and running nicely:
testdb@repm:/postgresql/software/repmgr/repmgr-3.3.1$ pg_ctl status
pg_ctl: server is running (PID: 1433)
/postgresql/software/pg/9.6.2/bin/postgres
First attempt at compilation was unsuccessful and so I followed the advice in PACKAGES.md:When building repmgr against a Debian packages build, you may discover that some development packages are needed as well. You will need the following development packages installed:
sudo apt-get install libxslt-dev libxml2-dev libpam-dev libedit-dev
Here's the output I now get when checking those packages:
testdb@repm:/postgresql/software/repmgr/repmgr-3.3.1$ sudo apt-get install libxslt-dev libxml2-dev libpam-dev libedit-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libxslt1-dev' instead of 'libxslt-dev'
Note, selecting 'libpam0g-dev' instead of 'libpam-dev'
libedit-dev is already the newest version (3.1-20160903-3).
libpam0g-dev is already the newest version (1.1.8-3.2ubuntu2).
libxml2-dev is already the newest version (2.9.4+dfsg1-2.2).
libxslt1-dev is already the newest version (1.1.29-2ubuntu0.1).
0 to upgrade, 0 to newly install, 0 to remove and 4 not to upgrade.
It also recommends installing the postgres server dev
sudo apt-get install postgresql-server-dev-9.0
testdb@repm:/postgresql/software/repmgr/repmgr-3.3.1$ sudo apt-get install postgresql-server-dev-9.6
Reading package lists... Done
Building dependency tree
Reading state information... Done
postgresql-server-dev-9.6 is already the newest version (9.6.2-1).
0 to upgrade, 0 to newly install, 0 to remove and 4 not to upgrade.
Already installed for 9.6 - had to install it for pg_config.
So I've already got installed the packages that PACKAGES.MD recommends, I guess. Attempts to compile repmgr are now failing with:
(In the directory with the expanded tar file):
testdb@repm:/postgresql/software/repmgr/repmgr-3.3.1$ ls
check_dir.c compat.h CONTRIBUTING.md dbutils.c dirmod.c errcode.h HISTORY log.h QUICKSTART.md repmgr.conf.sample repmgr.sql strutil.c uninstall_repmgr.sql
check_dir.h config.c COPYRIGHT dbutils.h dirmod.h FAILOVER.rst LICENSE Makefile README.md repmgrd.c sql strutil.h version.h
compat.c config.h CREDITS debian docs FAQ.md log.c PACKAGES.md repmgr.c repmgr.h SSH-RSYNC.md TODO)
testdb@repm:/postgresql/software/repmgr/repmgr-3.3.1$ sudo make USE_PGXS=1 install
gcc -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 -I/usr/include/postgresql -I. -I./ -I/usr/include/postgresql/9.6/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/tcl8.6 -c -o dbutils.o dbutils.c
gcc -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 -I/usr/include/postgresql -I. -I./ -I/usr/include/postgresql/9.6/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/tcl8.6 -c -o config.o config.c
gcc -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 -I/usr/include/postgresql -I. -I./ -I/usr/include/postgresql/9.6/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/tcl8.6 -c -o repmgrd.o repmgrd.c
gcc -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 -I/usr/include/postgresql -I. -I./ -I/usr/include/postgresql/9.6/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/tcl8.6 -c -o log.o log.c
gcc -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 -I/usr/include/postgresql -I. -I./ -I/usr/include/postgresql/9.6/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/tcl8.6 -c -o strutil.o strutil.c
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
Any ideas what I am doing wrong? I can only assume I'm missing something really, really, obvious. Every single book and article I've seen simply states 'Just quickly install repmgr then ...' - it's driving me nuts that I can't get this thing installed, let alone working :)
Any help/advice/suggestions/pointing-outs-of-the-obvious would be greatly appreciated.
Regards,
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."
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round2 - compilation issues.
On 05/12/2017 08:13 AM, Martin Goodson wrote: > Hello. > > Yesterday I had problems getting repmgr installed, since our PostgreSQL > installs to a non-standard place, and doesn't use any postgresql > repositories/packages. The responses I got generally seemed to be 'you > need to compile it'. > > I'm running ubuntu server 17.04. The EnterpriseDB installer was used to > quickly install a quick test PostgreSQL db, "testdb" under owning userid > "testdb". Here is the output of pg_config: > This is your problem. As Adrian already mentioned, you should be running the PGDG apt repos. https://www.postgresql.org/download/linux/ubuntu/ Universal installers are great for a one off, "Hey let's see what we can do!" but they are not useful once you want to extend, have community support and or do things like easily install Repmgr. Good luck! JD -- Command Prompt, Inc. http://the.postgres.company/ +1-503-667-4564 PostgreSQL Centered full stack support, consulting and development. Everyone appreciates your honesty, until you are honest with them. Unless otherwise stated, opinions are my own.
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round2 - compilation issues.
On 12/05/2017 16:18, Joshua D. Drake wrote: > On 05/12/2017 08:13 AM, Martin Goodson wrote: >> Hello. >> >> Yesterday I had problems getting repmgr installed, since our PostgreSQL >> installs to a non-standard place, and doesn't use any postgresql >> repositories/packages. The responses I got generally seemed to be 'you >> need to compile it'. >> >> I'm running ubuntu server 17.04. The EnterpriseDB installer was used to >> quickly install a quick test PostgreSQL db, "testdb" under owning userid >> "testdb". Here is the output of pg_config: >> > > This is your problem. As Adrian already mentioned, you should be > running the PGDG apt repos. > > https://www.postgresql.org/download/linux/ubuntu/ > > Universal installers are great for a one off, "Hey let's see what we > can do!" but they are not useful once you want to extend, have > community support and or do things like easily install Repmgr. > > Good luck! > > JD > 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? Regards, 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."
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round2 - compilation issues.
On 05/12/2017 08:13 AM, Martin Goodson wrote: > Hello. > > Yesterday I had problems getting repmgr installed, since our PostgreSQL > installs to a non-standard place, and doesn't use any postgresql > repositories/packages. The responses I got generally seemed to be 'you > need to compile it'. > > Time for round 2, trying to compile it with our own environment. Many > apologies if I'm doing something obviously stupid, I have *very little* > experience with compiling things on linux. > > To speed things up I'm doing my attempted compiles on my laptop instead > of our servers, since I can install packages etc as required myself > without having to wait on our tech support team. I want to verify that I > can get repmgr up and running on as minimal a test server as I can > before rolling it out to slightly more hefty boxes :) > > I'm running ubuntu server 17.04. The EnterpriseDB installer was used to > quickly install a quick test PostgreSQL db, "testdb" under owning userid > "testdb". Here is the output of pg_config: > > > Already installed for 9.6 - had to install it for pg_config. That could be a problem as that is what the make is using below. That means it is working on the DEB installed locations not the EDB ones. You sure there is not a pg_config in the EDB install? > So I've already got installed the packages that PACKAGES.MD recommends, > I guess. Attempts to compile repmgr are now failing with: > > (In the directory with the expanded tar file): > > > testdb@repm:/postgresql/software/repmgr/repmgr-3.3.1$ sudo make > USE_PGXS=1 install > gcc -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 > -I/usr/include/postgresql -I. -I./ -I/usr/include/postgresql/9.6/server > -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 > -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/tcl8.6 -c -o > dbutils.o dbutils.c > gcc -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 > -I/usr/include/postgresql -I. -I./ -I/usr/include/postgresql/9.6/server > -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 > -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/tcl8.6 -c -o > config.o config.c > gcc -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 > -I/usr/include/postgresql -I. -I./ -I/usr/include/postgresql/9.6/server > -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 > -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/tcl8.6 -c -o > repmgrd.o repmgrd.c > gcc -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 > -I/usr/include/postgresql -I. -I./ -I/usr/include/postgresql/9.6/server > -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 > -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/tcl8.6 -c -o log.o > log.c > gcc -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 > -I/usr/include/postgresql -I. -I./ -I/usr/include/postgresql/9.6/server > -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 > -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/tcl8.6 -c -o > strutil.o strutil.c > 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 Well in the above /usr/include/postgresql/9.6/server is pointing at the DEB installed directory. Pretty sure I remember that is not where the EDB installed files are. If you want to compile against the EDB install you will need to find its pg_config, that is what drives the make process. If you do find it, then you can do something like this(borrowed form pglogical): PATH=<path to EDB pg_config>:$PATH make USE_PGXS=1 clean all sudo PATH+<path to EDB pg_config>:$PATH make USE_PGXS=1 install > > Any ideas what I am doing wrong? I can only assume I'm missing something > really, really, obvious. Every single book and article I've seen simply > states 'Just quickly install repmgr then ...' - it's driving me nuts > that I can't get this thing installed, let alone working :) > > Any help/advice/suggestions/pointing-outs-of-the-obvious would be > greatly appreciated. > > Regards, > > 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." -- Adrian Klaver adrian.klaver@aklaver.com
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round2 - compilation issues.
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/ > > Regards, > > Martin. -- Adrian Klaver adrian.klaver@aklaver.com
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round2 - compilation issues.
On 05/12/2017 08:30 AM, Martin Goodson wrote: > On 12/05/2017 16:18, Joshua D. Drake wrote: > >> On 05/12/2017 08:13 AM, Martin Goodson wrote: >>> Hello. > 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? Follow up to the follow up: Configuring Automatic failover using Replication Manager 2.0 on PostgreSQL 9.3.5 http://raghavt.blogspot.com/2015/01/configuring-automatic-failover-using.html "In this post, am demonstrating Replication Manager on single node(localhost) on RHEL 6.5 - PostgreSQL 9.3.5. In order to achieve an easy and good understanding of concept I have compiled repmgr with EnterpriseDB One Click Installer(a pre-build binary package) instead of PG source." > > Regards, > > Martin. -- Adrian Klaver adrian.klaver@aklaver.com
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round2 - compilation issues.
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."
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round2 - compilation issues.
On 12/05/2017 16:59, Adrian Klaver wrote: > Configuring Automatic failover using Replication Manager 2.0 on > PostgreSQL 9.3.5 > > http://raghavt.blogspot.com/2015/01/configuring-automatic-failover-using.html > > > "In this post, am demonstrating Replication Manager on single > node(localhost) on RHEL 6.5 - PostgreSQL 9.3.5. In order to achieve an > easy and good understanding of concept I have compiled repmgr with > EnterpriseDB One Click Installer(a pre-build binary package) instead > of PG source." > Looks interesting! I'll give it a go tonight on a clean install and report back on how easy it was and how much of an idiot I am, or my abject failure and how much of an idiot I am :) Many thanks! Regards, 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."
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round2 - compilation issues.
On 05/12/2017 09:14 AM, Martin Goodson wrote: > 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: >> > 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 :) Just to be clear you changed the default install location to /postgresql/software/pg/9.6.2, correct? > > 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 Alright that is the EDB pg_config. > > 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) ) The Ubuntu/Debian packages. > > 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 Note the sudo, that changes you into a new environment that is not seeing your $PATH: /postgresql/software/pg/9.6.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin Hence my previous suggestion(***CORRECTED***): PATH=<path to EDB pg_config>:$PATH make USE_PGXS=1 clean all sudo PATH=<path to EDB pg_config>:$PATH make USE_PGXS=1 install It is broken down into two steps, so the first step will clean up any previous attempts before going forward. > > As mentioned : I don't have much experience with compiling on linux, so > I may be missing something horribly obvious :) > > Martin. -- Adrian Klaver adrian.klaver@aklaver.com
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round2 - compilation issues.
On 05/12/2017 09:19 AM, Martin Goodson wrote: > On 12/05/2017 16:59, Adrian Klaver wrote: > >> Configuring Automatic failover using Replication Manager 2.0 on >> PostgreSQL 9.3.5 >> >> http://raghavt.blogspot.com/2015/01/configuring-automatic-failover-using.html >> >> >> "In this post, am demonstrating Replication Manager on single >> node(localhost) on RHEL 6.5 - PostgreSQL 9.3.5. In order to achieve an >> easy and good understanding of concept I have compiled repmgr with >> EnterpriseDB One Click Installer(a pre-build binary package) instead >> of PG source." >> > > Looks interesting! I'll give it a go tonight on a clean install and > report back on how easy it was and how much of an idiot I am, or my > abject failure and how much of an idiot I am :) To make things easier I would remove the deb installed Postgres, it just adds complexity to the situation without providing benefit. > > Many thanks! > > Regards, > > Martin. -- Adrian Klaver adrian.klaver@aklaver.com
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round3 - libraries resolved, still can't compile :(
On 12/05/2017 18:57, Adrian Klaver wrote: > On 05/12/2017 09:19 AM, Martin Goodson wrote: >> On 12/05/2017 16:59, Adrian Klaver wrote: >> >>> Configuring Automatic failover using Replication Manager 2.0 on >>> PostgreSQL 9.3.5 >>> >>> http://raghavt.blogspot.com/2015/01/configuring-automatic-failover-using.html >>> >>> >>> "In this post, am demonstrating Replication Manager on single >>> node(localhost) on RHEL 6.5 - PostgreSQL 9.3.5. In order to achieve >>> an easy and good understanding of concept I have compiled repmgr >>> with EnterpriseDB One Click Installer(a pre-build binary package) >>> instead of PG source." >>> >> >> Looks interesting! I'll give it a go tonight on a clean install and >> report back on how easy it was and how much of an idiot I am, or my >> abject failure and how much of an idiot I am :) > > To make things easier I would remove the deb installed Postgres, it > just adds complexity to the situation without providing benefit. > >> >> Many thanks! >> >> Regards, >> >> Martin. > > Progress of a sort. Kinda. On a clean Ubuntu server 17.04 virtual machine I've installed PostgreSQL 9.6 using the EnterpriseDB installer. The software was installed by sudo'ing the installer, configuring ownership to the 'pginst' userid and is up and running : pginst 2582 1 0 09:22 ? 00:00:00 /postgresql/software/9.6.2/bin/postgres -D /postgresql/software/9.6.2/data pginst 2585 2582 0 09:22 ? 00:00:00 postgres: logger process pginst 2587 2582 0 09:22 ? 00:00:00 postgres: checkpointer process pginst 2588 2582 0 09:22 ? 00:00:00 postgres: writer process pginst 2589 2582 0 09:22 ? 00:00:00 postgres: wal writer process pginst 2590 2582 0 09:22 ? 00:00:00 postgres: autovacuum launcher process pginst 2591 2582 0 09:22 ? 00:00:00 postgres: stats collector process I then downloaded the repmgr package (repmgr-3.3.1.tar.gz) from 2nd quadrant, unzipped and untarred etc to the directory /home/master/repmgr-3.3.1. I've followed the advice of the article Adrian suggested and installed some packages: gcc, make, libxslt1-dev, libpam0g-dev, libssl-dev, libkrb5-dev, libedit-dev, postgresql-server-dev-9.6 I have now apparently resolved the missing libraries problem. Or, at least, it's no longer complaining that libs are missing. I built a little install script which I sudo: clear PATH=/postgresql/software/9.6.2/bin:$PATH echo "PATH = $PATH" echo "" pg_config echo "" echo "make USE_PGXS=1 clean all" echo "" make USE_PGXS=1 clean all Which produces this output (including the output of pg_config): PATH = /postgresql/software/9.6.2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin BINDIR = /postgresql/software/9.6.2/bin DOCDIR = /postgresql/software/9.6.2/doc/postgresql HTMLDIR = /postgresql/software/9.6.2/doc/postgresql INCLUDEDIR = /postgresql/software/9.6.2/include PKGINCLUDEDIR = /postgresql/software/9.6.2/include/postgresql INCLUDEDIR-SERVER = /postgresql/software/9.6.2/include/postgresql/server LIBDIR = /postgresql/software/9.6.2/lib PKGLIBDIR = /postgresql/software/9.6.2/lib/postgresql LOCALEDIR = /postgresql/software/9.6.2/share/locale MANDIR = /postgresql/software/9.6.2/share/man SHAREDIR = /postgresql/software/9.6.2/share/postgresql SYSCONFDIR = /postgresql/software/9.6.2/etc/postgresql PGXS = /postgresql/software/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 make USE_PGXS=1 clean all rm -f *.o rm -f repmgrd rm -f repmgr make -C sql clean make[1]: Entering directory '/home/master/repmgr-3.3.1/sql' rm -f repmgr_funcs.so librepmgr_funcs.a librepmgr_funcs.pc rm -f repmgr_funcs.sql rm -f repmgr_funcs.o make[1]: Leaving directory '/home/master/repmgr-3.3.1/sql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -I/postgresql/software/9.6.2/include -I. -I./ -I/postgresql/software/9.6.2/include/postgresql/server -I/postgresql/software/9.6.2/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o dbutils.o dbutils.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -I/postgresql/software/9.6.2/include -I. -I./ -I/postgresql/software/9.6.2/include/postgresql/server -I/postgresql/software/9.6.2/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o config.o config.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -I/postgresql/software/9.6.2/include -I. -I./ -I/postgresql/software/9.6.2/include/postgresql/server -I/postgresql/software/9.6.2/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o repmgrd.o repmgrd.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -I/postgresql/software/9.6.2/include -I. -I./ -I/postgresql/software/9.6.2/include/postgresql/server -I/postgresql/software/9.6.2/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o log.o log.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -I/postgresql/software/9.6.2/include -I. -I./ -I/postgresql/software/9.6.2/include/postgresql/server -I/postgresql/software/9.6.2/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o strutil.o strutil.c gcc -o repmgrd -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 dbutils.o config.o repmgrd.o log.o strutil.o -L/postgresql/software/9.6.2/lib -lpgcommon -lpgport -L/postgresql/software/9.6.2/lib -lpq -L/postgresql/software/9.6.2/lib -L/opt/local/Current/lib -Wl,--as-needed -Wl,-rpath,'/postgresql/software/9.6.2/lib',--enable-new-dtags -lpgcommon -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -ledit -lrt -lcrypt -ldl -lm /usr/bin/ld: /postgresql/software/9.6.2/lib/libpgcommon.a(exec.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /postgresql/software/9.6.2/lib/libpgcommon.a(wait_error.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /postgresql/software/9.6.2/lib/libpgcommon.a(fe_memutils.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /postgresql/software/9.6.2/lib/libpgport.a(path.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status Makefile:20: recipe for target 'repmgrd' failed make: *** [repmgrd] Error 1 This is getting rather frustrating :) Any suggestions, anyone? Is this another obvious thing that crops up when compiling anything in PostgreSQL? Or have I hit an 'issue'? Regards, 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."
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round3 - libraries resolved, still can't compile :(
On 05/14/2017 02:43 AM, Martin Goodson wrote: > On 12/05/2017 18:57, Adrian Klaver wrote: > >> On 05/12/2017 09:19 AM, Martin Goodson wrote: >>> On 12/05/2017 16:59, Adrian Klaver wrote: >>> >> > Progress of a sort. Kinda. > > On a clean Ubuntu server 17.04 virtual machine I've installed PostgreSQL > 9.6 using the EnterpriseDB installer. The software was installed by > sudo'ing the installer, configuring ownership to the 'pginst' userid and > is up and running : > > I then downloaded the repmgr package (repmgr-3.3.1.tar.gz) from 2nd > quadrant, unzipped and untarred etc to the directory > /home/master/repmgr-3.3.1. I've followed the advice of the article > Adrian suggested and installed some packages: > > gcc, make, libxslt1-dev, libpam0g-dev, libssl-dev, libkrb5-dev, > libedit-dev, postgresql-server-dev-9.6 > > I have now apparently resolved the missing libraries problem. Or, at > least, it's no longer complaining that libs are missing. > > I built a little install script which I sudo: > > clear > PATH=/postgresql/software/9.6.2/bin:$PATH You forgot a step: export LD_LIBRARY_PATH=/postgresql/software/9.6.2/lib:$LD_LIBRARY_PATH > echo "PATH = $PATH" > echo "" > pg_config > echo "" > echo "make USE_PGXS=1 clean all" > echo "" > make USE_PGXS=1 clean all > > > Which produces this output (including the output of pg_config): > > PATH = > /postgresql/software/9.6.2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin > > > BINDIR = /postgresql/software/9.6.2/bin > DOCDIR = /postgresql/software/9.6.2/doc/postgresql > HTMLDIR = /postgresql/software/9.6.2/doc/postgresql > INCLUDEDIR = /postgresql/software/9.6.2/include > PKGINCLUDEDIR = /postgresql/software/9.6.2/include/postgresql > INCLUDEDIR-SERVER = /postgresql/software/9.6.2/include/postgresql/server > LIBDIR = /postgresql/software/9.6.2/lib > PKGLIBDIR = /postgresql/software/9.6.2/lib/postgresql > LOCALEDIR = /postgresql/software/9.6.2/share/locale > MANDIR = /postgresql/software/9.6.2/share/man > SHAREDIR = /postgresql/software/9.6.2/share/postgresql > SYSCONFDIR = /postgresql/software/9.6.2/etc/postgresql > PGXS = /postgresql/software/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 > > make USE_PGXS=1 clean all > > rm -f *.o > rm -f repmgrd > rm -f repmgr > make -C sql clean > make[1]: Entering directory '/home/master/repmgr-3.3.1/sql' > rm -f repmgr_funcs.so librepmgr_funcs.a librepmgr_funcs.pc > rm -f repmgr_funcs.sql > rm -f repmgr_funcs.o > make[1]: Leaving directory '/home/master/repmgr-3.3.1/sql' > gcc -Wall -Wmissing-prototypes -Wpointer-arith > -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute > -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 > -DMAP_HUGETLB=0x40000 -I/postgresql/software/9.6.2/include -I. -I./ > -I/postgresql/software/9.6.2/include/postgresql/server > -I/postgresql/software/9.6.2/include/postgresql/internal -D_GNU_SOURCE > -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o > dbutils.o dbutils.c > gcc -Wall -Wmissing-prototypes -Wpointer-arith > -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute > -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 > -DMAP_HUGETLB=0x40000 -I/postgresql/software/9.6.2/include -I. -I./ > -I/postgresql/software/9.6.2/include/postgresql/server > -I/postgresql/software/9.6.2/include/postgresql/internal -D_GNU_SOURCE > -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o > config.o config.c > gcc -Wall -Wmissing-prototypes -Wpointer-arith > -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute > -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 > -DMAP_HUGETLB=0x40000 -I/postgresql/software/9.6.2/include -I. -I./ > -I/postgresql/software/9.6.2/include/postgresql/server > -I/postgresql/software/9.6.2/include/postgresql/internal -D_GNU_SOURCE > -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o > repmgrd.o repmgrd.c > gcc -Wall -Wmissing-prototypes -Wpointer-arith > -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute > -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 > -DMAP_HUGETLB=0x40000 -I/postgresql/software/9.6.2/include -I. -I./ > -I/postgresql/software/9.6.2/include/postgresql/server > -I/postgresql/software/9.6.2/include/postgresql/internal -D_GNU_SOURCE > -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o > log.o log.c > gcc -Wall -Wmissing-prototypes -Wpointer-arith > -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute > -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 > -DMAP_HUGETLB=0x40000 -I/postgresql/software/9.6.2/include -I. -I./ > -I/postgresql/software/9.6.2/include/postgresql/server > -I/postgresql/software/9.6.2/include/postgresql/internal -D_GNU_SOURCE > -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o > strutil.o strutil.c > gcc -o repmgrd -Wall -Wmissing-prototypes -Wpointer-arith > -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute > -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 > -DMAP_HUGETLB=0x40000 dbutils.o config.o repmgrd.o log.o strutil.o > -L/postgresql/software/9.6.2/lib -lpgcommon -lpgport > -L/postgresql/software/9.6.2/lib -lpq -L/postgresql/software/9.6.2/lib > -L/opt/local/Current/lib -Wl,--as-needed > -Wl,-rpath,'/postgresql/software/9.6.2/lib',--enable-new-dtags > -lpgcommon -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz > -ledit -lrt -lcrypt -ldl -lm > /usr/bin/ld: /postgresql/software/9.6.2/lib/libpgcommon.a(exec.o): > relocation R_X86_64_32 against `.rodata.str1.1' can not be used when > making a shared object; recompile with -fPIC > /usr/bin/ld: /postgresql/software/9.6.2/lib/libpgcommon.a(wait_error.o): > relocation R_X86_64_32 against `.rodata.str1.8' can not be used when > making a shared object; recompile with -fPIC > /usr/bin/ld: > /postgresql/software/9.6.2/lib/libpgcommon.a(fe_memutils.o): relocation > R_X86_64_32 against `.rodata.str1.1' can not be used when making a > shared object; recompile with -fPIC > /usr/bin/ld: /postgresql/software/9.6.2/lib/libpgport.a(path.o): > relocation R_X86_64_32 against `.rodata.str1.1' can not be used when > making a shared object; recompile with -fPIC > /usr/bin/ld: final link failed: Nonrepresentable section on output > collect2: error: ld returned 1 exit status > Makefile:20: recipe for target 'repmgrd' failed > make: *** [repmgrd] Error 1 > > This is getting rather frustrating :) > > Any suggestions, anyone? Is this another obvious thing that crops up > when compiling anything in PostgreSQL? Or have I hit an 'issue'? > > Regards, > > Martin. -- Adrian Klaver adrian.klaver@aklaver.com
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round3 - libraries resolved, still can't compile :(
On 05/14/2017 02:43 AM, Martin Goodson wrote: > On 12/05/2017 18:57, Adrian Klaver wrote: > >> On 05/12/2017 09:19 AM, Martin Goodson wrote: >>> On 12/05/2017 16:59, Adrian Klaver wrote: >>> >> To make things easier I would remove the deb installed Postgres, it >> just adds complexity to the situation without providing benefit. >> >>> >>> Many thanks! >>> >>> Regards, >>> >>> Martin. >> >> > Progress of a sort. Kinda. > > > This is getting rather frustrating :) I understand. I just installed EDB Postgres 9.6.3 on my openSUSE Leap 42.2 machine and tried to compile repmgr against it. No joy. Seems to be some sort of library mismatch with krb5. I can compile/install it against my source installed(www.postgresql.org/ftp/source/) version of Postgres. > > Any suggestions, anyone? Is this another obvious thing that crops up > when compiling anything in PostgreSQL? Or have I hit an 'issue'? It is a compilation error not specific to Postgres. Remember what you downloaded is a third party build for a generic platform. I am guessing you chose Linux X86-64. Best guess is that the libraries that where compiled by EDB for the build are not an exact match for the libraries you have on your machine. Someone with more experience will need to interpret what: /usr/bin/ld: /postgresql/software/9.6.2/lib/libpgport.a(path.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC means? I used to point folks to the EDB forums when we got to this point. The EDB website was redesigned and I can't find the forums any more. You said earlier that your company policy was to use the EDB installer. Does the company have a support contract that you can use to get answers? > > Regards, > > Martin. -- Adrian Klaver adrian.klaver@aklaver.com
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR.Round 2 - compilation issues.
Hi Josh, On Fri, 2017-05-12 at 08:18 -0700, Joshua D. Drake wrote: > This is your problem. As Adrian already mentioned, you should be running > the PGDG apt repos. I don't think this is a productive answer. I could just compile repmgr on my CentOS 7 box against EPAS 9.6. Someone with a few packaging skills can also easily build package of repmgr against EPAS. That said, I'll reply Martin's email, too. Regards, -- Devrim Gündüz EnterpriseDB: http://www.enterprisedb.com PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer Twitter: @DevrimGunduz , @DevrimGunduzTR
Attachment
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR.Round 2 - compilation issues.
Hi Martin, On Fri, 2017-05-12 at 16:13 +0100, Martin Goodson wrote: > /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 I just tested this on my CentOS 7 box -- FWIW, you need to following dependencies (these are CentOS/RHEL package names, you can find their Ubuntu equivalents easily): systemd libxslt-devel pam-devel openssl-devel readline-devel libmemcached-devel libicu-devel Once you install their equivalent, you'll be able to compile repmgr against EPAS 9.6. (Hint: Last time I used Ubuntu/Debian, their package names ended with -dev for the development packages) Regards, -- Devrim Gündüz EnterpriseDB: http://www.enterprisedb.com PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer Twitter: @DevrimGunduz , @DevrimGunduzTR
Attachment
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR.Round 2 - compilation issues.
Hi again Martin, On Fri, 2017-05-12 at 16:13 +0100, Martin Goodson wrote: > testdb@repm:/postgresql/software/repmgr/repmgr-3.3.1$ sudo make > USE_PGXS=1 install BTW, please patch these two files first and change PG_CONFIG = pg_config to PG_CONFIG= /postgresql/software/pg/9.6.2/bin/config (apologies if you did this already, I did not read the whole thread): Makefile: line 33 sql/Makefile: line 13 and run USE_PGXS=1 make at this point. Regards, -- Devrim Gündüz EnterpriseDB: http://www.enterprisedb.com PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer Twitter: @DevrimGunduz , @DevrimGunduzTR
Attachment
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR.Round 3 - libraries resolved, still can't compile :(
Hi Adrian, On Sun, 2017-05-14 at 09:00 -0700, Adrian Klaver wrote: > I understand. I just installed EDB Postgres 9.6.3 on my openSUSE Leap > 42.2 machine and tried to compile repmgr against it. No joy. We don't support OpenSuSE, that might be the reason. Regards, -- Devrim Gündüz EnterpriseDB: http://www.enterprisedb.com PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer Twitter: @DevrimGunduz , @DevrimGunduzTR
Attachment
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round2 - compilation issues.
On 05/14/2017 11:29 AM, Devrim Gündüz wrote: > > Hi again Martin, > > On Fri, 2017-05-12 at 16:13 +0100, Martin Goodson wrote: >> testdb@repm:/postgresql/software/repmgr/repmgr-3.3.1$ sudo make >> USE_PGXS=1 install > > BTW, please patch these two files first and change > > PG_CONFIG = pg_config > to > PG_CONFIG= /postgresql/software/pg/9.6.2/bin/config Shouldn't the above be: PG_CONFIG= /postgresql/software/pg/9.6.2/bin/pg_config At any rate the build was finding the correct pg_config: " clear PATH=/postgresql/software/9.6.2/bin:$PATH echo "PATH = $PATH" echo "" pg_config echo "" echo "make USE_PGXS=1 clean all" echo "" make USE_PGXS=1 clean all Which produces this output (including the output of pg_config), from upstream: PATH = /postgresql/software/9.6.2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin BINDIR = /postgresql/software/9.6.2/bin DOCDIR = /postgresql/software/9.6.2/doc/postgresql HTMLDIR = /postgresql/software/9.6.2/doc/postgresql INCLUDEDIR = /postgresql/software/9.6.2/include PKGINCLUDEDIR = /postgresql/software/9.6.2/include/postgresql INCLUDEDIR-SERVER = /postgresql/software/9.6.2/include/postgresql/server LIBDIR = /postgresql/software/9.6.2/lib PKGLIBDIR = /postgresql/software/9.6.2/lib/postgresql LOCALEDIR = /postgresql/software/9.6.2/share/locale MANDIR = /postgresql/software/9.6.2/share/man SHAREDIR = /postgresql/software/9.6.2/share/postgresql SYSCONFDIR = /postgresql/software/9.6.2/etc/postgresql PGXS = /postgresql/software/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 " The problem the OP ran into was several errors like this: /usr/bin/ld: /postgresql/software/9.6.2/lib/libpgport.a(path.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC > > (apologies if you did this already, I did not read the whole thread): > > Makefile: line 33 > sql/Makefile: line 13 > > and run > > USE_PGXS=1 make > at this point. > > Regards, > -- Adrian Klaver adrian.klaver@aklaver.com
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round3 - libraries resolved, still can't compile :(
On 05/14/2017 11:31 AM, Devrim Gündüz wrote: > > Hi Adrian, > > On Sun, 2017-05-14 at 09:00 -0700, Adrian Klaver wrote: >> I understand. I just installed EDB Postgres 9.6.3 on my openSUSE Leap >> 42.2 machine and tried to compile repmgr against it. No joy. > > We don't support OpenSuSE, that might be the reason. Who is we and what don't you support? > > Regards, > -- Adrian Klaver adrian.klaver@aklaver.com
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR.Round 3 - libraries resolved, still can't compile :(
Hi, On Sun, 2017-05-14 at 12:59 -0700, Adrian Klaver wrote: > > We don't support OpenSuSE, that might be the reason. > > Who is we EnterpriseDB. > and what don't you support? OpenSuSE, as I wrote in the previous email. Regards, -- Devrim Gündüz EnterpriseDB: http://www.enterprisedb.com PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer Twitter: @DevrimGunduz , @DevrimGunduzTR
Attachment
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round3 - libraries resolved, still can't compile :(
On 05/14/2017 01:21 PM, Devrim Gündüz wrote: > > Hi, > > On Sun, 2017-05-14 at 12:59 -0700, Adrian Klaver wrote: >>> We don't support OpenSuSE, that might be the reason. >> >> Who is we > > EnterpriseDB. > >> and what don't you support? > > OpenSuSE, as I wrote in the previous email. You might need to rewrite this page then: https://www.postgresql.org/download/linux/suse/ "The installer is designed to be a straightforward, fast way to get up and running with PostgreSQL on Linux (Red Hat family Linux including CentOS/Fedora/Scientific/Oracle variants), Debian GNU/Linux and derivatives, Ubuntu Linux and derivatives, SuSE and OpenSuSE. " > > Regards, > -- Adrian Klaver adrian.klaver@aklaver.com
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round2 - compilation issues.
On 14/05/2017 19:26, Devrim Gündüz wrote: > Hi Martin, > > On Fri, 2017-05-12 at 16:13 +0100, Martin Goodson wrote: >> /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 > I just tested this on my CentOS 7 box -- FWIW, you need to following > dependencies (these are CentOS/RHEL package names, you can find their Ubuntu > equivalents easily): > > systemd > libxslt-devel > pam-devel > openssl-devel > readline-devel > libmemcached-devel > libicu-devel > > Once you install their equivalent, you'll be able to compile repmgr against > EPAS 9.6. (Hint: Last time I used Ubuntu/Debian, their package names ended with > -dev for the development packages) > > Regards, > Hello. Many thanks to yourself and Adrian for responding, it's very much appreciated. I've only got access to Ubuntu at home, which is what I've been trying to get this compiled against over the weekend. I wasn't getting very far with it on our actual RHEL 7 boxes at work, and didn't want to stick around the office until midnight and throughout the weekend :) As Adrian pointed out, I was just about able to overcome the missing lib dependencies and progressed further, wherein I came across the following messages: gcc -o repmgrd -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 dbutils.o config.o repmgrd.o log.o strutil.o -L/postgresql/software/9.6.2/lib -lpgcommon -lpgport -L/postgresql/software/9.6.2/lib -lpq -L/postgresql/software/9.6.2/lib -L/opt/local/Current/lib -Wl,--as-needed -Wl,-rpath,'/postgresql/software/9.6.2/lib',--enable-new-dtags -lpgcommon -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -ledit -lrt -lcrypt -ldl -lm /usr/bin/ld: /postgresql/software/9.6.2/lib/libpgcommon.a(exec.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /postgresql/software/9.6.2/lib/libpgcommon.a(wait_error.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /postgresql/software/9.6.2/lib/libpgcommon.a(fe_memutils.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /postgresql/software/9.6.2/lib/libpgport.a(path.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status Makefile:20: recipe for target 'repmgrd' failed make: *** [repmgrd] Error 1 It seems unlikely that those errors are generated simply by me not including ld_library_path? Is this is a result of how the EnterpriseDB postgresql is packaged somehow? I gave up on compiling this earlier today, and just built a standard postgresql and repmgr against the standard packages/repositories to test/play with. I'm happy to say it seems to work alright ... *if* you can get the software built :) I'll try recompiling this on RHEL tomorrow (and include the LD_LIBRARY_PATH) as suggested in an earlier message. Hopefully there will be some progress, 'cos this is urgently required. Do you happen to know if there's any documentation anywhere on installing/configuring repmgr with Enterprise DB PostgreSQL (community, *not* Advanced)? Many thanks for everybody's help with this, it's very much appreciated. Regards, 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."
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round2 - compilation issues.
On 05/14/2017 11:26 AM, Devrim Gündüz wrote: > > Hi Martin, > > On Fri, 2017-05-12 at 16:13 +0100, Martin Goodson wrote: >> /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 > > I just tested this on my CentOS 7 box -- FWIW, you need to following > dependencies (these are CentOS/RHEL package names, you can find their Ubuntu > equivalents easily): > > systemd > libxslt-devel > pam-devel > openssl-devel > readline-devel > libmemcached-devel > libicu-devel > > Once you install their equivalent, you'll be able to compile repmgr against > EPAS 9.6. (Hint: Last time I used Ubuntu/Debian, their package names ended with > -dev for the development packages) I spun up an Ubuntu 16.04 instance and: RH Ubuntu build-essential libxslt-devel libxslt1-dev(this also pulled in libicu-dev) pam-devel libpam0g-dev openssl-devel libssl-dev readline-devel libreadline-dev libmemcached-devel libmemcached-dev libicu-devel libicu-dev libedit-dev libkrb5-dev ubuntu@ip-172-30-0-36:~/repmgr-3.3.1$ PATH=/opt//PostgreSQL/9.6/bin:$PATH make USE_PGXS=1 clean all rm -f *.o rm -f repmgrd rm -f repmgr make -C sql clean make[1]: Entering directory '/home/ubuntu/repmgr-3.3.1/sql' rm -f repmgr_funcs.so librepmgr_funcs.a librepmgr_funcs.pc rm -f repmgr_funcs.sql rm -f repmgr_funcs.o make[1]: Leaving directory '/home/ubuntu/repmgr-3.3.1/sql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -I/opt/PostgreSQL/9.6/include -I. -I./ -I/opt/PostgreSQL/9.6/include/postgresql/server -I/opt/PostgreSQL/9.6/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o dbutils.o dbutils.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -I/opt/PostgreSQL/9.6/include -I. -I./ -I/opt/PostgreSQL/9.6/include/postgresql/server -I/opt/PostgreSQL/9.6/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o config.o config.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -I/opt/PostgreSQL/9.6/include -I. -I./ -I/opt/PostgreSQL/9.6/include/postgresql/server -I/opt/PostgreSQL/9.6/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o repmgrd.o repmgrd.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -I/opt/PostgreSQL/9.6/include -I. -I./ -I/opt/PostgreSQL/9.6/include/postgresql/server -I/opt/PostgreSQL/9.6/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o log.o log.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -I/opt/PostgreSQL/9.6/include -I. -I./ -I/opt/PostgreSQL/9.6/include/postgresql/server -I/opt/PostgreSQL/9.6/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o strutil.o strutil.c gcc -o repmgrd -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 dbutils.o config.o repmgrd.o log.o strutil.o -L/opt/PostgreSQL/9.6/lib -lpgcommon -lpgport -L/opt/PostgreSQL/9.6/lib -lpq -L/opt/PostgreSQL/9.6/lib -L/opt/local/Current/lib -Wl,--as-needed -Wl,-rpath,'/opt/PostgreSQL/9.6/lib',--enable-new-dtags -lpgcommon -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -ledit -lrt -lcrypt -ldl -lm make -C sql make[1]: Entering directory '/home/ubuntu/repmgr-3.3.1/sql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -fpic -I. -I./ -I/opt/PostgreSQL/9.6/include/postgresql/server -I/opt/PostgreSQL/9.6/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o repmgr_funcs.o repmgr_funcs.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -fpic -shared -o repmgr_funcs.so repmgr_funcs.o -L/opt/PostgreSQL/9.6/lib -L/opt/local/Current/lib -Wl,--as-needed -Wl,-rpath,'/opt/PostgreSQL/9.6/lib',--enable-new-dtags sed 's,MODULE_PATHNAME,$libdir/repmgr_funcs,g' repmgr_funcs.sql.in >repmgr_funcs.sql make[1]: Leaving directory '/home/ubuntu/repmgr-3.3.1/sql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -I/opt/PostgreSQL/9.6/include -I. -I./ -I/opt/PostgreSQL/9.6/include/postgresql/server -I/opt/PostgreSQL/9.6/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o check_dir.o check_dir.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -I/opt/PostgreSQL/9.6/include -I. -I./ -I/opt/PostgreSQL/9.6/include/postgresql/server -I/opt/PostgreSQL/9.6/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o repmgr.o repmgr.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -I/opt/PostgreSQL/9.6/include -I. -I./ -I/opt/PostgreSQL/9.6/include/postgresql/server -I/opt/PostgreSQL/9.6/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o dirmod.o dirmod.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -I/opt/PostgreSQL/9.6/include -I. -I./ -I/opt/PostgreSQL/9.6/include/postgresql/server -I/opt/PostgreSQL/9.6/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o compat.o compat.c gcc -o repmgr -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 dbutils.o check_dir.o config.o repmgr.o log.o strutil.o dirmod.o compat.o -L/opt/PostgreSQL/9.6/lib -lpgcommon -lpgport -L/opt/PostgreSQL/9.6/lib -lpq -L/opt/PostgreSQL/9.6/lib -L/opt/local/Current/lib -Wl,--as-needed -Wl,-rpath,'/opt/PostgreSQL/9.6/lib',--enable-new-dtags -lpgcommon -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -ledit -lrt -lcrypt -ldl -lm make -C sql make[1]: Entering directory '/home/ubuntu/repmgr-3.3.1/sql' make[1]: Nothing to be done for 'all'. make[1]: Leaving directory '/home/ubuntu/repmgr-3.3.1/sql' ubuntu@ip-172-30-0-36:~/repmgr-3.3.1$ sudo PATH=/opt//PostgreSQL/9.6/bin:$PATH make USE_PGXS=1 install make -C sql make[1]: Entering directory '/home/ubuntu/repmgr-3.3.1/sql' make[1]: Nothing to be done for 'all'. make[1]: Leaving directory '/home/ubuntu/repmgr-3.3.1/sql' /bin/mkdir -p '/opt/PostgreSQL/9.6/share/postgresql/contrib' mkdir -p '/opt/PostgreSQL/9.6/bin' /usr/bin/install -c repmgrd '/opt/PostgreSQL/9.6/bin/' /usr/bin/install -c repmgr '/opt/PostgreSQL/9.6/bin/' make -C sql install make[1]: Entering directory '/home/ubuntu/repmgr-3.3.1/sql' /bin/mkdir -p '/opt/PostgreSQL/9.6/lib/postgresql' /bin/mkdir -p '/opt/PostgreSQL/9.6/share/postgresql/contrib' /usr/bin/install -c -m 755 repmgr_funcs.so '/opt/PostgreSQL/9.6/lib/postgresql/repmgr_funcs.so' /usr/bin/install -c -m 644 .//uninstall_repmgr_funcs.sql repmgr_funcs.sql '/opt/PostgreSQL/9.6/share/postgresql/contrib/' make[1]: Leaving directory '/home/ubuntu/repmgr-3.3.1/sql' /usr/bin/install -c -m 644 .//repmgr.sql .//uninstall_repmgr.sql '/opt/PostgreSQL/9.6/share/postgresql/contrib/' > > Regards, > -- Adrian Klaver adrian.klaver@aklaver.com
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round2 - compilation issues.
On 05/14/2017 11:22 AM, Devrim Gündüz wrote: > > Hi Josh, > > On Fri, 2017-05-12 at 08:18 -0700, Joshua D. Drake wrote: >> This is your problem. As Adrian already mentioned, you should be running >> the PGDG apt repos. > > I don't think this is a productive answer. Really? The OP has had a thread of 28 messages over 2.5 days going back and forth trying to solve a problem against the One Click Installer that would have been as simple as: apt-get install repmgr; (Granted he would have had to enable the PGDG apt repo) I would say my response (and Adrian's originally) is absolutely productive. Native OS packaging is *always* better if it is possible to use it. Thanks, JD -- Command Prompt, Inc. http://the.postgres.company/ +1-503-667-4564 PostgreSQL Centered full stack support, consulting and development. Everyone appreciates your honesty, until you are honest with them. Unless otherwise stated, opinions are my own.
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round2 - compilation issues.
On 05/14/2017 01:42 PM, Martin Goodson wrote: > Do you happen to know if there's any documentation anywhere on > installing/configuring repmgr with Enterprise DB PostgreSQL (community, > *not* Advanced)? A bit outdated but: http://raghavt.blogspot.com/2015/01/configuring-automatic-failover-using.html JD -- Command Prompt, Inc. http://the.postgres.company/ +1-503-667-4564 PostgreSQL Centered full stack support, consulting and development. Everyone appreciates your honesty, until you are honest with them. Unless otherwise stated, opinions are my own.
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round2 - compilation issues.
On 05/14/2017 02:20 PM, Joshua D. Drake wrote: > On 05/14/2017 01:42 PM, Martin Goodson wrote: >> Do you happen to know if there's any documentation anywhere on >> installing/configuring repmgr with Enterprise DB PostgreSQL (community, >> *not* Advanced)? > > A bit outdated but: > > http://raghavt.blogspot.com/2015/01/configuring-automatic-failover-using.html https://www.postgresql.org/message-id/4ff25277-cfb6-4dbc-0f98-13c031dd4181%40aklaver.com The OP followed the procedure in the above to get to Round 3:) > > > JD > -- Adrian Klaver adrian.klaver@aklaver.com
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round2 - compilation issues.
On 05/14/2017 02:38 PM, Adrian Klaver wrote: > On 05/14/2017 02:20 PM, Joshua D. Drake wrote: >> On 05/14/2017 01:42 PM, Martin Goodson wrote: >>> Do you happen to know if there's any documentation anywhere on >>> installing/configuring repmgr with Enterprise DB PostgreSQL (community, >>> *not* Advanced)? >> >> A bit outdated but: >> >> http://raghavt.blogspot.com/2015/01/configuring-automatic-failover-using.html > > > https://www.postgresql.org/message-id/4ff25277-cfb6-4dbc-0f98-13c031dd4181%40aklaver.com > > The OP followed the procedure in the above to get to Round 3:) Hah! Well o.k. then :P JD -- Command Prompt, Inc. http://the.postgres.company/ +1-503-667-4564 PostgreSQL Centered full stack support, consulting and development. Everyone appreciates your honesty, until you are honest with them. Unless otherwise stated, opinions are my own.
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round2 - compilation issues.
On 5/14/2017 2:20 PM, Joshua D. Drake wrote: > A bit outdated but: > > http://raghavt.blogspot.com/2015/01/configuring-automatic-failover-using.html > the advice on that page to unlink a library in /lib64 on an RPM managed system makes me very leery of the rest of the article. -- john r pierce, recycling bits in santa cruz
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round2 - compilation issues.
On 14/05/2017 21:49, Adrian Klaver wrote: > > > I spun up an Ubuntu 16.04 instance and: > > > > RH Ubuntu > build-essential > libxslt-devel libxslt1-dev(this also pulled in libicu-dev) > pam-devel libpam0g-dev > openssl-devel libssl-dev > readline-devel libreadline-dev > libmemcached-devel libmemcached-dev > libicu-devel libicu-dev > libedit-dev > libkrb5-dev > > ubuntu@ip-172-30-0-36:~/repmgr-3.3.1$ > PATH=/opt//PostgreSQL/9.6/bin:$PATH make USE_PGXS=1 clean all > ubuntu@ip-172-30-0-36:~/repmgr-3.3.1$ sudo > PATH=/opt//PostgreSQL/9.6/bin:$PATH make USE_PGXS=1 install Thank you so much, Adrian (and others) that seems to have done the trick. At least, it's compiled against a completely generic PostgreSQL build that I did without any apparent error: BUILD SERVER 1. (VISUALBOX) Ubuntu 16.04 server build. 2. sudo apt-get update 3. sudo apt-get upgrade 4. copy postgresql-9.6.3.1-linux-x64.run from EnterpriseDB to VM 5. copy repmgr-3.3.1.tar.gz from repmgr.org 6. sudo apt-get install make 7. sudo apt-get install gcc 8. sudo groupadd gpginst 9. sudo mkdir -p /opt/PostgreSQL/9.6.3 < - Build PG software directory 10. sudo mkdir -p /opt/PostgreSQL/pginst 11. sudo useradd -g gpginst -d /opt/PostgreSQL/pginst pginst 12. chmod 750 postgresql-9.6.3.1-linux-x64.run BUILD GENERIC POSTGRESQL DB USING ENTERPRISEDB INSTALLER (community edition) 13. sudo ./postgresql-9.6.3-1-linux-x64.run --superaccount pginst --serviceaccount pginst --prefix /opt/PostgreSQL/9.6.3 --datadir /opt/PostgreSQL/9.6.3/data --superpassword temporary --serverport 50000 ---------------------------------------------------------------------------- Welcome to the PostgreSQL Setup Wizard. ---------------------------------------------------------------------------- Please specify the directory where PostgreSQL will be installed. Installation Directory [/opt/PostgreSQL/9.6.3]: <SNIPPED> ---------------------------------------------------------------------------- Please wait while Setup installs PostgreSQL on your computer. Installing 0% ______________ 50% ______________ 100% ######################################### ---------------------------------------------------------------------------- Setup has finished installing PostgreSQL on your computer. Verify PostgreSQL up and running ... 15. ps -ef | grep -i "post" pginst 6724 1 0 23:28 ? 00:00:00 /opt/PostgreSQL/9.6.3/bin/postgres -D /opt/PostgreSQL/9.6.3/data pginst 6726 6724 0 23:28 ? 00:00:00 postgres: logger process pginst 6728 6724 0 23:28 ? 00:00:00 postgres: checkpointer process pginst 6729 6724 0 23:28 ? 00:00:00 postgres: writer process pginst 6730 6724 0 23:28 ? 00:00:00 postgres: wal writer process pginst 6731 6724 0 23:28 ? 00:00:00 postgres: autovacuum launcher process pginst 6732 6724 0 23:28 ? 00:00:00 postgres: stats collector process pginst 6752 6743 0 23:31 pts/0 00:00:00 grep -i post Check pg_config 16. sudo su - pginst 17. $ /opt/PostgreSQL/9.6.3/bin/pg_config BINDIR = /opt/PostgreSQL/9.6.3/bin DOCDIR = /opt/PostgreSQL/9.6.3/doc/postgresql HTMLDIR = /opt/PostgreSQL/9.6.3/doc/postgresql INCLUDEDIR = /opt/PostgreSQL/9.6.3/include PKGINCLUDEDIR = /opt/PostgreSQL/9.6.3/include/postgresql INCLUDEDIR-SERVER = /opt/PostgreSQL/9.6.3/include/postgresql/server LIBDIR = /opt/PostgreSQL/9.6.3/lib PKGLIBDIR = /opt/PostgreSQL/9.6.3/lib/postgresql LOCALEDIR = /opt/PostgreSQL/9.6.3/share/locale MANDIR = /opt/PostgreSQL/9.6.3/share/man SHAREDIR = /opt/PostgreSQL/9.6.3/share/postgresql SYSCONFDIR = /opt/PostgreSQL/9.6.3/etc/postgresql PGXS = /opt/PostgreSQL/9.6.3/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.3 18. sudo apt-get install build-essential 19. sudo apt-get install libpam0g-dev 20. sudo apt-get install libssl-dev 21. sudo apt-get install libreadline-dev 22. sudo apt-get install libmemcached-dev 23. sudo apt-get install libicu-dev 24. sudo apt-get install libedit-dev 25. sudo apt-get install libkrb5-dev 26. gunzip and tar repmgr-3.3.1.tar.gz (Oops! Tried installing, but didn't work 'cos I'd forgotten a library - see step 27 ... ) 27. sudo apt-get install libxslt1-dev 28. PATH=/opt/PostgreSQL/9.6.3/bin:$PATH make USE_PGXS=1 clean all rm -f *.o rm -f repmgrd rm -f repmgr make -C sql clean make[1]: Entering directory '/home/master/repmgr-3.3.1/sql' rm -f repmgr_funcs.so librepmgr_funcs.a librepmgr_funcs.pc rm -f repmgr_funcs.sql rm -f repmgr_funcs.o make[1]: Leaving directory '/home/master/repmgr-3.3.1/sql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -I/opt/PostgreSQL/9.6.3/include -I. -I./ -I/opt/PostgreSQL/9.6.3/include/postgresql/server -I/opt/PostgreSQL/9.6.3/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o dbutils.o dbutils.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -I/opt/PostgreSQL/9.6.3/include -I. -I./ -I/opt/PostgreSQL/9.6.3/include/postgresql/server -I/opt/PostgreSQL/9.6.3/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o config.o config.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -I/opt/PostgreSQL/9.6.3/include -I. -I./ -I/opt/PostgreSQL/9.6.3/include/postgresql/server -I/opt/PostgreSQL/9.6.3/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o repmgrd.o repmgrd.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -I/opt/PostgreSQL/9.6.3/include -I. -I./ -I/opt/PostgreSQL/9.6.3/include/postgresql/server -I/opt/PostgreSQL/9.6.3/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o log.o log.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -I/opt/PostgreSQL/9.6.3/include -I. -I./ -I/opt/PostgreSQL/9.6.3/include/postgresql/server -I/opt/PostgreSQL/9.6.3/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o strutil.o strutil.c gcc -o repmgrd -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 dbutils.o config.o repmgrd.o log.o strutil.o -L/opt/PostgreSQL/9.6.3/lib -lpgcommon -lpgport -L/opt/PostgreSQL/9.6.3/lib -lpq -L/opt/PostgreSQL/9.6.3/lib -L/opt/local/Current/lib -Wl,--as-needed -Wl,-rpath,'/opt/PostgreSQL/9.6.3/lib',--enable-new-dtags -lpgcommon -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -ledit -lrt -lcrypt -ldl -lm make -C sql make[1]: Entering directory '/home/master/repmgr-3.3.1/sql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -fpic -I. -I./ -I/opt/PostgreSQL/9.6.3/include/postgresql/server -I/opt/PostgreSQL/9.6.3/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o repmgr_funcs.o repmgr_funcs.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -fpic -shared -o repmgr_funcs.so repmgr_funcs.o -L/opt/PostgreSQL/9.6.3/lib -L/opt/local/Current/lib -Wl,--as-needed -Wl,-rpath,'/opt/PostgreSQL/9.6.3/lib',--enable-new-dtags sed 's,MODULE_PATHNAME,$libdir/repmgr_funcs,g' repmgr_funcs.sql.in >repmgr_funcs.sql make[1]: Leaving directory '/home/master/repmgr-3.3.1/sql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -I/opt/PostgreSQL/9.6.3/include -I. -I./ -I/opt/PostgreSQL/9.6.3/include/postgresql/server -I/opt/PostgreSQL/9.6.3/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o check_dir.o check_dir.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -I/opt/PostgreSQL/9.6.3/include -I. -I./ -I/opt/PostgreSQL/9.6.3/include/postgresql/server -I/opt/PostgreSQL/9.6.3/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o repmgr.o repmgr.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -I/opt/PostgreSQL/9.6.3/include -I. -I./ -I/opt/PostgreSQL/9.6.3/include/postgresql/server -I/opt/PostgreSQL/9.6.3/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o dirmod.o dirmod.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -I/opt/PostgreSQL/9.6.3/include -I. -I./ -I/opt/PostgreSQL/9.6.3/include/postgresql/server -I/opt/PostgreSQL/9.6.3/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o compat.o compat.c gcc -o repmgr -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 dbutils.o check_dir.o config.o repmgr.o log.o strutil.o dirmod.o compat.o -L/opt/PostgreSQL/9.6.3/lib -lpgcommon -lpgport -L/opt/PostgreSQL/9.6.3/lib -lpq -L/opt/PostgreSQL/9.6.3/lib -L/opt/local/Current/lib -Wl,--as-needed -Wl,-rpath,'/opt/PostgreSQL/9.6.3/lib',--enable-new-dtags -lpgcommon -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -ledit -lrt -lcrypt -ldl -lm make -C sql make[1]: Entering directory '/home/master/repmgr-3.3.1/sql' make[1]: Nothing to be done for 'all'. make[1]: Leaving directory '/home/master/repmgr-3.3.1/sql' 29. sudo PATH=/opt/PostgreSQL/9.6.3/bin:$PATH make USE_PGXS=1 install make -C sql make[1]: Entering directory '/home/master/repmgr-3.3.1/sql' make[1]: Nothing to be done for 'all'. make[1]: Leaving directory '/home/master/repmgr-3.3.1/sql' /bin/mkdir -p '/opt/PostgreSQL/9.6.3/share/postgresql/contrib' mkdir -p '/opt/PostgreSQL/9.6.3/bin' /usr/bin/install -c repmgrd '/opt/PostgreSQL/9.6.3/bin/' /usr/bin/install -c repmgr '/opt/PostgreSQL/9.6.3/bin/' make -C sql install make[1]: Entering directory '/home/master/repmgr-3.3.1/sql' /bin/mkdir -p '/opt/PostgreSQL/9.6.3/lib/postgresql' /bin/mkdir -p '/opt/PostgreSQL/9.6.3/share/postgresql/contrib' /usr/bin/install -c -m 755 repmgr_funcs.so '/opt/PostgreSQL/9.6.3/lib/postgresql/repmgr_funcs.so' /usr/bin/install -c -m 644 .//uninstall_repmgr_funcs.sql repmgr_funcs.sql '/opt/PostgreSQL/9.6.3/share/postgresql/contrib/' make[1]: Leaving directory '/home/master/repmgr-3.3.1/sql' /usr/bin/install -c -m 644 .//repmgr.sql .//uninstall_repmgr.sql '/opt/PostgreSQL/9.6.3/share/postgresql/contrib/' Tomorrow I'll have to see about getting that set-up on an RHEL 7 box :) Thank you so much, everybody, for your help! It's been invaluable! Regards, 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."
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round4 - compilation issues on RHEL 7.2
On 15/05/2017 00:17, Martin Goodson wrote:
Tomorrow I'll have to see about getting that set-up on an RHEL 7 box :)
Thank you so much, everybody, for your help! It's been invaluable!
Regards,
Martin.
*Sigh*. And things were going so well. With Adrian and Devrim's help I was able to get repmgr compiled on my little ubuntu box at home, and I cheerfully went into work on Monday all ready to get things compiled nicely.
I forwarded Devrim's list of redhat/CentOS packages needed to my Unix support colleagues, who installed the libraries listed. I've now got nothing telling me such and such is missing. I now have this instead:
$ PATH=/db_demo/app/postgres/9.6.2-3/bin:$PATH make USE_PGXS=1 clean all
rm -f *.o
rm -f repmgrd
rm -f repmgr
make -C sql clean
make[1]: Entering directory `/home/pginst/repmgr-3.3.1/sql'
rm -f repmgr_funcs.so librepmgr_funcs.a librepmgr_funcs.pc
rm -f repmgr_funcs.sql
rm -f repmgr_funcs.o
make[1]: Leaving directory `/home/pginst/repmgr-3.3.1/sql'
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -I/db_demo/app/postgres/9.6.2-3/include -I. -I./ -I/db_demo/app/postgres/9.6.2-3/include/postgresql/server -I/db_demo/app/postgres/9.6.2-3/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o dbutils.o dbutils.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -I/db_demo/app/postgres/9.6.2-3/include -I. -I./ -I/db_demo/app/postgres/9.6.2-3/include/postgresql/server -I/db_demo/app/postgres/9.6.2-3/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o config.o config.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -I/db_demo/app/postgres/9.6.2-3/include -I. -I./ -I/db_demo/app/postgres/9.6.2-3/include/postgresql/server -I/db_demo/app/postgres/9.6.2-3/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o repmgrd.o repmgrd.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -I/db_demo/app/postgres/9.6.2-3/include -I. -I./ -I/db_demo/app/postgres/9.6.2-3/include/postgresql/server -I/db_demo/app/postgres/9.6.2-3/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o log.o log.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -I/db_demo/app/postgres/9.6.2-3/include -I. -I./ -I/db_demo/app/postgres/9.6.2-3/include/postgresql/server -I/db_demo/app/postgres/9.6.2-3/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o strutil.o strutil.c
gcc -o repmgrd -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 dbutils.o config.o repmgrd.o log.o strutil.o -L/db_demo/app/postgres/9.6.2-3/lib -lpgcommon -lpgport -L/db_demo/app/postgres/9.6.2-3/lib -lpq -L/db_demo/app/postgres/9.6.2-3/lib -L/opt/local/Current/lib -Wl,--as-needed -Wl,-rpath,'/db_demo/app/postgres/9.6.2-3/lib',--enable-new-dtags -lpgcommon -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -ledit -lrt -lcrypt -ldl -lm
/bin/ld: warning: libssl.so.1.0.0, needed by /db_demo/app/postgres/9.6.2-3/lib/libpq.so, may conflict with libssl.so.10
/lib64/libldap_r-2.4.so.2: undefined reference to `ber_sockbuf_io_udp'
I've forwarded that to our UNIX support team, just in case this is some manner of known issue - and they've come back today saying, essentially, we got nothing :)
FWIW, I'm trying this on a tiny virtual development server running RHEL 7.2 with 2 cpus and 4gb of RAM. PostgreSQL was built using the EnterpriseDB installer and is in /db_demo/app/postgres/9.6.2-3.
Any ideas? Is this a new thing, an existing issue that's popped up before, or (yet again! :) ) a case of me missing something that is blindingly obvious to everyone else?
Regards,
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."
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round4 - compilation issues on RHEL 7.2
On 05/16/2017 04:36 AM, Martin Goodson wrote: > On 15/05/2017 00:17, Martin Goodson wrote: > >> >> Tomorrow I'll have to see about getting that set-up on an RHEL 7 box :) >> >> Thank you so much, everybody, for your help! It's been invaluable! >> >> Regards, >> >> Martin. >> > > *Sigh*. And things were going so well. With Adrian and Devrim's help I > was able to get repmgr compiled on my little ubuntu box at home, and I > cheerfully went into work on Monday all ready to get things compiled nicely. > > I forwarded Devrim's list of redhat/CentOS packages needed to my Unix > support colleagues, who installed the libraries listed. I've now got > nothing telling me such and such is missing. I now have this instead: That list would be: systemd libxslt-devel pam-devel openssl-devel readline-devel libmemcached-devel libicu-devel Did you also install?: krb5-devel libedit-devel > > $ PATH=/db_demo/app/postgres/9.6.2-3/bin:$PATH make USE_PGXS=1 clean all > rm -f *.o > rm -f repmgrd > rm -f repmgr > make -C sql clean > make[1]: Entering directory `/home/pginst/repmgr-3.3.1/sql' > > rm -f repmgr_funcs.so librepmgr_funcs.a librepmgr_funcs.pc > rm -f repmgr_funcs.sql > rm -f repmgr_funcs.o > > make[1]: Leaving directory `/home/pginst/repmgr-3.3.1/sql' > > gcc -Wall -Wmissing-prototypes -Wpointer-arith > > /bin/ld: warning: libssl.so.1.0.0, needed by > /db_demo/app/postgres/9.6.2-3/lib/libpq.so, may conflict with libssl.so.10 Not sure this is an issue, still see below. What does ldd /db_demo/app/postgres/9.6.2-3/lib/libpq.so show? And: whereis libssl.so > > /lib64/libldap_r-2.4.so.2: undefined reference to `ber_sockbuf_io_udp' > Is that the end of the messages or are there more after the above? > > I've forwarded that to our UNIX support team, just in case this is some > manner of known issue - and they've come back today saying, essentially, > we got nothing :) > > FWIW, I'm trying this on a tiny virtual development server running RHEL > 7.2 with 2 cpus and 4gb of RAM. PostgreSQL was built using the > EnterpriseDB installer and is in /db_demo/app/postgres/9.6.2-3. So above when you said your colleagues installed the packages for you, was that on the host or the virtual machine? > > Any ideas? Is this a new thing, an existing issue that's popped up > before, or (yet again! :) ) a case of me missing something that is > blindingly obvious to everyone else? > > Regards, > > Martin. > -- > Martin Goodson > -- Adrian Klaver adrian.klaver@aklaver.com
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round4 - compilation issues on RHEL 7.2
On 16/05/2017 14:42, Adrian Klaver wrote: > On 05/16/2017 04:36 AM, Martin Goodson wrote: >> On 15/05/2017 00:17, Martin Goodson wrote: >> >>> >>> Tomorrow I'll have to see about getting that set-up on an RHEL 7 box :) >>> >>> Thank you so much, everybody, for your help! It's been invaluable! >>> >>> Regards, >>> >>> Martin. >>> >> >> *Sigh*. And things were going so well. With Adrian and Devrim's help >> I was able to get repmgr compiled on my little ubuntu box at home, >> and I cheerfully went into work on Monday all ready to get things >> compiled nicely. >> >> I forwarded Devrim's list of redhat/CentOS packages needed to my Unix >> support colleagues, who installed the libraries listed. I've now got >> nothing telling me such and such is missing. I now have this instead: > > That list would be: > systemd > libxslt-devel > pam-devel > openssl-devel > readline-devel > libmemcached-devel > libicu-devel > > Did you also install?: > > krb5-devel > libedit-devel Hi. This is what I see: $ rpm -qa | grep -i -e "systemd" -e "devel" systemd-sysv-219-19.el7_2.20.x86_64 keyutils-libs-devel-1.5.8-3.el7.x86_64 krb5-devel-1.13.2-12.el7_2.x86_64 readline-devel-6.2-9.el7.x86_64 libicu-devel-50.1.2-15.el7.x86_64 libgpg-error-devel-1.12-3.el7.x86_64 libxslt-devel-1.1.28-5.el7.x86_64 systemd-libs-219-19.el7_2.20.x86_64 libedit-devel-3.0-12.20121213cvs.el7.x86_64 pam-devel-1.1.8-12.el7_1.1.x86_64 pcre-devel-8.32-15.el7_2.1.x86_64 libsepol-devel-2.1.9-3.el7.x86_64 libverto-devel-0.2.5-4.el7.x86_64 zlib-devel-1.2.7-15.el7.x86_64 ncurses-devel-5.9-13.20130511.el7.x86_64 libgcrypt-devel-1.5.3-12.el7_1.1.x86_64 libxml2-devel-2.9.1-6.el7_2.3.x86_64 libmemcached-devel-1.0.16-5.el7.x86_64 systemd-219-19.el7_2.20.x86_64 libcom_err-devel-1.42.9-7.el7.x86_64 libselinux-devel-2.2.2-6.el7.x86_64 openssl-devel-1.0.1e-51.el7_2.7.x86_64 glibc-devel-2.17-106.el7_2.8.x86_64 xz-devel-5.1.2-12alpha.el7.x86_64cyrus-sasl-devel-2.1.26-20.el7_2.x86_64 So it looks like I've got pretty much everything covered in that respect? :) > What does > > ldd /db_demo/app/postgres/9.6.2-3/lib/libpq.so show? I get the following: linux-vdso.so.1 => (0x00007ffd631ae000) libssl.so.1.0.0 => /db_demo/app/postgres/9.6.2-3/lib/libssl.so.1.0.0 (0x00007f1002aa1000) libcrypto.so.1.0.0 => /db_demo/app/postgres/9.6.2-3/lib/libcrypto.so.1.0.0 (0x00007f100266a000) libgssapi_krb5.so.2 => /db_demo/app/postgres/9.6.2-3/lib/libgssapi_krb5.so.2 (0x00007f1002410000) libldap_r-2.4.so.2 => /db_demo/app/postgres/9.6.2-3/lib/libldap_r-2.4.so.2 (0x00007f10021ae000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f1001f88000) libc.so.6 => /lib64/libc.so.6 (0x00007f1001bc6000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f10019c2000) libkrb5.so.3 => /db_demo/app/postgres/9.6.2-3/lib/libkrb5.so.3 (0x00007f10016cc000) libk5crypto.so.3 => /db_demo/app/postgres/9.6.2-3/lib/libk5crypto.so.3 (0x00007f1001486000) libcom_err.so.3 => /db_demo/app/postgres/9.6.2-3/lib/libcom_err.so.3 (0x00007f1001283000) libkrb5support.so.0 => /db_demo/app/postgres/9.6.2-3/lib/libkrb5support.so.0 (0x00007f1001075000) libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f1000e5b000) liblber-2.4.so.2 => /db_demo/app/postgres/9.6.2-3/lib/liblber-2.4.so.2 (0x00007f1000c4b000) libsasl2.so.3 => /db_demo/app/postgres/9.6.2-3/lib/libsasl2.so.3 (0x00007f1000a28000) /lib64/ld-linux-x86-64.so.2 (0x00007f1002f3f000) > whereis libssl.so For that I get the following: libssl: /usr/lib64/libssl3.so /usr/lib64/libssl.so > >> >> /lib64/libldap_r-2.4.so.2: undefined reference to `ber_sockbuf_io_udp' >> > > Is that the end of the messages or are there more after the above? Ah, sorry. A bit got truncated. Here you go: /bin/ld: warning: libssl.so.1.0.0, needed by /db_demo/app/postgres/9.6.2-3/lib/libpq.so, may conflict with libssl.so.10 /lib64/libldap_r-2.4.so.2: undefined reference to `ber_sockbuf_io_udp' collect2: error: ld returned 1 exit status make: *** [repmgrd] Error 1 > > So above when you said your colleagues installed the packages for you, > was that on the host or the virtual machine? > All installed on the virtual machine I'm building this on. See the rpm list above. At my level of visibility it's just 'another server' - I just mentioned it was a virtual one rather than an actual bit of tin in case it were to somehow make a difference. Regards, 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."
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round4 - compilation issues on RHEL 7.2
On 05/16/2017 07:22 AM, Martin Goodson wrote: > On 16/05/2017 14:42, Adrian Klaver wrote: > >> On 05/16/2017 04:36 AM, Martin Goodson wrote: >>> On 15/05/2017 00:17, Martin Goodson wrote: >> That list would be: >> systemd >> libxslt-devel >> pam-devel >> openssl-devel >> readline-devel >> libmemcached-devel >> libicu-devel >> >> Did you also install?: >> >> krb5-devel >> libedit-devel > > Hi. > > This is what I see: > > $ rpm -qa | grep -i -e "systemd" -e "devel" > > systemd-sysv-219-19.el7_2.20.x86_64 > keyutils-libs-devel-1.5.8-3.el7.x86_64 > krb5-devel-1.13.2-12.el7_2.x86_64 > readline-devel-6.2-9.el7.x86_64 > libicu-devel-50.1.2-15.el7.x86_64 > libgpg-error-devel-1.12-3.el7.x86_64 > libxslt-devel-1.1.28-5.el7.x86_64 > systemd-libs-219-19.el7_2.20.x86_64 > libedit-devel-3.0-12.20121213cvs.el7.x86_64 > pam-devel-1.1.8-12.el7_1.1.x86_64 > pcre-devel-8.32-15.el7_2.1.x86_64 > libsepol-devel-2.1.9-3.el7.x86_64 > libverto-devel-0.2.5-4.el7.x86_64 > zlib-devel-1.2.7-15.el7.x86_64 > ncurses-devel-5.9-13.20130511.el7.x86_64 > libgcrypt-devel-1.5.3-12.el7_1.1.x86_64 > libxml2-devel-2.9.1-6.el7_2.3.x86_64 > libmemcached-devel-1.0.16-5.el7.x86_64 > systemd-219-19.el7_2.20.x86_64 > libcom_err-devel-1.42.9-7.el7.x86_64 > libselinux-devel-2.2.2-6.el7.x86_64 > openssl-devel-1.0.1e-51.el7_2.7.x86_64 > glibc-devel-2.17-106.el7_2.8.x86_64 > xz-devel-5.1.2-12alpha.el7.x86_64cyrus-sasl-devel-2.1.26-20.el7_2.x86_64 > > So it looks like I've got pretty much everything covered in that > respect? :) Looks complete to me. > > For that I get the following: > > libssl: /usr/lib64/libssl3.so /usr/lib64/libssl.so For completeness what does: ls -al /usr/lib64/libssl.so show? > > Ah, sorry. A bit got truncated. Here you go: > > /bin/ld: warning: libssl.so.1.0.0, needed by > /db_demo/app/postgres/9.6.2-3/lib/libpq.so, may conflict with libssl.so.10 > /lib64/libldap_r-2.4.so.2: undefined reference to `ber_sockbuf_io_udp' > collect2: error: ld returned 1 exit status > make: *** [repmgrd] Error 1 Not sure what is going on here. My usual reaction to a message like this when compiling is to install the --devel package for the library involved. In this case I believe it would be something like: openldap2-devel This is just an off the top of the head suggestion, no warranty:) > All installed on the virtual machine I'm building this on. See the rpm > list above. At my level of visibility it's just 'another server' - I > just mentioned it was a virtual one rather than an actual bit of tin in > case it were to somehow make a difference. Just making sure, thanks. > > Regards, > > Martin. -- Adrian Klaver adrian.klaver@aklaver.com
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round4 - compilation issues on RHEL 7.2
On 16/05/2017 15:58, Adrian Klaver wrote: > For completeness what does: > > ls -al /usr/lib64/libssl.so > > show? > (Trimming things down a bit to keep things a little bit more readable, now we've got the package dependencies issue sorted. Hopefully. Hope that's OK?) I can see the following: $ ls -l /usr/lib64/libssl.so lrwxrwxrwx 1 root root 16 May 15 16:57 /usr/lib64/libssl.so -> libssl.so.1.0.1e Just to expand on that a bit : $ ls -l /usr/lib64/libssl.* lrwxrwxrwx 1 root root 16 May 15 16:57 /usr/lib64/libssl.so -> libssl.so.1.0.1e lrwxrwxrwx 1 root root 16 May 11 12:41 /usr/lib64/libssl.so.10 -> libssl.so.1.0.1e -rwxr-xr-x 1 root root 440K Sep 22 2016 /usr/lib64/libssl.so.1.0.1e > >> >> Ah, sorry. A bit got truncated. Here you go: >> >> /bin/ld: warning: libssl.so.1.0.0, needed by >> /db_demo/app/postgres/9.6.2-3/lib/libpq.so, may conflict with >> libssl.so.10 >> /lib64/libldap_r-2.4.so.2: undefined reference to `ber_sockbuf_io_udp' >> collect2: error: ld returned 1 exit status >> make: *** [repmgrd] Error 1 > Not sure what is going on here. My usual reaction to a message like > this when compiling is to install the --devel package for the library > involved. In this case I believe it would be something like: > > openldap2-devel OK, thank you. I'll pass that along to our UNIX team and ask for that to be installed, see what we get ... > > This is just an off the top of the head suggestion, no warranty:) What? You mean I can't get my money back? :) Many thanks for all the help so far. It's been very, very, helpful. I'm sure it's nearly there ... Regards, 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."
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round4 - compilation issues on RHEL 7.2
On 16/05/2017 16:39, Martin Goodson wrote: > On 16/05/2017 15:58, Adrian Klaver wrote: >>> /bin/ld: warning: libssl.so.1.0.0, needed by >>> /db_demo/app/postgres/9.6.2-3/lib/libpq.so, may conflict with >>> libssl.so.10 >>> /lib64/libldap_r-2.4.so.2: undefined reference to `ber_sockbuf_io_udp' >>> collect2: error: ld returned 1 exit status >>> make: *** [repmgrd] Error 1 >> Not sure what is going on here. My usual reaction to a message like >> this when compiling is to install the --devel package for the library >> involved. In this case I believe it would be something like: >> >> openldap2-devel > > OK, thank you. I'll pass that along to our UNIX team and ask for that > to be installed, see what we get ... > >> >> This is just an off the top of the head suggestion, no warranty:) > What? You mean I can't get my money back? :) > > Many thanks for all the help so far. It's been very, very, helpful. > I'm sure it's nearly there ... Drat. Didn't work. openldap2-devel was installed OK, reran the make, got the same error :( Here's what's installed according to rpm -qa openldap-devel-2.4.40-9.e17_2.x86_64 openldap-2.4.40.9.e17_2.x86_64 Regards, 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."
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round 4 - compilation issues on RHEL 7.2
Martin Goodson <kaemaril@googlemail.com> writes: >>>> /bin/ld: warning: libssl.so.1.0.0, needed by >>>> /db_demo/app/postgres/9.6.2-3/lib/libpq.so, may conflict with >>>> libssl.so.10 >>>> /lib64/libldap_r-2.4.so.2: undefined reference to `ber_sockbuf_io_udp' >>>> collect2: error: ld returned 1 exit status > Drat. Didn't work. openldap2-devel was installed OK, reran the make, got > the same error :( What this looks like is a library versioning problem, maybe? On my system, ber_sockbuf_io_udp is exported by /lib64/liblber-2.4.so.2.10.3, and "ldd" on /lib64/libldap_r-2.4.so.2.10.3 shows that that library will be pulled in automatically. Maybe it's not happening like that on your box. It's a bit weird though because both those libraries are supplied by the same openldap package, so it's hard to see how they could be out of sync. Maybe you have another copy of one of those libraries floating around, and the wrong copy is getting pulled into your link? I'd suggest some investigation with "ldd" and "nm -D" to see what's what. regards, tom lane
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round4 - compilation issues on RHEL 7.2
On 05/16/2017 08:39 AM, Martin Goodson wrote: > On 16/05/2017 15:58, Adrian Klaver wrote: >> For completeness what does: >> >> ls -al /usr/lib64/libssl.so >> >> show? >> > (Trimming things down a bit to keep things a little bit more readable, > now we've got the package dependencies issue sorted. Hopefully. > > Hope that's OK?) See this recent thread for why this is OK and recommended: https://www.postgresql.org/message-id/CA%2BbJJbyutGGOKN-wiBDeLrNU-oB%3D_-81xEnfXRcY0wo%2BZRKvZw%40mail.gmail.com > > I can see the following: > > $ ls -l /usr/lib64/libssl.so > > lrwxrwxrwx 1 root root 16 May 15 16:57 /usr/lib64/libssl.so -> > libssl.so.1.0.1e > Seems okay to me. > > OK, thank you. I'll pass that along to our UNIX team and ask for that to > be installed, see what we get ... I see from subsequent post that this did not work. Per Tom's suggestion try ldd /db_demo/app/postgres/9.6.2-3/lib/libldap_r-2.4.so.2 > > Regards, > > Martin. -- Adrian Klaver adrian.klaver@aklaver.com
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round4 - compilation issues on RHEL 7.2
On 16/05/2017 18:46, Adrian Klaver wrote: > Per Tom's suggestion try > > ldd /db_demo/app/postgres/9.6.2-3/lib/libldap_r-2.4.so.2 Hello. Apologies for the delay in replying - medical appointment this morning :) Anyway, executed that command as suggested and this is the output I got. pginst@testdemo00:/db_demo/app/postgres/9.6.2-3/lib$ ls -lrt *ldap* -rwxr-xr-x 1 pginst gpginst 354K Mar 13 11:25 libldap-2.4.so.2 -rwxr-xr-x 1 pginst gpginst 383K Mar 13 11:25 libldap_r-2.4.so.2 pginst@testdemo00:/db_demo/app/postgres/9.6.2-3/lib$ ldd libldap-2.4.so.2 linux-vdso.so.1 => (0x00007fff47db7000) liblber-2.4.so.2 => /db_demo/app/postgres/9.6.2-3/lib/./liblber-2.4.so.2 (0x00007f88934f0000) libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f88932cc000) libsasl2.so.3 => /db_demo/app/postgres/9.6.2-3/lib/./libsasl2.so.3 (0x00007f88930aa000) libssl.so.1.0.0 => /db_demo/app/postgres/9.6.2-3/lib/./libssl.so.1.0.0 (0x00007f8892e3b000) libcrypto.so.1.0.0 => /db_demo/app/postgres/9.6.2-3/lib/./libcrypto.so.1.0.0 (0x00007f8892a04000) libc.so.6 => /lib64/libc.so.6 (0x00007f8892642000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f889243e000) /lib64/ld-linux-x86-64.so.2 (0x00007f8893959000) pginst@testdemo00:/db_demo/app/postgres/9.6.2-3/lib$ ldd libldap_r-2.4.so.2 linux-vdso.so.1 => (0x00007ffcd12e4000) liblber-2.4.so.2 => /db_demo/app/postgres/9.6.2-3/lib/./liblber-2.4.so.2 (0x00007f20ff9a1000) libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f20ff77d000) libsasl2.so.3 => /db_demo/app/postgres/9.6.2-3/lib/./libsasl2.so.3 (0x00007f20ff55b000) libssl.so.1.0.0 => /db_demo/app/postgres/9.6.2-3/lib/./libssl.so.1.0.0 (0x00007f20ff2ec000) libcrypto.so.1.0.0 => /db_demo/app/postgres/9.6.2-3/lib/./libcrypto.so.1.0.0 (0x00007f20feeb5000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f20fec99000) libc.so.6 => /lib64/libc.so.6 (0x00007f20fe8d7000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f20fe6d2000) /lib64/ld-linux-x86-64.so.2 (0x00007f20ffe14000) (I noticed there was a second file in there with roughly the same name ... ish. Just in case it might be relevent, I did that one too :) ) Hope that info's helpful! Regards, Martin.
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round4 - compilation issues on RHEL 7.2
On 05/17/2017 07:26 AM, Martin Goodson wrote: > On 16/05/2017 18:46, Adrian Klaver wrote: >> Per Tom's suggestion try >> >> ldd /db_demo/app/postgres/9.6.2-3/lib/libldap_r-2.4.so.2 > > Hello. Apologies for the delay in replying - medical appointment this > morning :) Anyway, executed that command as suggested and this is the > output I got. > > pginst@testdemo00:/db_demo/app/postgres/9.6.2-3/lib$ ls -lrt *ldap* > > -rwxr-xr-x 1 pginst gpginst 354K Mar 13 11:25 libldap-2.4.so.2 > -rwxr-xr-x 1 pginst gpginst 383K Mar 13 11:25 libldap_r-2.4.so.2 > > > pginst@testdemo00:/db_demo/app/postgres/9.6.2-3/lib$ ldd libldap_r-2.4.so.2 > linux-vdso.so.1 => (0x00007ffcd12e4000) > liblber-2.4.so.2 => > /db_demo/app/postgres/9.6.2-3/lib/./liblber-2.4.so.2 (0x00007f20ff9a1000) > libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f20ff77d000) > libsasl2.so.3 => > /db_demo/app/postgres/9.6.2-3/lib/./libsasl2.so.3 (0x00007f20ff55b000) > libssl.so.1.0.0 => > /db_demo/app/postgres/9.6.2-3/lib/./libssl.so.1.0.0 (0x00007f20ff2ec000) > libcrypto.so.1.0.0 => > /db_demo/app/postgres/9.6.2-3/lib/./libcrypto.so.1.0.0 (0x00007f20feeb5000) > libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f20fec99000) > libc.so.6 => /lib64/libc.so.6 (0x00007f20fe8d7000) > libdl.so.2 => /lib64/libdl.so.2 (0x00007f20fe6d2000) > /lib64/ld-linux-x86-64.so.2 (0x00007f20ffe14000) So the EDB install is using its own library for liblber Per Tom's suggestion: nm -D /db_demo/app/postgres/9.6.2-3/lib/liblber-2.4.so.2 What has me confused is this: /lib64/libldap_r-2.4.so.2: undefined reference to `ber_sockbuf_io_udp' It is referring to a library path outside the EDB install. Not sure why it is picking that up? To get a handle on this: whereis libldap_r and then ls -al whatever files are found above ldd whatever files are found above > > (I noticed there was a second file in there with roughly the same name > ... ish. Just in case it might be relevent, I did that one too :) ) > > Hope that info's helpful! > > Regards, > > Martin. > -- Adrian Klaver adrian.klaver@aklaver.com
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round4 - compilation issues on RHEL 7.2
On 05/17/2017 07:26 AM, Martin Goodson wrote: > On 16/05/2017 18:46, Adrian Klaver wrote: >> Per Tom's suggestion try >> >> ldd /db_demo/app/postgres/9.6.2-3/lib/libldap_r-2.4.so.2 > > Hello. Apologies for the delay in replying - medical appointment this > morning :) Anyway, executed that command as suggested and this is the > output I got. > > (I noticed there was a second file in there with roughly the same name > ... ish. Just in case it might be relevent, I did that one too :) ) Spun up a RH 7.3 instance and tried the compile and got the same error. It then rang a bell and I went back to this: http://raghavt.blogspot.com/2015/01/configuring-automatic-failover-using.html "/lib64/libldap_r-2.4.so.2: undefined reference to `ber_sockbuf_io_udp' collect2: ld returned 1 exit status make: *** [repmgrd] Error 1 To fix, find the checking library in /lib64/libldap_r-2.4.so.2. [root@localhost repmgr-2.0]# cd /lib64/ [root@localhost lib64]# ls -l libldap* lrwxrwxrwx. 1 root root 20 Dec 8 09:23 libldap-2.4.so.2 -> libldap-2.4.so.2.5.6 -rwxr-xr-x. 1 root root 317200 Apr 29 2013 libldap-2.4.so.2.5.6 lrwxrwxrwx. 1 root root 22 Dec 8 09:23 libldap_r-2.4.so.2 -> libldap_r-2.4.so.2.5.6 -rwxr-xr-x. 1 root root 335264 Apr 29 2013 libldap_r-2.4.so.2.5.6 Ok, there are two copies, retain one and unlink other. [root@localhost lib64]# unlink libldap_r-2.4.so.2 " I did the above and success: PATH=/opt/PostgreSQL/9.6/bin:$PATH make USE_PGXS=1 clean all ... /usr/bin/ld: warning: libssl.so.1.0.0, needed by /opt/PostgreSQL/9.6/lib/libpq.so, may conflict with libssl.so.10 make -C sql make[1]: Entering directory `/home/ec2-user/repmgr-3.3.1/sql' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/home/ec2-user/repmgr-3.3.1/sql' I am going to agree with John's comment upstream that unlinking a file seems to be dubious. You might want to try linking the file back up again after you have installed repmgr and see if it causes any issues. > > Hope that info's helpful! > > Regards, > > Martin. > -- Adrian Klaver adrian.klaver@aklaver.com
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round4 - compilation issues on RHEL 7.2
On 17/05/2017 16:15, Adrian Klaver wrote: > On 05/17/2017 07:26 AM, Martin Goodson wrote: >> On 16/05/2017 18:46, Adrian Klaver wrote: >>> Per Tom's suggestion try >>> >>> ldd /db_demo/app/postgres/9.6.2-3/lib/libldap_r-2.4.so.2 >> >> Hello. Apologies for the delay in replying - medical appointment this >> morning :) Anyway, executed that command as suggested and this is the >> output I got. >> >> pginst@testdemo00:/db_demo/app/postgres/9.6.2-3/lib$ ls -lrt *ldap* >> >> -rwxr-xr-x 1 pginst gpginst 354K Mar 13 11:25 libldap-2.4.so.2 >> -rwxr-xr-x 1 pginst gpginst 383K Mar 13 11:25 libldap_r-2.4.so.2 >> > >> >> pginst@testdemo00:/db_demo/app/postgres/9.6.2-3/lib$ ldd >> libldap_r-2.4.so.2 >> linux-vdso.so.1 => (0x00007ffcd12e4000) >> liblber-2.4.so.2 => >> /db_demo/app/postgres/9.6.2-3/lib/./liblber-2.4.so.2 >> (0x00007f20ff9a1000) >> libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f20ff77d000) >> libsasl2.so.3 => >> /db_demo/app/postgres/9.6.2-3/lib/./libsasl2.so.3 (0x00007f20ff55b000) >> libssl.so.1.0.0 => >> /db_demo/app/postgres/9.6.2-3/lib/./libssl.so.1.0.0 (0x00007f20ff2ec000) >> libcrypto.so.1.0.0 => >> /db_demo/app/postgres/9.6.2-3/lib/./libcrypto.so.1.0.0 >> (0x00007f20feeb5000) >> libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f20fec99000) >> libc.so.6 => /lib64/libc.so.6 (0x00007f20fe8d7000) >> libdl.so.2 => /lib64/libdl.so.2 (0x00007f20fe6d2000) >> /lib64/ld-linux-x86-64.so.2 (0x00007f20ffe14000) > > So the EDB install is using its own library for liblber > > Per Tom's suggestion: > > nm -D /db_demo/app/postgres/9.6.2-3/lib/liblber-2.4.so.2 > Output from that is: $ nm -D /db_demo/app/postgres/9.6.2-3/lib/liblber-2.4.so.2 U __assert_fail 0000000000007dd9 T ber_alloc 0000000000007d48 T ber_alloc_t 00000000000090b2 T ber_bprint 000000000000a76c T ber_bvarray_add 000000000000a611 T ber_bvarray_add_x 000000000000a4df T ber_bvarray_dup_x 000000000000a4c0 T ber_bvarray_free 000000000000a441 T ber_bvarray_free_x 0000000000009ea6 T ber_bvdup 0000000000009d1f T ber_bvecadd 0000000000009bdc T ber_bvecadd_x 0000000000009bbd T ber_bvecfree 0000000000009b3d T ber_bvecfree_x 0000000000009b1e T ber_bvfree 0000000000009acb T ber_bvfree_x 000000000000a417 T ber_bvreplace 000000000000a32a T ber_bvreplace_x 00000000000034ac T ber_decode_oid 000000000000937a T ber_dump 0000000000007df9 T ber_dup 0000000000009e7c T ber_dupbv 0000000000009d49 T ber_dupbv_x 0000000000005e06 T ber_encode_oid 0000000000008cb0 T ber_errno_addr 0000000000008cda T ber_error_print 0000000000004621 T ber_first_element 0000000000008244 T ber_flatten 00000000000080e1 T ber_flatten2 0000000000007b01 T ber_flush 0000000000007b33 T ber_flush2 0000000000007abd T ber_free 0000000000007a3a T ber_free_buf 0000000000004455 T ber_get_bitstringa 00000000000045fc T ber_get_boolean 0000000000003b4b T ber_get_enum 0000000000003a65 T ber_get_int 00000000000083a0 T ber_get_next 00000000000045c1 T ber_get_null 000000000000a798 T ber_get_option 00000000000042ae T ber_get_stringa 0000000000004374 T ber_get_stringal 0000000000004311 T ber_get_stringa_null 0000000000003b70 T ber_get_stringb 000000000000404b T ber_get_stringbv 0000000000004178 T ber_get_stringbv_null 0000000000003800 T ber_get_tag 000000000000801e T ber_init 0000000000007f06 T ber_init2 0000000000007ff9 T ber_init_w_nullc 000000000020fb28 B ber_int_errno_fn 000000000020fb18 B ber_int_log_proc 000000000020fb40 B ber_int_memory_fns 000000000020fb60 B ber_int_options 000000000000b8a6 T ber_int_sb_close 000000000000b93c T ber_int_sb_destroy 000000000000b7ea T ber_int_sb_init 000000000000b9f9 T ber_int_sb_read 000000000000bb03 T ber_int_sb_write 0000000000008c07 T ber_len 0000000000009049 T ber_log_bprint 00000000000092e8 T ber_log_dump 00000000000094c5 T ber_log_sos_dump 000000000000a15a T ber_mem2bv 000000000000a03c T ber_mem2bv_x 00000000000098ed T ber_memalloc 000000000000986e T ber_memalloc_x 00000000000099a8 T ber_memcalloc 000000000000990c T ber_memcalloc_x 00000000000097c0 T ber_memfree 0000000000009730 T ber_memfree_x 0000000000009aa1 T ber_memrealloc 00000000000099d2 T ber_memrealloc_x 000000000000984f T ber_memvfree 00000000000097df T ber_memvfree_x 00000000000046cb T ber_next_element 0000000000003835 T ber_peek_element 00000000000039d3 T ber_peek_tag 0000000000006aa0 T ber_printf 0000000000008c29 T ber_ptrlen 000000000000636a T ber_put_berval 0000000000006444 T ber_put_bitstring 00000000000065d1 T ber_put_boolean 0000000000006218 T ber_put_enum 0000000000006251 T ber_put_int 0000000000006558 T ber_put_null 000000000000628a T ber_put_ostring 0000000000006a6c T ber_put_seq 0000000000006a86 T ber_put_set 00000000000063dc T ber_put_string 000000000020fb20 B ber_pvt_err_file 0000000000008da3 T ber_pvt_log_output 000000000020f9e0 D ber_pvt_log_print 0000000000008f14 T ber_pvt_log_printf 000000000020fba0 B ber_pvt_opt_on 000000000000b41c T ber_pvt_sb_buf_destroy 000000000000b3e3 T ber_pvt_sb_buf_init 000000000000b52c T ber_pvt_sb_copy_out 000000000000b636 T ber_pvt_sb_do_write 000000000000b479 T ber_pvt_sb_grow_buffer 000000000000b796 T ber_pvt_socket_set_nonblock 0000000000007642 T ber_read 0000000000007897 T ber_realloc 0000000000008c8d T ber_remaining 00000000000082f9 T ber_reset 0000000000008c4b T ber_rewind 0000000000004783 T ber_scanf 000000000000aa63 T ber_set_option 000000000000757c T ber_skip_data 000000000000396f T ber_skip_element 0000000000003a0b T ber_skip_tag 000000000000b162 T ber_sockbuf_add_io 000000000000ae08 T ber_sockbuf_alloc 000000000000aec7 T ber_sockbuf_ctrl 000000000000ae43 T ber_sockbuf_free 000000000020fac0 D ber_sockbuf_io_debug 000000000020fa80 D ber_sockbuf_io_fd 000000000020fa40 D ber_sockbuf_io_readahead 000000000020fa00 D ber_sockbuf_io_tcp 000000000000b2c4 T ber_sockbuf_remove_io 00000000000094da T ber_sos_dump 0000000000008bf5 T ber_start 0000000000006822 T ber_start_seq 0000000000006856 T ber_start_set 0000000000009ffd T ber_str2bv 0000000000009eca T ber_str2bv_x 000000000000a211 T ber_strdup 000000000000a199 T ber_strdup_x 000000000000a300 T ber_strndup 000000000000a26e T ber_strndup_x 000000000000a230 T ber_strnlen 0000000000007737 T ber_write 000000000020faf0 A __bss_start U calloc U close U __ctype_b_loc w __cxa_finalize 0000000000007de9 T der_alloc 000000000020faf0 A _edata 000000000020fba8 A _end U __errno_location U fcntl U fflush 000000000000c9a8 T _fini U fputs U free w __gmon_start__ 0000000000002d80 T _init w _Jv_RegisterClasses 0000000000009518 T lutil_debug 00000000000094e4 T lutil_debug_file U malloc U memchr U memcpy U memmove U memset U read U realloc U shutdown U sprintf U stderr U strcpy U strlen U strtoul U time U vsnprintf U write U __xpg_strerror_r > > What has me confused is this: > > /lib64/libldap_r-2.4.so.2: undefined reference to `ber_sockbuf_io_udp' > > It is referring to a library path outside the EDB install. > > Not sure why it is picking that up? > > To get a handle on this: > > whereis libldap_r Output was: $ whereis libldap_r libldap_r: /usr/lib64/libldap_r.so > > and then > > ls -al whatever files are found above > > ldd whatever files are found above The output of those two commands was: $ ls -al /usr/lib64/libldap_r.so lrwxrwxrwx 1 root root 23 May 16 17:06 /usr/lib64/libldap_r.so -> libldap_r-2.4.so.2.10.3 $ ldd /usr/lib64/libldap_r.so linux-vdso.so.1 => (0x00007ffd7674e000) liblber-2.4.so.2 (0x00007fb86c7c3000) libresolv.so.2 => /lib64/libresolv.so.2 (0x00007fb86c59f000) libsasl2.so.3 (0x00007fb86c37d000) libssl3.so => /lib64/libssl3.so (0x00007fb86c13a000) libsmime3.so => /lib64/libsmime3.so (0x00007fb86bf12000) libnss3.so => /lib64/libnss3.so (0x00007fb86bbec000) libnssutil3.so => /lib64/libnssutil3.so (0x00007fb86b9c0000) libplds4.so => /lib64/libplds4.so (0x00007fb86b7bb000) libplc4.so => /lib64/libplc4.so (0x00007fb86b5b6000) libnspr4.so => /lib64/libnspr4.so (0x00007fb86b378000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fb86b15b000) libdl.so.2 => /lib64/libdl.so.2 (0x00007fb86af57000) libc.so.6 => /lib64/libc.so.6 (0x00007fb86ab95000) libz.so.1 (0x00007fb86a978000) librt.so.1 => /lib64/librt.so.1 (0x00007fb86a770000) /lib64/ld-linux-x86-64.so.2 (0x00007fb86cc30000) Hope that's helpful. Regards, 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."
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round4 - compilation issues on RHEL 7.2
Spun up a RH 7.3 instance and tried the compile and got the same error.Good to know it's reproducible, and not just me :)
To fix, find the checking library in /lib64/libldap_r-2.4.so.2.I'll have a word with our UNIX team about unlinking this (and relinking afterward) tomorrow (they're gone for the night ... :) ) and report back, but it certainly is looking promising again! :)
[root@localhost repmgr-2.0]# cd /lib64/
[root@localhost lib64]# ls -l libldap*
lrwxrwxrwx. 1 root root 20 Dec 8 09:23 libldap-2.4.so.2 -> libldap-2.4.so.2.5.6
-rwxr-xr-x. 1 root root 317200 Apr 29 2013 libldap-2.4.so.2.5.6
lrwxrwxrwx. 1 root root 22 Dec 8 09:23 libldap_r-2.4.so.2 -> libldap_r-2.4.so.2.5.6
-rwxr-xr-x. 1 root root 335264 Apr 29 2013 libldap_r-2.4.so.2.5.6
Ok, there are two copies, retain one and unlink other.
[root@localhost lib64]# unlink libldap_r-2.4.so.2
"
I did the above and success:
PATH=/opt/PostgreSQL/9.6/bin:$PATH make USE_PGXS=1 clean all
...
I am going to agree with John's comment upstream that unlinking a file seems to be dubious. You might want to try linking the file back up again after you have installed repmgr and see if it causes any issues.
Here's what I currently see in /lib64 for libldap files ...
$ ls -l /lib64/libldap*
lrwxrwxrwx 1 root root 21 May 11 12:42 /lib64/libldap-2.4.so.2 -> libldap-2.4.so.2.10.3
-rwxr-xr-x 1 root root 337K Feb 23 2016 /lib64/libldap-2.4.so.2.10.3
lrwxrwxrwx 1 root root 23 May 11 12:42 /lib64/libldap_r-2.4.so.2 -> libldap_r-2.4.so.2.10.3
-rwxr-xr-x 1 root root 365K Feb 23 2016 /lib64/libldap_r-2.4.so.2.10.3
lrwxrwxrwx 1 root root 23 May 16 17:06 /lib64/libldap_r.so -> libldap_r-2.4.so.2.10.3
lrwxrwxrwx 1 root root 21 May 16 17:06 /lib64/libldap.so -> libldap-2.4.so.2.10.3
Regards,
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."
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round4 - compilation issues on RHEL 7.2
On 05/17/2017 12:01 PM, Martin Goodson wrote: > On 17/05/2017 17:19, Adrian Klaver wrote: >> Spun up a RH 7.3 instance and tried the compile and got the same error. > Good to know it's reproducible, and not just me :) > > I'll have a word with our UNIX team about unlinking this (and relinking > afterward) tomorrow (they're gone for the night ... :) ) and report > back, but it certainly is looking promising again! :) I thought you where working on VM you had access/rights to. That is not the case? > > Here's what I currently see in /lib64 for libldap files ... > > $ ls -l /lib64/libldap* > > lrwxrwxrwx 1 root root 21 May 11 12:42 /lib64/libldap-2.4.so.2 -> > libldap-2.4.so.2.10.3 > -rwxr-xr-x 1 root root 337K Feb 23 2016 /lib64/libldap-2.4.so.2.10.3 > lrwxrwxrwx 1 root root 23 May 11 12:42 /lib64/libldap_r-2.4.so.2 -> > libldap_r-2.4.so.2.10.3 > -rwxr-xr-x 1 root root 365K Feb 23 2016 /lib64/libldap_r-2.4.so.2.10.3 > lrwxrwxrwx 1 root root 23 May 16 17:06 /lib64/libldap_r.so -> > libldap_r-2.4.so.2.10.3 > lrwxrwxrwx 1 root root 21 May 16 17:06 /lib64/libldap.so -> > libldap-2.4.so.2.10.3 Whoever does it needs to unlink: /lib64/libldap_r-2.4.so.2 > > Regards, > > -- > 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." > -- Adrian Klaver adrian.klaver@aklaver.com
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round4 - compilation issues on RHEL 7.2
On 17/05/2017 20:11, Adrian Klaver wrote: > I thought you where working on VM you had access/rights to. > That is not the case? I have sudo access on the redhat box we're working on so technically I could do this, yup. But whilst our Unix team are happy for us to do whatever the heck we like within our own domain (so to speak - all the databases, tools we use, etc), they prefer to retain control over 'top level' system-admin stuff like disks, the contents of /lib, etc. I like to keep our sysadmins happy, so I'm going to leave /lib to them :) > Whoever does it needs to unlink: > > /lib64/libldap_r-2.4.so.2 Got it. We'll see what happens tomorrow. Thank you for all the help so far, it's been *invaluable*. Hopefully tomorrow I'll have some good news to report! btw, if this is a reproducible thing is it worth raising with enterprisedb or 2nd Quadrant? Is this a 'bug' of some kind, or just a really weird edge case? :) Regards, 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."
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round4 - compilation issues on RHEL 7.2
On 05/17/2017 01:28 PM, Martin Goodson wrote: > On 17/05/2017 20:11, Adrian Klaver wrote: > >> I thought you where working on VM you had access/rights to. > >> That is not the case? > > I have sudo access on the redhat box we're working on so technically I > could do this, yup. But whilst our Unix team are happy for us to do > whatever the heck we like within our own domain (so to speak - all the > databases, tools we use, etc), they prefer to retain control over 'top > level' system-admin stuff like disks, the contents of /lib, etc. > > I like to keep our sysadmins happy, so I'm going to leave /lib to them :) Got it. > >> Whoever does it needs to unlink: >> >> /lib64/libldap_r-2.4.so.2 > > Got it. We'll see what happens tomorrow. Thank you for all the help so > far, it's been *invaluable*. Hopefully tomorrow I'll have some good news > to report! > > btw, if this is a reproducible thing is it worth raising with > enterprisedb or 2nd Quadrant? Is this a 'bug' of some kind, or just a > really weird edge case? :) I could build repmgr against Postgres source and on Ubuntu install of EDB Postgres. The issue seems to be a combination of RH and EDB Postgres installation. To me it looks like ld is finding /lib64/libldap_r-2.4.so.2 library before the /opt/PostgreSQL/9.6/lib/ one. Removing the link in /lib64/ seems to force it to use the EDB installed library. I do not know enough about ld to figure out how to force it to only look at the EDB installed library without removing the link. > > Regards, > > Martin. -- Adrian Klaver adrian.klaver@aklaver.com
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round 4 - compilation issues on RHEL 7.2
Adrian Klaver <adrian.klaver@aklaver.com> writes: > I could build repmgr against Postgres source and on Ubuntu install of > EDB Postgres. The issue seems to be a combination of RH and EDB Postgres > installation. To me it looks like ld is finding > /lib64/libldap_r-2.4.so.2 library before the /opt/PostgreSQL/9.6/lib/ > one. IIRC this is determined ultimately by /etc/ld.so.conf, but there's a layer of caching that might be giving trouble. See "man 8 ld.so" and also "man 8 ldconfig". Looking at the output of "ldconfig -p" might be informative. regards, tom lane
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round4 - compilation issues on RHEL 7.2
On 05/17/2017 02:03 PM, Tom Lane wrote: > Adrian Klaver <adrian.klaver@aklaver.com> writes: >> I could build repmgr against Postgres source and on Ubuntu install of >> EDB Postgres. The issue seems to be a combination of RH and EDB Postgres >> installation. To me it looks like ld is finding >> /lib64/libldap_r-2.4.so.2 library before the /opt/PostgreSQL/9.6/lib/ >> one. > > IIRC this is determined ultimately by /etc/ld.so.conf, but there's > a layer of caching that might be giving trouble. See "man 8 ld.so" > and also "man 8 ldconfig". Looking at the output of "ldconfig -p" > might be informative. Learned a lot, though not the answer. I do this: PATH=/opt/PostgreSQL/9.6/bin:$PATH make USE_PGXS=1 clean all I get: /usr/lib64/libldap_r-2.4.so.2: undefined reference to `ber_sockbuf_io_udp' Looking at files: ldd /usr/lib64/libldap_r-2.4.so.2 linux-vdso.so.1 => (0x00007ffce3553000) liblber-2.4.so.2 => /lib64/liblber-2.4.so.2 (0x00007f279cd52000) libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f279cb38000) libsasl2.so.3 => /lib64/libsasl2.so.3 (0x00007f279c91a000) libssl3.so => /lib64/libssl3.so (0x00007f279c6d7000) libsmime3.so => /lib64/libsmime3.so (0x00007f279c4b0000) libnss3.so => /lib64/libnss3.so (0x00007f279c189000) libnssutil3.so => /lib64/libnssutil3.so (0x00007f279bf5d000) libplds4.so => /lib64/libplds4.so (0x00007f279bd59000) libplc4.so => /lib64/libplc4.so (0x00007f279bb53000) libnspr4.so => /lib64/libnspr4.so (0x00007f279b915000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f279b6f9000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f279b4f4000) libc.so.6 => /lib64/libc.so.6 (0x00007f279b133000) libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f279aefc000) libz.so.1 => /lib64/libz.so.1 (0x00007f279ace5000) librt.so.1 => /lib64/librt.so.1 (0x00007f279aadd000) /lib64/ld-linux-x86-64.so.2 (0x00007f279d1c5000) libfreebl3.so => /lib64/libfreebl3.so (0x00007f279a8d9000) nm -D /usr/lib64/libldap_r-2.4.so.2 | grep ber_sockbuf_io_udp U ber_sockbuf_io_udp nm -D /usr/lib64/liblber-2.4.so.2 | grep ber_sockbuf_io_udp 000000000020e020 D ber_sockbuf_io_udp This is repeated for libldap_r-2.4.so.2 and liblber-2.4.so.2 in /lib64/ ldd /opt/PostgreSQL/9.6/lib/libldap_r-2.4.so.2 linux-vdso.so.1 => (0x00007ffcf5bfc000) liblber-2.4.so.2 => /opt/PostgreSQL/9.6/lib/liblber-2.4.so.2 (0x00007f60f0e86000) libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f60f0c64000) libsasl2.so.3 => /opt/PostgreSQL/9.6/lib/libsasl2.so.3 (0x00007f60f0a42000) libssl.so.1.0.0 => /opt/PostgreSQL/9.6/lib/libssl.so.1.0.0 (0x00007f60f07d3000) libcrypto.so.1.0.0 => /opt/PostgreSQL/9.6/lib/libcrypto.so.1.0.0 (0x00007f60f039c000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f60f0180000) libc.so.6 => /lib64/libc.so.6 (0x00007f60efdbf000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f60efbba000) /lib64/ld-linux-x86-64.so.2 (0x00007f60f12f9000) nm -D /opt/PostgreSQL/9.6/lib/libldap_r-2.4.so.2 | grep ber_sockbuf_io_udp nm -D /opt/PostgreSQL/9.6/lib/liblber-2.4.so.2 | grep ber_sockbuf_io_udp If I do: export LD_LIBRARY_PATH=/opt/PostgreSQL/9.6/lib PATH=/opt/PostgreSQL/9.6/bin:$PATH make USE_PGXS=1 clean all I get the same error: /usr/lib64/libldap_r-2.4.so.2: undefined reference to `ber_sockbuf_io_udp' ldd /usr/lib64/libldap_r-2.4.so.2 linux-vdso.so.1 => (0x00007ffe49f72000) liblber-2.4.so.2 => /opt/PostgreSQL/9.6/lib/liblber-2.4.so.2 (0x00007f8fc35e0000) libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f8fc33be000) libsasl2.so.3 => /opt/PostgreSQL/9.6/lib/libsasl2.so.3 (0x00007f8fc319c000) libssl3.so => /lib64/libssl3.so (0x00007f8fc2f59000) libsmime3.so => /lib64/libsmime3.so (0x00007f8fc2d31000) libnss3.so => /lib64/libnss3.so (0x00007f8fc2a0b000) libnssutil3.so => /lib64/libnssutil3.so (0x00007f8fc27df000) libplds4.so => /lib64/libplds4.so (0x00007f8fc25da000) libplc4.so => /lib64/libplc4.so (0x00007f8fc23d5000) libnspr4.so => /lib64/libnspr4.so (0x00007f8fc2197000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f8fc1f7a000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f8fc1d76000) libc.so.6 => /lib64/libc.so.6 (0x00007f8fc19b5000) libz.so.1 => /opt/PostgreSQL/9.6/lib/libz.so.1 (0x00007f8fc1798000) librt.so.1 => /lib64/librt.so.1 (0x00007f8fc1590000) /lib64/ld-linux-x86-64.so.2 (0x00007f8fc3a4d000) nm -D /usr/lib64/libldap_r-2.4.so.2 | grep ber_sockbuf_io_udp U ber_sockbuf_io_udp nm -D /usr/lib64/liblber-2.4.so.2 | grep ber_sockbuf_io_udp 000000000020e020 D ber_sockbuf_io_udp /usr/lib64/libldap_r-2.4.so.2 is a symlink: ls -al /usr/lib64/libldap_r-2.4.so.2 lrwxrwxrwx. 1 root root 23 May 18 10:04 /usr/lib64/libldap_r-2.4.so.2 -> libldap_r-2.4.so.2.10.3 If I remove that link then I can compile. Have no idea why. > > regards, tom lane > -- Adrian Klaver adrian.klaver@aklaver.com
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round4 - compilation issues on RHEL 7.2
On 18/05/2017 15:20, Adrian Klaver wrote: > > If I remove that link then I can compile. Have no idea why. > Hi! OP here, and here's the feedback on what I'm getting after unlinking as suggested yesterday: I tried removing/unlinking as suggested and, just like Adrian, it worked OK for me! :) The advice was: Whoever does it needs to unlink: /lib64/libldap_r-2.4.so.2 So that's what I did. Output of ls -l command: lrwxrwxrwx 1 root root 23 May 11 12:42 /lib64/libldap_r-2.4.so.2 -> libldap_r-2.4.so.2.10.3 Unlink the file: $ sudo unlink /lib64/libldap_r-2.4.so.2 Verify gone: $ ls -l /lib64/libldap_r-2.4.so.2 ls: cannot access /lib64/libldap_r-2.4.so.2: No such file or directory Attempt build again: $ PATH=/db_demo/app/postgres/9.6.2-3/bin:$PATH make USE_PGXS=1 clean all No errors this time! It worked, except for the following warning we've seen before: /bin/ld: warning: libssl.so.1.0.0, needed by /db_demo/app/postgres/9.6.2-3/lib/libpq.so, may conflict with libssl.so.10 Moving onto the install (didn't need sudo, as the userid I'm using is the owner of the PostgreSQL software): $ PATH=/db_demo/app/postgres/9.6.2-3/bin:$PATH make USE_PGXS=1 install make -C sql make[1]: Entering directory `/home/pginst/repmgr-3.3.1/sql' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/home/pginst/repmgr-3.3.1/sql' /bin/mkdir -p '/db_demo/app/postgres/9.6.2-3/share/postgresql/contrib' mkdir -p '/db_demo/app/postgres/9.6.2-3/bin' /usr/bin/install -c repmgrd '/db_demo/app/postgres/9.6.2-3/bin/' /usr/bin/install -c repmgr '/db_demo/app/postgres/9.6.2-3/bin/' make -C sql install make[1]: Entering directory `/home/pginst/repmgr-3.3.1/sql' /bin/mkdir -p '/db_demo/app/postgres/9.6.2-3/lib/postgresql' /bin/mkdir -p '/db_demo/app/postgres/9.6.2-3/share/postgresql/contrib' /usr/bin/install -c -m 755 repmgr_funcs.so '/db_demo/app/postgres/9.6.2-3/lib/postgresql/repmgr_funcs.so' /usr/bin/install -c -m 644 .//uninstall_repmgr_funcs.sql repmgr_funcs.sql '/db_demo/app/postgres/9.6.2-3/share/postgresql/contrib/' make[1]: Leaving directory `/home/pginst/repmgr-3.3.1/sql' /usr/bin/install -c -m 644 .//repmgr.sql .//uninstall_repmgr.sql '/db_demo/app/postgres/9.6.2-3/share/postgresql/contrib/' Seems to have worked OK! I went looking within the postgresql tree to see if it had built anything: $ find . -name *repmgr* -print ./lib/postgresql/repmgr_funcs.so ./share/contrib/repmgr.sql ./share/contrib/repmgr_funcs.sql ./share/contrib/uninstall_repmgr_func.sql ./share/contrib/uninstall_repmgr.sql ./share/contrib/uninstall_repmgr_funcs.sql ./share/postgresql/contrib/repmgr.sql ./share/postgresql/contrib/repmgr_funcs.sql ./share/postgresql/contrib/uninstall_repmgr.sql ./share/postgresql/contrib/uninstall_repmgr_funcs.sql ./bin/repmgr ./bin/repmgrd Success! I then relinked the library: $ sudo ln -s /lib64/libldap_r-2.4.so.2.10.3 /lib64/libldap_r-2.4.so.2 $ ls -l the file to see if it's back: lrwxrwxrwx 1 root root 30 May 18 15:51 /lib64/libldap_r-2.4.so.2 -> /lib64/libldap_r-2.4.so.2.10.3 Try executing the command from the database owner id: $ repmgr -V repmgr 3.3.1 (PostgreSQL 9.6.2) Didn't barf, so hopefully relinking the file makes no difference to the already compiled repmgr :) Bit of a mystery still on that linking/unlinking (if we can find a way to avoid doing that, that would be great) but success! Now I get to start playing with it properly - but I'm relatively confident that should be OK, I was getting good results on my little ubuntu box at home ... Of course, I said the same think about compiling it :) Huge thanks to EVERYONE who helped on this! If anyone is going to be at PG Day UK, I'll buy you a drink :) Regards, 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."
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round4 - compilation issues on RHEL 7.2
On 05/18/2017 08:49 AM, Martin Goodson wrote: > On 18/05/2017 15:20, Adrian Klaver wrote: >> >> If I remove that link then I can compile. Have no idea why. >> > > Hi! OP here, and here's the feedback on what I'm getting after unlinking > as suggested yesterday: > > I tried removing/unlinking as suggested and, just like Adrian, it worked > OK for me! :) > > The advice was: > > Whoever does it needs to unlink: > > /lib64/libldap_r-2.4.so.2 > > > So that's what I did. > Bit of a mystery still on that linking/unlinking (if we can find a way > to avoid doing that, that would be great) but success! > > Now I get to start playing with it properly - but I'm relatively > confident that should be OK, I was getting good results on my little > ubuntu box at home ... > > Of course, I said the same think about compiling it :) > > Huge thanks to EVERYONE who helped on this! If anyone is going to be at > PG Day UK, I'll buy you a drink :) Glad you got it working. Something you might want to point out to the admins, if you where using the PGDG RPM repos you could have gotten to this point by doing something like this: sudo yum install repmgr Just a thought. > > Regards, > > Martin. -- Adrian Klaver adrian.klaver@aklaver.com