g++ -Wall -Wpointer-arith -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fn
o-strict-aliasing -fwrapv -g -g -O2 -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror
=format-security -fPIC -I/usr/local/include -DBUCKETS_128 -I. -I./ -I/usr/include/postgresql/14/server -I/usr/include/postgresql/intern
al -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -c -o tlsh_gist.o tlsh_gist.cpp
In file included from /usr/include/postgresql/14/server/port/atomics.h:70,
from /usr/include/postgresql/14/server/utils/dsa.h:17,
from /usr/include/postgresql/14/server/nodes/tidbitmap.h:26,
from /usr/include/postgresql/14/server/access/genam.h:19,
from /usr/include/postgresql/14/server/access/amapi.h:15,
from /usr/include/postgresql/14/server/access/reloptions.h:22,
from tlsh_gist.cpp:4:
/usr/include/postgresql/14/server/port/atomics/arch-x86.h: In function ‘bool pg_atomic_test_set_flag_impl(volatile pg_atomic_flag*)’:
/usr/include/postgresql/14/server/port/atomics/arch-x86.h:143:23: warning: ISO C++17 does not allow ‘register’ storage class specifier
[-Wregister]
143 | register char _res = 1;
| ^~~~
In file included from tlsh_gist.h:7,
from tlsh_gist.cpp:1:
tlsh_gist.cpp: At global scope:
/usr/include/postgresql/14/server/fmgr.h:424:12: error: conflicting declaration of ‘int no_such_variable’ with ‘C’ linkage
424 | extern int no_such_variable
| ^~~~~~~~~~~~~~~~
tlsh_gist.cpp:12:5: note: in expansion of macro ‘PG_FUNCTION_INFO_V1’
12 | PG_FUNCTION_INFO_V1(tlsh_mean);
| ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/postgresql/14/server/catalog/pg_attribute.h:25,
from /usr/include/postgresql/14/server/access/tupdesc.h:18,
from /usr/include/postgresql/14/server/utils/relcache.h:17,
from /usr/include/postgresql/14/server/access/genam.h:21,
from /usr/include/postgresql/14/server/access/amapi.h:15,
from /usr/include/postgresql/14/server/access/reloptions.h:22,
from tlsh_gist.cpp:4:
/usr/include/postgresql/14/server/catalog/genbki.h:81:61: note: previous declaration with ‘C++’ linkage
81 | #define DECLARE_UNIQUE_INDEX_PKEY(name,oid,decl) extern int no_such_variable
| ^~~~~~~~~~~~~~~~
/usr/include/postgresql/14/server/catalog/pg_attribute.h:211:1: note: in expansion of macro ‘DECLARE_UNIQUE_INDEX_PKEY’
211 | DECLARE_UNIQUE_INDEX_PKEY(pg_attribute_relid_attnum_index, 2659, on pg_attribute using btree(attrelid oid_ops, attnum int2_ops)
);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [<builtin>: tlsh_gist.o] Error 1