Skip to content

Compilation issue on PostgreSQL 9.5.1 on Fedora23 x64 #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
thomasboussekey opened this issue Mar 18, 2016 · 6 comments
Closed

Compilation issue on PostgreSQL 9.5.1 on Fedora23 x64 #1

thomasboussekey opened this issue Mar 18, 2016 · 6 comments

Comments

@thomasboussekey
Copy link

Hello,

I encounter a compilation issue on pg_pathman, here is the result of the command make install USE_PGXS=1:

gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DLINUX_OOM_SCORE_ADJ=0 -fpic -I. -I./ -I/usr/include/pgsql/server -I/usr/include/pgsql/internal -D_GNU_SOURCE -I/usr/include/libxml2   -c -o init.o init.c
init.c: In function ‘create_relations_hashtable’:
init.c:259:88: error: ‘HASH_BLOBS’ undeclared (first use in this function)
  relations = ShmemInitHash("Partitioning relation info", 1024, 1024, &ctl, HASH_ELEM | HASH_BLOBS);

                                                                                        ^
init.c:259:88: note: each undeclared identifier is reported only once for each function it appears in
init.c: In function ‘create_range_restrictions_hashtable’:
init.c:561:43: error: ‘HASH_BLOBS’ undeclared (first use in this function)
             1024, 1024, &ctl, HASH_ELEM | HASH_BLOBS);
                                           ^
<builtin>: recipe for target 'init.o' failed
make: *** [init.o] Error 1

Is there a problem on my laptop?

Thanks in advance for your help,
Have a nice week-end,
Regards,
Thomas

@akorotkov
Copy link
Contributor

Hi!

Which version of PostgreSQL you're using in compilation? You can check it by output of pg_config command.

@thomasboussekey
Copy link
Author

Hello,

Thanks for your quick answer!

Here is the result of the pg_config

BINDIR = /usr/bin DOCDIR = /usr/share/doc/pgsql HTMLDIR = /usr/share/doc/pgsql INCLUDEDIR = /usr/include PKGINCLUDEDIR = /usr/include/pgsql INCLUDEDIR-SERVER = /usr/include/pgsql/server LIBDIR = /usr/lib64 PKGLIBDIR = /usr/lib64/pgsql LOCALEDIR = /usr/share/locale MANDIR = /usr/share/man SHAREDIR = /usr/share/pgsql SYSCONFDIR = /etc PGXS = /usr/lib64/pgsql/pgxs/src/makefiles/pgxs.mk CONFIGURE = '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--program-prefix=' '--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--disable-rpath' '--with-perl' '--with-tcl' '--with-tclconfig=/usr/lib64' '--with-python' '--with-ldap' '--with-openssl' '--with-pam' '--with-krb5' '--with-gssapi' '--with-ossp-uuid' '--with-libxml' '--with-libxslt' '--enable-nls' '--enable-dtrace' '--with-selinux' '--with-system-tzdata=/usr/share/zoneinfo' '--datadir=/usr/share/pgsql' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'CFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DLINUX_OOM_SCORE_ADJ=0' 'LDFLAGS=-Wl,-z,relro ' CC = gcc CPPFLAGS = -D_GNU_SOURCE -I/usr/include/libxml2 CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DLINUX_OOM_SCORE_ADJ=0 CFLAGS_SL = -fpic LDFLAGS = -L../../../src/common -Wl,-z,relro -Wl,--as-needed LDFLAGS_EX = LDFLAGS_SL = LIBS = -lpgcommon -lpgport -lselinux -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lrt -lcrypt -ldl -lm VERSION = PostgreSQL 9.4.6

I have some pg9.4.6 and pg9.5.1 installed:
rpm -qa | grep postgres
postgresql-libs-9.4.6-1.fc23.x86_64
postgresql-9.4.6-1.fc23.x86_64
postgresql95-9.5.1-1PGDG.f23.x86_64
postgresql95-libs-9.5.1-1PGDG.f23.x86_64
postgresql95-server-9.5.1-1PGDG.f23.x86_64
postgresql95-devel-9.5.1-1PGDG.f23.x86_64
postgresql-devel-9.4.6-1.fc23.x86_64

I'm removing 9.4.6 binaries and tell you what is the result.

@akorotkov
Copy link
Contributor

Not necessary to remove 9.4.6 completely. It's enough to set PATH so that pg_config of 9.5 get used.

@thomasboussekey
Copy link
Author

Hello,

Thanks for your help, I think that the installation is going further!

I get a new error:

[root@tbouss11 pg_pathman-master]# make install USE_PGXS=1
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -DLINUX_OOM_ADJ=0 -fpic -I. -I./ -I/usr/pgsql-9.5/include/server -I/usr/pgsql-9.5/include/internal -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include  -c -o init.o init.c
gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory
<builtin>: recipe for target 'init.o' failed
make: *** [init.o] Error 1
[root@tbouss11 pg_pathman-master]# 

Thomas

@akorotkov
Copy link
Contributor

AFAICS, it is related to Fedora. See https://bugs.launchpad.net/openstack-gate/+bug/1424582
It's likely you need to install redhat-rpm-config.

@akorotkov
Copy link
Contributor

I'm closing this issue. If you have any other compilation problems, feel free to raise another one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants