pkuvcl / xavs2

An open-source encoder of AVS2-P2/IEEE1857.4 video coding standard
GNU General Public License v2.0
234 stars 66 forks source link

win10上wsl编译问题 #16

Closed yfor1008 closed 5 years ago

yfor1008 commented 5 years ago

build/linux目录下,执行./configure没有问题,但执行make命令时,出现如下问题

 [linking execution] xavs2
gcc -o xavs2  test/test.o libxavs2.a  -m64  -lm -lpthread -ldl
/usr/bin/x86_64-linux-gnu-ld: libxavs2.a(blockcopy8.o): relocation R_X86_64_32 against symbol `xavs2_pb_1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: libxavs2.a(dct8.o): relocation R_X86_64_32 against symbol `xavs2_pd_0' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: libxavs2.a(mc-a.o): relocation R_X86_64_32 against symbol `xavs2_pw_256' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: libxavs2.a(mc-a2.o): relocation R_X86_64_32 against symbol `xavs2_pw_00ff' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: libxavs2.a(pixel-a.o): relocation R_X86_64_32 against symbol `xavs2_pw_1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: libxavs2.a(pixel-util8.o): relocation R_X86_64_32 against symbol `xavs2_pb_1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: libxavs2.a(quant8.o): relocation R_X86_64_32 against symbol `xavs2_pw_1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: libxavs2.a(sad-a.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: libxavs2.a(satd-a.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: libxavs2.a(ssd-a.o): relocation R_X86_64_32 against symbol `xavs2_pw_00ff' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
Makefile:235: recipe for target 'xavs2' failed
make: *** [xavs2] Error 1

win10, 子系统, ubuntu16.04,

luofalei commented 5 years ago

加上--enable-pic参数可解决此问题。

./configure --enable-pic

https://github.com/pkuvcl/xavs2/issues/2