Re: [HACKERS] PGXS problem with pdftotext

2009-07-03 Thread Dimitri Fontaine
Hi, Le 2 juil. 09 à 22:20, Kevin Grittner a écrit : Here's the Makefile contents: You could compare to this: http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/backports/uuid-ossp/Makefile?rev=1.1.1.1content-type=text/x-cvsweb-markup SHLIB_LINK = -lpoppler -L/usr/local/lib SHLIB_LINK +=

Re: [HACKERS] PGXS problem with pdftotext

2009-07-03 Thread Kevin Grittner
I cleaned up the poppler build situation, and all looks good except: Tom Lane t...@sss.pgh.pa.us wrote: Kevin Grittner kevin.gritt...@wicourts.gov writes: PG_CPPFLAGS =-I/usr/include/poppler -shared -fpic It doesn't seem appropriate to put -shared or -fpic into PG_CPPFLAGS. If you need

Re: [HACKERS] PGXS problem with pdftotext

2009-07-03 Thread Tom Lane
Kevin Grittner kevin.gritt...@wicourts.gov writes: Leaving off -shared was OK, but when I left off -fpic, I got this: /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld: poppler_compat.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a

Re: [HACKERS] PGXS problem with pdftotext

2009-07-03 Thread Kevin Grittner
Tom Lane t...@sss.pgh.pa.us wrote: What do you get? sed 's,MODULE_PATHNAME,$libdir/adminpack,g' adminpack.sql.in adminpack.sql gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -g -fpic

Re: [HACKERS] PGXS problem with pdftotext

2009-07-03 Thread Kevin Grittner
Tom Lane t...@sss.pgh.pa.us wrote: What do you get? More to the point, here's what I get when I use PGXS with my pdf code. sed 's,MODULE_PATHNAME,$libdir/pdftotext,g' pdftotext.sql.in pdftotext.sql gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement

Re: [HACKERS] PGXS problem with pdftotext

2009-07-03 Thread Tom Lane
Kevin Grittner kevin.gritt...@wicourts.gov writes: Tom Lane t...@sss.pgh.pa.us wrote: What does pg_config report for the various FLAGS variables? CPPFLAGS = -D_GNU_SOURCE -I/usr/include/libxml2 CFLAGS = -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement

Re: [HACKERS] PGXS problem with pdftotext

2009-07-03 Thread Tom Lane
Kevin Grittner kevin.gritt...@wicourts.gov writes: Since the gcc line has it, it must be the g++ line that's the problem? Hmm, try adding CXXFLAGS = $(CFLAGS) Although in general we don't try very hard to support C++ code inside the backend. regards, tom lane

Re: [HACKERS] PGXS problem with pdftotext

2009-07-03 Thread Kevin Grittner
Tom Lane t...@sss.pgh.pa.us wrote: Hmm, try adding CXXFLAGS = $(CFLAGS) Thanks, that worked; I don't need to specify -fpic in my file if I put the above line in. Although in general we don't try very hard to support C++ code inside the backend. I try to avoid it when possible.

[HACKERS] PGXS problem with pdftotext

2009-07-02 Thread Kevin Grittner
I've been wondering whether anyone else would want to use the functions we wrote to extract text from PDF documents stored in bytea columns. If so, I would need to sort out the problems I've been having with builds through the PGXS techniques. Here's the directory, after a successful build under

Re: [HACKERS] PGXS problem with pdftotext

2009-07-02 Thread Tom Lane
Kevin Grittner kevin.gritt...@wicourts.gov writes: PG_CPPFLAGS =-I/usr/include/poppler -shared -fpic SHLIB_LINK = -lpoppler -L/usr/local/lib It doesn't seem appropriate to put -shared or -fpic into PG_CPPFLAGS. If you need those, the makefiles should add them automatically. The other thing

Re: [HACKERS] PGXS problem with pdftotext

2009-07-02 Thread Kevin Grittner
Tom Lane t...@sss.pgh.pa.us wrote: Kevin Grittner kevin.gritt...@wicourts.gov writes: PG_CPPFLAGS =-I/usr/include/poppler -shared -fpic SHLIB_LINK = -lpoppler -L/usr/local/lib It doesn't seem appropriate to put -shared or -fpic into PG_CPPFLAGS. If you need those, the makefiles should add

Re: [HACKERS] PGXS problem with pdftotext

2009-07-02 Thread Tom Lane
Kevin Grittner kevin.gritt...@wicourts.gov writes: Does it seem likely that fixing these issues will allow PGXS to work? Couldn't say. It would be useful to compare ldd output for pdftotext.so built both ways. regards, tom lane -- Sent via pgsql-hackers mailing list

[HACKERS] pgxs problem

2006-07-19 Thread Gregory Stark
I've tracked down my problem with pgxs to Makefile.global in lib/pgxs/src. These lines seem to be the culprits: bindir := $(shell pg_config --bindir) datadir := $(shell pg_config --sharedir) sysconfdir := $(shell pg_config --sysconfdir) libdir := $(shell pg_config --libdir) pkglibdir := $(shell

Re: [HACKERS] pgxs problem

2006-07-19 Thread Martijn van Oosterhout
On Wed, Jul 19, 2006 at 05:06:48AM -0400, Gregory Stark wrote: I've tracked down my problem with pgxs to Makefile.global in lib/pgxs/src. These lines seem to be the culprits: snip I think it should be running $(pkglibdir)/bin/pg_config Seems reasonable to me. This code definitly seems to

Re: [HACKERS] pgxs problem

2006-07-19 Thread Tom Lane
Gregory Stark [EMAIL PROTECTED] writes: I've tracked down my problem with pgxs to Makefile.global in lib/pgxs/src. These lines seem to be the culprits: bindir := $(shell pg_config --bindir) datadir := $(shell pg_config --sharedir) sysconfdir := $(shell pg_config --sysconfdir) libdir :=

Re: [HACKERS] pgxs problem

2006-07-19 Thread Peter Eisentraut
Gregory Stark wrote: I've tracked down my problem with pgxs to Makefile.global in lib/pgxs/src. These lines seem to be the culprits: bindir := $(shell pg_config --bindir) Yes, that's pretty small-minded. It should be something like PG_CONFIG = pg_config bindir := $(shell $(PG_CONFIG)

Re: [HACKERS] pgxs problem

2006-07-19 Thread Michael Fuhr
On Wed, Jul 19, 2006 at 10:29:14AM -0400, Tom Lane wrote: The documented behavior is that pgxs invokes whatever pg_config is in your PATH. How do people with multiple PostgreSQL installations keep track of which installation they're using? I use shell scripts that set PATH and a few other

Re: [HACKERS] pgxs problem

2006-07-19 Thread Tom Lane
Michael Fuhr [EMAIL PROTECTED] writes: How do people with multiple PostgreSQL installations keep track of which installation they're using? I use shell scripts that set PATH and a few other environment variables and then exec the command I want to run (shell aliases would also work). Yeah, I

Re: [HACKERS] pgxs problem

2006-07-19 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes: Yes, that's pretty small-minded. It should be something like PG_CONFIG = pg_config bindir := $(shell $(PG_CONFIG) --bindir) That way you can override it. No objection here, although I'm not entirely convinced why anyone would prefer doing that to

Re: [HACKERS] pgxs problem

2006-07-19 Thread Peter Eisentraut
Tom Lane wrote: Peter Eisentraut [EMAIL PROTECTED] writes: Yes, that's pretty small-minded. It should be something like PG_CONFIG = pg_config bindir := $(shell $(PG_CONFIG) --bindir) That way you can override it. No objection here, although I'm not entirely convinced why anyone would