pkuvcl / davs2

An open-source decoder of AVS2-P2/IEEE1857.4 video coding standard
GNU General Public License v2.0
129 stars 52 forks source link

Build failed on Ubuntu 22.04 #35

Closed vndroid closed 1 year ago

vndroid commented 1 year ago

Describe the bug

A clear and concise description of what the bug is.

请详细的描述这个bug的细节

Build failed

To Reproduce

Steps to reproduce the behavior (including the commond line parameters)

请详细描述重现这个bug的步骤(运行的命令行参数、输入的文件)

git clone https://github.com/pkuvcl/davs2.git
cd davs2/
cd build/linux/
./configure
make

Then we can see the error.

 [linking execution] davs2
g++ -o davs2  test/test.o libdavs2.a  -m64  -lm -lpthread
/usr/bin/ld: libdavs2.a(blockcopy8.o): relocation R_X86_64_32S against hidden symbol `davs2_pb_1' can not be used when making a PIE object
/usr/bin/ld: libdavs2.a(dct8.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: libdavs2.a(mc-a2.o): relocation R_X86_64_32S against hidden symbol `davs2_pw_00ff' can not be used when making a PIE object
collect2: error: ld returned 1 exit status
make: *** [Makefile:196: davs2] Error 1

Expected behavior

A clear and concise description of what you expected to happen.

你认为这个功能本应如何工作

Screenshots

If applicable, add screenshots to help explain your problem.

如果有可能,请提供截图

Desktop (please complete the following information):

你的操作系统(包括版本)、编译器(GCC/G++, VS)、汇编器yasm(版本号)。

OS: Ubuntu 22.04 Compiler: gcc 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)

Additional context

Add any other context about the problem here, i.e. video sequences and bitstreams.

额外的材料,例如输入的视频序列、码流文件等。

Is there an operation I'm missing?

vndroid commented 1 year ago

Ok, I see.

Need use the command ./configure --enable-pic

Then work well.