Skip to content

PostgreSQL 11? #48

Closed
Closed
@ArturFormella

Description

@ArturFormella

Hello!
I have the following error:

$sudo USE_PGXS=1 pgxn install rum

INFO: best version: rum 1.1.0
INFO: saving /tmp/tmp32u9l4/rum-1.1.0.zip
INFO: unpacking: /tmp/tmp32u9l4/rum-1.1.0.zip
INFO: building extension
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 -fstack-protector-strong -Wformat -Werror=format-security -fPIC -pie -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/include/postgresql/11/server -I/usr/include/postgresql/internal -I/usr/include/x86_64-linux-gnu -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include/mit-krb5  -c -o src/rumsort.o src/rumsort.c
In file included from /usr/include/postgresql/11/server/catalog/index.h:18:0,
                 from src/rumsort.c:129:
/usr/include/postgresql/11/server/nodes/execnodes.h:1849:2: error: unknown type name ‘TuplesortInstrumentation’
  TuplesortInstrumentation sinstrument[FLEXIBLE_ARRAY_MEMBER];
  ^
In file included from src/rumsort.c:138:0:
/usr/include/postgresql/11/server/utils/probes.h:10:21: fatal error: sys/sdt.h: No such file or directory
compilation terminated.
<builtin>: recipe for target 'src/rumsort.o' failed
make: *** [src/rumsort.o] Error 1
ERROR: command returned 2: make PG_CONFIG=/usr/bin/pg_config all

My pg_config:

root@DKXP:/home/a.formella# pg_config
BINDIR = /usr/lib/postgresql/11/bin
DOCDIR = /usr/share/doc/postgresql-doc-11
HTMLDIR = /usr/share/doc/postgresql-doc-11
INCLUDEDIR = /usr/include/postgresql
PKGINCLUDEDIR = /usr/include/postgresql
INCLUDEDIR-SERVER = /usr/include/postgresql/11/server
LIBDIR = /usr/lib/x86_64-linux-gnu
PKGLIBDIR = /usr/lib/postgresql/11/lib
LOCALEDIR = /usr/share/locale
MANDIR = /usr/share/postgresql/11/man
SHAREDIR = /usr/share/postgresql/11
SYSCONFDIR = /etc/postgresql-common
PGXS = /usr/lib/postgresql/11/lib/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=/usr/include' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--disable-silent-rules' '--libdir=/usr/lib/x86_64-linux-gnu' '--libexecdir=/usr/lib/x86_64-linux-gnu' '--disable-maintainer-mode' '--disable-dependency-tracking' '--with-icu' '--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/11/man' '--docdir=/usr/share/doc/postgresql-doc-11' '--sysconfdir=/etc/postgresql-common' '--datarootdir=/usr/share/' '--datadir=/usr/share/postgresql/11' '--bindir=/usr/lib/postgresql/11/bin' '--libdir=/usr/lib/x86_64-linux-gnu/' '--libexecdir=/usr/lib/postgresql/' '--includedir=/usr/include/postgresql/' '--with-extra-version= (Ubuntu 11.0-1.pgdg16.04+2)' '--enable-nls' '--enable-integer-datetimes' '--enable-thread-safety' '--enable-tap-tests' '--enable-debug' '--enable-dtrace' '--disable-rpath' '--with-uuid=e2fs' '--with-gnu-ld' '--with-pgport=5432' '--with-system-tzdata=/usr/share/zoneinfo' '--with-llvm' '--with-systemd' '--with-selinux' 'MKDIR_P=/bin/mkdir -p' 'TAR=/bin/tar' 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fPIC -pie -fno-omit-frame-pointer' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now' '--with-gssapi' '--with-ldap' '--with-includes=/usr/include/mit-krb5' '--with-libs=/usr/lib/mit-krb5' '--with-libs=/usr/lib/x86_64-linux-gnu/mit-krb5' 'build_alias=x86_64-linux-gnu' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security'
CC = gcc
CPPFLAGS = -I/usr/include/x86_64-linux-gnu -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/mit-krb5
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 -fPIC -pie -fno-omit-frame-pointer
CFLAGS_SL = -fPIC
LDFLAGS = -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -L/usr/lib/llvm-6.0/lib -L/usr/lib/x86_64-linux-gnu/mit-krb5 -Wl,--as-needed
LDFLAGS_EX =
LDFLAGS_SL =
LIBS = -lpgcommon -lpgport -lpthread -lselinux -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -ledit -lrt -lcrypt -ldl -lm
VERSION = PostgreSQL 11.0 (Ubuntu 11.0-1.pgdg16.04+2)

Activity

