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

Postgres 10 support #11

Open
siorai opened this issue Mar 22, 2018 · 3 comments
Open

Postgres 10 support #11

siorai opened this issue Mar 22, 2018 · 3 comments

Comments

@siorai
Copy link

siorai commented Mar 22, 2018

Nice work on the plugin, was able to get it to work on 8.4 as expected, but not quite 10.

Env: Raspberry Pi 3 B
Raspbian GNU/Linux 9 (stretch)

Built from source, pg_config:

PGXS = /usr/local/pgsql/lib/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--with-perl' '--with-python' '--with-tcl' '--with-systemd' '--with-uuid=ossp' '--with-openssl' '--with-libxml' '--enable-debug' '--with-gssapi'
CC = gcc
CPPFLAGS = -DFRONTEND -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 -g -O2
CFLAGS_SL = -fPIC
LDFLAGS = -L../../src/common -Wl,--as-needed -Wl,-rpath,'/usr/local/pgsql/lib',--enable-new-dtags
LDFLAGS_EX =
LDFLAGS_SL =
LIBS = -lpgcommon -lpgport -lpthread -lxml2 -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lrt -lcrypt -ldl -lm
VERSION = PostgreSQL 10.0

In file included from src/postpic.c:21:0:
src/postpic.c: In function ‘lo_size’:
src/postpic.c:978:22: error: ‘lo_lseek’ undeclared (first use in this function); did you mean ‘lseek’?
DirectFunctionCall3(lo_lseek, Int32GetDatum(fd), Int32GetDatum(0),
^
/usr/local/pgsql/include/server/fmgr.h:589:26: note: in definition of macro ‘DirectFunctionCall ’
DirectFunctionCall3Coll(func, InvalidOid, arg1, arg2, arg3)
^~~~
src/postpic.c:978:22: note: each undeclared identifier is reported only once for each function it appears in
DirectFunctionCall3(lo_lseek, Int32GetDatum(fd), Int32GetDatum(0),
^
/usr/local/pgsql/include/server/fmgr.h:589:26: note: in definition of macro ‘DirectFunctionCall ’
DirectFunctionCall3Coll(func, InvalidOid, arg1, arg2, arg3)
^~~~
src/postpic.c:980:27: error: ‘lo_tell’ undeclared (first use in this function); did you mean ‘be_lo_tell’?
sz = DirectFunctionCall1(lo_tell, Int32GetDatum(fd));
^
/usr/local/pgsql/include/server/fmgr.h:585:26: note: in definition of macro ‘DirectFunctionCall ’
DirectFunctionCall1Coll(func, InvalidOid, arg1)
^~~~
src/postpic.c: In function ‘lo_readblob’:
src/postpic.c:992:29: error: ‘lo_open’ undeclared (first use in this function); did you mean ‘be_lo_open’?
fd_d = DirectFunctionCall2(lo_open, ObjectIdGetDatum(loid),
^
/usr/local/pgsql/include/server/fmgr.h:587:26: note: in definition of macro ‘DirectFunctionCall ’
DirectFunctionCall2Coll(func, InvalidOid, arg1, arg2)
^~~~
src/postpic.c:1004:22: error: ‘lo_close’ undeclared (first use in this function); did you mean close’?
DirectFunctionCall1(lo_close, Int32GetDatum(fd));
^
/usr/local/pgsql/include/server/fmgr.h:585:26: note: in definition of macro ‘DirectFunctionCall ’
DirectFunctionCall1Coll(func, InvalidOid, arg1)

Lemme know if you need any info!

@drotiro
Copy link
Owner

drotiro commented Jun 19, 2018

Hi, sorry for replying late. I've been busy the last months.
I'll take a look at the errors, hopefully soon.

I'm not a Raspbeerry expert :(
I suppose the os is 32 bit, the cpu is arm or intel?

@vladojr
Copy link

vladojr commented Nov 20, 2018

Hello, I wish I could use your extension with postgres 11 on amd64 ubuntu, I get following errors during make, can you please have a look at it?

make
*** Checking for required programs
GraphicsMagick-config: /usr/bin/GraphicsMagick-config
pg_config : /usr/bin/pg_config
make[1]: Entering directory '/root/postpic/server'
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 -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC GraphicsMagick-config --cppflags --cflags -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/postpic.o src/postpic.c
In file included from src/postpic.c:21:0:
src/postpic.c: In function ‘lo_size’:
src/postpic.c:978:22: error: ‘lo_lseek’ undeclared (first use in this function); did you mean ‘lseek’?
DirectFunctionCall3(lo_lseek, Int32GetDatum(fd), Int32GetDatum(0),
^
/usr/include/postgresql/11/server/fmgr.h:595:26: note: in definition of macro ‘DirectFunctionCall3’
DirectFunctionCall3Coll(func, InvalidOid, arg1, arg2, arg3)
^~~~
src/postpic.c:978:22: note: each undeclared identifier is reported only once for each function it appears in
DirectFunctionCall3(lo_lseek, Int32GetDatum(fd), Int32GetDatum(0),
^
/usr/include/postgresql/11/server/fmgr.h:595:26: note: in definition of macro ‘DirectFunctionCall3’
DirectFunctionCall3Coll(func, InvalidOid, arg1, arg2, arg3)
^~~~
src/postpic.c:980:27: error: ‘lo_tell’ undeclared (first use in this function); did you mean ‘be_lo_tell’?
sz = DirectFunctionCall1(lo_tell, Int32GetDatum(fd));
^
/usr/include/postgresql/11/server/fmgr.h:591:26: note: in definition of macro ‘DirectFunctionCall1’
DirectFunctionCall1Coll(func, InvalidOid, arg1)
^~~~
src/postpic.c: In function ‘lo_readblob’:
src/postpic.c:992:29: error: ‘lo_open’ undeclared (first use in this function); did you mean ‘be_lo_open’?
fd_d = DirectFunctionCall2(lo_open, ObjectIdGetDatum(loid),
^
/usr/include/postgresql/11/server/fmgr.h:593:26: note: in definition of macro ‘DirectFunctionCall2’
DirectFunctionCall2Coll(func, InvalidOid, arg1, arg2)
^~~~
src/postpic.c:1004:22: error: ‘lo_close’ undeclared (first use in this function); did you mean ‘close’?
DirectFunctionCall1(lo_close, Int32GetDatum(fd));
^
/usr/include/postgresql/11/server/fmgr.h:591:26: note: in definition of macro ‘DirectFunctionCall1’
DirectFunctionCall1Coll(func, InvalidOid, arg1)
^~~~
: recipe for target 'src/postpic.o' failed
make[1]: *** [src/postpic.o] Error 1
make[1]: Leaving directory '/root/postpic/server'
Makefile:6: recipe for target 'postpic' failed
make: *** [postpic] Error 1

@tongbong
Copy link

Hi there and thanks for this extension,

still same error for pg12 :

src/postpic.c: In function 'lo_size':
�[0m�[91msrc/postpic.c:978:22: error: 'lo_lseek' undeclared (first use in this function); did you mean 'lseek'?
978 | DirectFunctionCall3(lo_lseek, Int32GetDatum(fd), Int32GetDatum(0),
| ^~~~~~~~
/usr/local/include/postgresql/server/fmgr.h:626:26: note: in definition of macro 'DirectFunctionCall3'
626 | DirectFunctionCall3Coll(func, InvalidOid, arg1, arg2, arg3)
| ^~~~
�[0m�[91msrc/postpic.c:978:22: note: each undeclared identifier is reported only once for each function it appears in
978 | DirectFunctionCall3(lo_lseek, Int32GetDatum(fd), Int32GetDatum(0),
| ^~~~~~~~
/usr/local/include/postgresql/server/fmgr.h:626:26: note: in definition of macro 'DirectFunctionCall3'
626 | DirectFunctionCall3Coll(func, InvalidOid, arg1, arg2, arg3)
| ^~~~

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

4 participants