"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 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

Huh.  On Linux platforms, the PG makefiles should include -fpic in
CFLAGS (via CFLAGS_SL) automatically; you should not need to repeat it
in CPPFLAGS.  For instance, if I go into contrib/adminpack and make, I see

sed 's,MODULE_PATHNAME,$libdir/adminpack,g' adminpack.sql.in >adminpack.sql
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith 
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -g 
-fpic -I../../src/interfaces/libpq -I. -I../../src/include -D_GNU_SOURCE   -c 
-o adminpack.o adminpack.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith 
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -g 
-fpic -shared  adminpack.o   -L../../src/port  
-Wl,-rpath,'/home/tgl/testversion/lib' -o adminpack.so

What do you get?  What does pg_config report for the various FLAGS
variables?

                        regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to