Re: PGXS problem with pdftotext

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PGXS problem with pdftotext
Date: 2009-07-03 19:02:21
Message-ID: 4A4E0F6D0200002500028370@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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 -Wendif-labels -fno-strict-aliasing
-fwrapv -g -fpic -I/usr/local/include/poppler -I.
-I/usr/local/pgsql-8.3.7/include/server
-I/usr/local/pgsql-8.3.7/include/internal -D_GNU_SOURCE
-I/usr/include/libxml2 -c -o pdftotext.o pdftotext.c
g++ -I/usr/local/include/poppler -I.
-I/usr/local/pgsql-8.3.7/include/server
-I/usr/local/pgsql-8.3.7/include/internal -D_GNU_SOURCE
-I/usr/include/libxml2 -c -o poppler_compat.o poppler_compat.cc
ar crs libpdftotext.a pdftotext.o poppler_compat.o
ranlib libpdftotext.a
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
-fwrapv -g -fpic -shared -Wl,-soname,libpdftotext.so.0 pdftotext.o
poppler_compat.o -L/usr/local/pgsql-8.3.7/lib -lpoppler
-Wl,-rpath,'/usr/local/pgsql-8.3.7/lib' -o libpdftotext.so.0.0
/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 shared object; recompile with -fPIC
poppler_compat.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libpdftotext.so.0.0] Error 1

Since the gcc line has it, it must be the g++ line that's the problem?

-Kevin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-07-03 19:03:31 Re: [HACKERS] commitfest.postgresql.org
Previous Message Andrew Chernow 2009-07-03 19:00:43 Re: [HACKERS] commitfest.postgresql.org