arkhipov / temporal_tables

Temporal Tables PostgreSQL Extension
BSD 2-Clause "Simplified" License
937 stars 47 forks source link

<builtin>: recipe for target 'versioning.o' failed #38

Closed NiraliSupe closed 4 years ago

NiraliSupe commented 6 years ago

Postgres version: 11

I tried both ways to install the temporal tables:

$ git clone https://github.com/arkhipov/temporal_tables
$ cd temporal_tables
$ make
$ make installcheck
$ make install

and

pgxn install temporal_tables

But I am getting following error:

/temporal_tables# make
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 -fdebug-prefix-map=/build/postgresql-11-f8qi7Y/postgresql-11-11~beta1=. -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 versioning.o versioning.c
versioning.c: In function ‘versioning’:
versioning.c:249:14: error: incompatible types when assigning to type ‘Form_pg_attribute {aka struct FormData_pg_attribute *}’ from type ‘FormData_pg_attribute {aka struct FormData_pg_attribute}’
  period_attr = tupdesc->attrs[period_attnum - 1];
              ^
versioning.c: In function ‘fill_versioning_hash_entry’:
versioning.c:502:8: error: incompatible types when assigning to type ‘Form_pg_attribute {aka struct FormData_pg_attribute *}’ from type ‘FormData_pg_attribute {aka struct FormData_pg_attribute}’
   attr = tupdesc->attrs[i];
        ^
versioning.c:514:16: error: incompatible types when assigning to type ‘Form_pg_attribute {aka struct FormData_pg_attribute *}’ from type ‘FormData_pg_attribute {aka struct FormData_pg_attribute}’
   history_attr = history_tupdesc->attrs[history_attnum - 1];
                ^
versioning.c: In function ‘deserialize_system_period’:
versioning.c:762:18: warning: implicit declaration of function ‘DatumGetRangeType’ [-Wimplicit-function-declaration]
  system_period = DatumGetRangeType(datum);
                  ^~~~~~~~~~~~~~~~~
versioning.c:762:16: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
  system_period = DatumGetRangeType(datum);
                ^
versioning.c: In function ‘modify_tuple’:
versioning.c:880:24: warning: implicit declaration of function ‘RangeTypeGetDatum’ [-Wimplicit-function-declaration]
  Datum   values[1] = { RangeTypeGetDatum(range) };
                        ^~~~~~~~~~~~~~~~~
<builtin>: recipe for target 'versioning.o' failed

Could you please help with this?

arkhipov commented 6 years ago

I guess it needs some work to make it compatible with PostgreSQL 11. I will check it this weekend.

jseadragon commented 6 years ago

I've also received the same compilation errors when building temporal_tables 1.2.0 for Postgres 11. Perhaps the data structures changed slightly?

fxcoudert commented 6 years ago

This is holding the update to postgresql 11 in Homebrew: https://github.com/Homebrew/homebrew-core/pull/33131 What is the current status?

dpiscitelli commented 6 years ago

I guess it needs some work to make it compatible with PostgreSQL 11. I will check it this weekend.

PG 11 is now released. When do you think, you can update the code to be compatible with PG 11 ?

Thx

dpiscitelli commented 5 years ago

Thx @mlt for the patch.

@arkhipov : are you still active on this project ?