Hi all,

I'm trying to compile xine-lib-1.1.5 on an Intel 64-bit machine running Red Hat Enterprise Linux 4.  After running

% configure && make

I arrive at the following error:

gcc -shared  .libs/xine.o .libs/metronom.o .libs/configfile.o .libs/buffer.o.libs/load_plugins.o .libs/video_decoder.o .libs/buffer_types.o .libs/audio_decoder.o .libs/video_out.o .libs/audio_out.o .libs/resample.o .libs/events.o.libs/video_overlay.o .libs/osd.o .libs/scratch.o .libs/demux.o .libs/vo_scale.o .libs/xine_interface.o .libs/post.o .libs/tvmode.o .libs/broadcaster.o .libs/io_helper.o .libs/input_rip.o .libs/input_cache.o .libs/info_helper.o .libs/refcounter.o .libs/alphablend.o -Wl,--whole-archive ../../src/xine-utils/.libs/libxineutils.a ../../lib/.libs/libxineposix.a -Wl,--no-whole-archive  -ldl -lz -lm -lrt -lresolv -lnsl  -pthread -Wl,-soname -Wl,libxine.so.1 -o .libs/libxine.so.1.17.0
/usr/bin/ld: .libs/xine.o: relocation R_X86_64_PC32 against `xine_event_send' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make[3]: *** [libxine.la] Error 1
make[3]: Leaving directory `/mnt/io/home/mfuhrer/sw/src/konstruct/libs/xine-lib/work/xine-lib-1.1.5/src/xine-engine'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/mnt/io/home/mfuhrer/sw/src/konstruct/libs/xine-lib/work/xine-lib-1.1.5/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mnt/io/home/mfuhrer/sw/src/konstruct/libs/xine-lib/work/xine-lib-1.1.5'
make: *** [all] Error 2

The error diagnostic appears to be telling me to compile xine.c (and presumably other sources as well) with the -fPIC flag, so I tried setting the following environment variables and rerunning the build process:

% make distclean
% setenv CFLAGS "-fPIC"
% setenv CPPFLAGS "-fPIC"
% setenv LDFLAGS "-fPIC"
% configure && make

but I arrive at the same error.  Looking back at the compile history, I can verify that xine.c was indeed compiled with the -fPIC flag:

gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../include -I../../include-I../../src -I../../src/xine-engine -I../../src/xine-engine -I../../src/xine-utils -I../../src/input -I../../src/input -I../../lib -I../../lib -DXINE_LIBRARY_COMPILE -fPIC -I/usr/X11R6/include -fvisibility=hidden -DNDEBUG -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE -Wformat=2 -Wno-format-zero-length-Wmissing-format-attribute -Werror-implicit-function-declaration -Wstrict-aliasing=2 -O3 -fomit-frame-pointer -fexpensive-optimizations -fschedule-insns2-ffast-math -finline-functions -Wall -Wpointer-arith -Wnested-externs -Wcast-align -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -fPIC -MT xine.lo -MD -MP -MF .deps/xine.Tpo -c xine.c  -fPIC -DPIC -o .libs/xine.o

I also tried manually linking libxine.so with the -fPIC flag as follows:
 
% gcc -shared -fPIC .libs/xine.o ... -o .libs/libxine.so.1.17.0
/usr/bin/ld: .libs/xine.o: relocation R_X86_64_PC32 against `xine_event_send' can not be used when making a shared object; recompile with -fPIC
...

but I still arrive at the same error.  Does anyone have an explanation for this?  Am I using the -fPIC flag incorrectly?  Thanks for any help!

Martin