[x265] trying to compile a JNI shared lib on linux - libx265.a(cpu-a.asm.o): relocation R_X86_64_PC32
Zoff
zoff at zoff.cc
Sat Nov 30 19:03:24 UTC 2024
Hi!
i am trying to compile x265 encoder library for linux (amd64) as a static lib and then
making a shared JNI lib for java with it.
if i do this:
git clone https://bitbucket.org/multicoreware/x265_git.git
cd x265_git/
git checkout 1d117bed4747758b51bd2c124d738527e30392cb
cmake . -DCMAKE_INSTALL_PREFIX="$_INST_" -DNATIVE_BUILD=ON -DENABLE_PIC=ON
everything works fine, but the i don't get asm optimizations.
if i do this:
cmake . -DCMAKE_INSTALL_PREFIX="$_INST_" -DNATIVE_BUILD=ON -DENABLE_PIC=ON -DENABLE_ASSEMBLY=ON
and the link my final JNI lib i get this error:
libx265.a(cpu-a.asm.o): relocation R_X86_64_PC32 against symbol `x265_intel_cpu_indicator_init' can not be used when making a shared object; recompile with -fPIC
to the best of my knowledge everything is compiled with FPIC. any ideas why this is not working?
cheers,
Zoff.
More information about the x265-devel
mailing list