build error

LD -o .build_release/lib/
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/5/…/…/…/x86_64-linux-gnu/libturbojpeg.a(libturbojpeg_la-turbojpeg.o): relocation R_X86_64_32 against `.data’ can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/5/…/…/…/x86_64-linux-gnu/libturbojpeg.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:605: recipe for target ‘.build_release/lib/’ failed
make: *** [.build_release/lib/] Error 1

Hi, I’m seeking my mistake. The libturbojpeg.a has some problems…
I already added the -fPIC option, but same error is still exist.
I’m waiting for answers. Thank you.


It looks like you try to compile nvCaffe-0.16 on an x86 machine.
Is this correct?

Here is a tutorial for compiling nvCaffe-0.15 on Jetson (similar to nvCaffe-0.16) for your reference: