Compilation problems with libtheora
Hi there,
I'm trying to compile libtheora 1.0 beta 3 on a Solaris machine.
The command line is simply ./configure -C --disable-examples.
This bombs with the following error:
gcc -shared -Wl,-h -Wl,libtheoraenc.so.1 -o .libs/libtheoraenc.so.1.0.0 .libs/cpu.o
.libs/dct_decode_mmx.o .libs/dsp_mmx.o .libs/dsp_mmxext.o .libs/recon_mmx.o .libs/idct_mmx.o
.libs/fdct_mmx.o .libs/dct_encode.o .libs/encode.o .libs/encoder_huffman.o .libs/encoder_idct.o
.libs/encoder_toplevel.o .libs/encoder_quant.o .libs/encapiwrapper.o .libs/blockmap.o
.libs/dct.o .libs/dct_decode.o .libs/frarray.o .libs/frinit.o .libs/mcomp.o .libs/misc_common.o
.libs/pb.o .libs/pp.o .libs/reconstruct.o .libs/scan.o .libs/dsp.o -R/opt/local/lib -logg -L/opt
/local/lib -lc
Text relocation remains referenced
against symbol offset in file
.rodata (section) 0x55 .libs/dct_decode_mmx.o
.rodata (section) 0x5f .libs/dct_decode_mmx.o
.rodata (section) 0x108 .libs/dct_decode_mmx.o
.rodata (section) 0x112 .libs/dct_decode_mmx.o
.rodata (section) 0x1df .libs/dct_decode_mmx.o
.rodata (section) 0x1e6 .libs/dct_decode_mmx.o
.rodata (section) 0x1f3 .libs/dct_decode_mmx.o
.rodata (section) 0x1fa .libs/dct_decode_mmx.o
ld: fatal: relocations remain against allocatable but non-writable sections
collect2: ld returned 1 exit status
If I add either of the following to ./configure then the error goes away:
--disable-encode
--disable-shared
From what I've been able to figure out there is a problem with the shared library portion for whatever reason.
The fix seems to be to pass -fPIC to gcc which you will notice is missing on the command line just before the error is thrown. I've not been able to figure out how to pass -fPIC to gcc to see if it alleviates the situation.
How can I do this?
thanks in advance,
alan