za-arthur

za-arthur commented on Nov 4, 2018

@za-arthur
Contributor

Hello,
Yep, this is because pgxn stores old version of RUM, 1.1.0. Current version of RUM is 1.3.0. For now you may try version from GitHub.
@akorotkov maintains distribution RUM through pgxn.

levin222

levin222 commented on Nov 8, 2018

@levin222

@za-arthur
When I try to install from Github
it show that 👍

make 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 -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fPIC -pie -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/include/postgresql/11/server -I/usr/include/postgresql/internal -I/usr/include/x86_64-linux-gnu -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/mit-krb5 -c -o src/rumsort.o src/rumsort.c
In file included from src/rumsort.c:138:0:
/usr/include/postgresql/11/server/utils/probes.h:10:21: fatal error: sys/sdt.h: 没有那个文件或目录
compilation terminated.
: recipe for target 'src/rumsort.o' failed
make: *** [src/rumsort.o] Error 1

ArturFormella

ArturFormella commented on Nov 8, 2018

@ArturFormella
Author

Try
sudo apt-get install systemtap-sdt-dev

za-arthur

za-arthur commented on Nov 8, 2018

@za-arthur
Contributor

@levin222 , can you try the solution from #27 (comment)?

levin222

levin222 commented on Nov 8, 2018

@levin222

@za-arthur my system is Ubuntu 16.04

after sudo apt-get install systemtap-sdt-dev
It show like that

root@vps01:~/rum# make 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 -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fPIC -pie -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/include/postgresql/11/server -I/usr/include/postgresql/internal -I/usr/include/x86_64-linux-gnu -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/mit-krb5 -c -o src/rumsort.o src/rumsort.c
In file included from src/rumsort.c:142:0: src/rum.h:778:2: error: unknown type name ‘RBNode’ RBNode rbnode;
^ : recipe for target 'src/rumsort.o' failed
make: *** [src/rumsort.o] Error 1

levin222

levin222 commented on Nov 9, 2018

@levin222

apt install postgresql 11
by https://tecadmin.net/install-postgresql-server-on-ubuntu/

I try in 2 vps get the same error

za-arthur

za-arthur commented on Nov 9, 2018

@za-arthur
Contributor

@levin222 , did you install postgresql-server-dev package?

andreak

andreak commented on Nov 9, 2018

@andreak

FWIW, I get the same error on Kubuntu-cosmic;

$ sudo apt install postgresql-server-dev-11
Reading package lists... Done
Building dependency tree
Reading state information... Done
postgresql-server-dev-11 is already the newest version (11.1-1.pgdg18.10+1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[andreak@spaceballs-one] ~/dev/rum (master)
$ make 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 -Wno-format-truncation -Wno-stringop-truncation -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/include/postgresql/11/server -I/usr/include/postgresql/internal  -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include/mit-krb5  -c -o src/rumsort.o src/rumsort.c
In file included from src/rumsort.c:142:
src/rum.h:778:2: error: unknown type name ‘RBNode’
  RBNode  rbnode;
  ^~~~~~
make: *** [<builtin>: src/rumsort.o] Error 1
za-arthur

za-arthur commented on Nov 9, 2018

@za-arthur
Contributor

Ok. Thank you! I'll try to understand what happens here.

added a commit that references this issue on Nov 9, 2018

Issue #48: Renames for PostgreSQL 10 and 11 in rbtree structures and …

za-arthur

za-arthur commented on Nov 9, 2018

@za-arthur
Contributor

So it was because of renames of structures and functions in rbtree.h for PostgreSQL 10 and 11. See:
postgres/postgres@b2e754c
postgres/postgres@1f28ec6

I pushed a commit which fixes this. I'll ask maintainers of RUM apt package to update it, so it will take time to update the package. For now you can use RUM sources to build instead of the package.

za-arthur

za-arthur commented on Nov 9, 2018

@za-arthur
Contributor
df7cb

df7cb commented on Nov 9, 2018

@df7cb
Contributor

1.3.1 works with 11.1, but not with 10.6:

13:15:05 gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I. -I./ -I/usr/include/postgresql/10/server -I/usr/include/postgresql/internal  -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include/mit-krb5  -c -o src/rumsort.o src/rumsort.c
13:15:05 In file included from src/rumsort.c:142:
13:15:05 src/rum.h:782:2: error: unknown type name 'RBTNode'
13:15:05   RBTNode  rbnode;
13:15:05   ^~~~~~~

8 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @andreak@df7cb@levin222@ArturFormella@za-arthur

        Issue actions

          PostgreSQL 11? · Issue #48 · postgrespro/rum