Skip to content
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

temporal_tables installation failed with PG 13 docker image #58

Open
srsonawane opened this issue Nov 30, 2021 · 3 comments
Open

temporal_tables installation failed with PG 13 docker image #58

srsonawane opened this issue Nov 30, 2021 · 3 comments

Comments

@srsonawane
Copy link

Does pgxn support PG 12/13 versions? I am not able add this extension. It woks fine with PG10.
root@docker-pg-master:/# git clone https://github.com/arkhipov/temporal_tables.git
Cloning into 'temporal_tables'...
remote: Enumerating objects: 271, done.
remote: Counting objects: 100% (12/12), done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 271 (delta 1), reused 10 (delta 1), pack-reused 259
Receiving objects: 100% (271/271), 89.59 KiB | 1.05 MiB/s, done.
Resolving deltas: 100% (157/157), done.
root@docker-pg-master:/temporal_tables# make
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -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/13/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -c -o temporal_tables.o temporal_tables.c
temporal_tables.c:9:10: fatal error: postgres.h: No such file or directory
9 | #include "postgres.h"
| ^~~~~~~~~~~~
compilation terminated.
make: *** [: temporal_tables.o] Error 1

Tried using command $pgxn install temporal_tables
But getting the same error

Using postgres:13.5-bullseye image.

@faatihi
Copy link

faatihi commented Jan 26, 2022

I encountered same error with pg10

Running this resolved it:
sudo apt-get install postgresql-server-dev-10 postgresql-contrib-10 libpq-dev

I cant tell which of the packages fixed it but I feel its libpq-dev.
If that's the case, you can leave out the other packages and only install libpq-dev.

Also remember to change the 10 to your preferred postgres version.

And then installing temporal_tables should be successful:
sudo pgxn install temporal_tables

@faatihi
Copy link

faatihi commented Jan 26, 2022

Okay, I looked at my most recent installed packages using this command on Ubuntu:
grep installed /var/log/dpkg.log

Only postgresql-server-dev-10 shows up in the list for today's installed packages.
libpq-dev was already installed yesterday.
I couldn't find postgresql-contrib-10 in the list.

Based on this, I think installing only postgresql-server-dev-10 would fix this issue.

@arkhipov
Copy link
Owner

Is it still reproducible with the latest master?

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

3 participants