Search Postgresql Archives

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

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

 



On 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@xxxxxxxxxxx


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



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

  Powered by Linux