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@xxxxxxxxxxx
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general