[x264-devel] Re: relocation error on x86_64

sean darcy seandarcy2 at gmail.com
Sun Aug 21 19:05:41 CEST 2005


On 8/19/05, sean darcy <seandarcy2 at gmail.com> wrote:
> I've built today's svn of x264 - using -fPIC. I'm now trying to build
> ffmpeg ( also with -fPIV ) with x264, but:
> 
> gcc -shared -o libavcodec.so bitstream.o utils.o mem.o allcodecs.o
> mpegvideo.o jrevdct.o jfdctfst.o jfdctint.o 
[........]
> -L../libavutil -lavutil -lfaac -lxvidcore -lx264 -lmp3lame -lvorbisenc
> -lvorbis -ltheora -logg  -Wl,--warn-common -rdynamic -ldl
> /usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/4.0.1/../../../../lib64/libx264.a(dct-a.o):
> relocation R_X86_64_32 against `a local symbol' can not be used when
> making a shared object; recompile with -fPIC

With help from the binutils list realized the problem here is dct-a.o,
which is built:

yasm -f elf -o common/amd64/dct-a.o common/amd64/dct-a.asm

I think the problem maybe that this is built without -m amd64, yasm's
way of specifying a 64 bit machine.

So I tried fiddling with the Makefile:

# MMX/SSE optims
ifeq ($(ARCH),X86_64)
SRCS   += common/i386/mc-c.c common/i386/dct-c.c common/i386/predict.c
ASMSRC  = common/amd64/dct-a.asm common/amd64/cpu-a.asm \
          common/amd64/pixel-a.asm common/amd64/mc-a.asm \
          common/amd64/mc-a2.asm common/amd64/predict-a.asm
OBJASM  = $(ASMSRC:%.asm=%.o )
endif

I tried:

OBJASM  = $(ASMSRC:%.asm=%.o -m amd64)

But Make thought -m was a source file:

yasm -f elf -m amd64 -o common/amd64/dct-a.o common/amd64/dct-a.asm
make: *** No rule to make target `-m', needed by `libx264.a'.  Stop.

Is the -m amd64 needed? preferred? If so how do you specify it?

sean

-- 
This is the x264-devel mailing-list
To unsubscribe, go to: http://developers.videolan.org/lists.html



More information about the x264-devel mailing list