mozilla / aom

Alliance for Open Media Video Codec reference implementation (Mozilla branch)
http://aomedia.org/
BSD 2-Clause "Simplified" License
144 stars 29 forks source link

Unable to compile it on Ubuntu 18.04 #3

Open stoyanovgeorge opened 6 years ago

stoyanovgeorge commented 6 years ago

I have tried to compile it on Ubuntu 18.04 LTS stable and this is the output:

$ make
[  1%] Built target aom_rtcd
[  2%] Built target aom_av1_common_ssse3_intrinsics
[  3%] Built target aom_av1_encoder_sse2_intrinsics
[  4%] Built target webm
[ 12%] Built target aom_av1_common
[ 17%] Built target yuv
[ 19%] Built target aom_dsp_encoder_avx2_intrinsics
[ 20%] Built target aom_dsp_encoder_sse4_1_intrinsics
[ 30%] Built target aom_av1_encoder
[ 31%] Built target aom_dsp_common_sse4_1_intrinsics
[ 33%] Built target aom_av1_common_sse4_intrinsics
[ 34%] Built target aom_common_app_util
[ 34%] Built target aom_decoder_app_util
[ 35%] Built target aom_dsp_common_sse2_intrinsics
[ 37%] Built target aom_av1_decoder
[ 38%] Built target aom_dsp_decoder
[ 39%] Built target aom_dsp_common_avx2_intrinsics
[ 42%] Built target aom_dsp_encoder
[ 43%] Built target aom_scale
[ 43%] Built target aom_av1_encoder_ssse3_intrinsics
[ 45%] Built target aom_dsp_encoder_sse2_intrinsics
[ 47%] Built target aom_dsp_common
[ 48%] Built target aom_dsp_common_ssse3_intrinsics
[ 49%] Built target aom_av1_common_sse2_intrinsics
[ 50%] Built target aom_util
[ 51%] Built target aom_av1_encoder_sse4_intrinsics
[ 52%] Built target aom_av1_encoder_avx2_intrinsics
[ 52%] Built target aom_av1_common_avx2_intrinsics
[ 52%] Built target aom_mem
[ 53%] Built target aom_dsp_encoder_ssse3_intrinsics
[ 54%] Built target aom_dsp
[ 63%] Built target aom
[ 64%] Linking CXX executable examples/decode_with_drops
/usr/bin/x86_64-linux-gnu-ld: libaom.a(fwd_txfm_ssse3_x86_64.asm.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: libaom.a(quantize_ssse3_x86_64.asm.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: libaom.a(subpel_variance_sse2.asm.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: libaom.a(highbd_subpel_variance_impl_sse2.asm.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: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
CMakeFiles/decode_with_drops.dir/build.make:155: recipe for target 'examples/decode_with_drops' failed
make[2]: *** [examples/decode_with_drops] Error 1
CMakeFiles/Makefile2:936: recipe for target 'CMakeFiles/decode_with_drops.dir/all' failed
make[1]: *** [CMakeFiles/decode_with_drops.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
stoyanovgeorge commented 6 years ago

I have found out what the problem is. I needed to re-compile the package with gcc-5.4 which doesn't have by default the --enable-default-pie option enabled.

Zibri commented 5 years ago

More simple solution:

cat <<ZIBRI >>CMakeCache.txt
CMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
ZIBRI

then do cmake . then sudo make install

luctrudeau commented 5 years ago

Hi @stoyanovgeorge and @Zibri

if i'm not mistaken, this is an old prototype repository of AOM AV1 that was planned to be integrated into Firefox. The actual AOM AV1 repository can be found at https://aomedia.googlesource.com/aom/+/master

stoyanovgeorge commented 5 years ago

Thanks for the reply and the link @luctrudeau