Re: PGXS problem with pdftotext - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: PGXS problem with pdftotext
Date
Msg-id 4A4E065B020000250002835B@gw.wicourts.gov
Whole thread Raw
In response to Re: PGXS problem with pdftotext  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: PGXS problem with pdftotext  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I cleaned up the poppler build situation, and all looks good except:
Tom Lane <tgl@sss.pgh.pa.us> wrote: 
> "Kevin Grittner" <Kevin.Grittner@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 those, the makefiles should add them
> automatically.

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 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
With -fPIC or -fpic in my Makefile, PGXS now seems to work as
intended.  Is it worth doing anything to check on why that is needed
or how to get rid of it?  Might it have something to do with compiling
both .c and .cc files?
-Kevin


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pg_migrator mention in documentation
Next
From: Alvaro Herrera
Date:
Subject: Re: pg_migrator mention in documentation