elucideye / acf

Aggregated Channel Feature object detection in C++ and OpenGL ES 2.0 based on https://github.com/pdollar/toolbox
BSD 3-Clause "New" or "Revised" License
49 stars 20 forks source link

acf shared library link ogles_gpgpu errors #104

Closed BourneYin closed 5 years ago

BourneYin commented 5 years ago

I try to build the libs for x86 linux with command: export TOOLCHAIN=cxx11 polly.py --toolchain ${TOOLCHAIN} --install --verbose And build out the libacf.a  Successfully. But, Curiously, when I try to build ACF as a single shared library with command polly.py --toolchain ${TOOLCHAIN} --fwd ACF_BUILD_SHARED_SDK=ON --install --verbose

There is eorrs on linking: /usr/bin/ld: /home/bourne/.hunter/_Base/e7fe3f0/91dc4f7/a0274a8/Install/lib/libogles_gpgpud.a(memtransfer.cpp.o): relocation R_X86_64_PC32 against symbol `_ZTVN11ogles_gpgpu11MemTransferE' can not be used when making a shared object; recompile with -fPIC

It means should pass -fPIC to gles_gpgpu? and How?

ruslo commented 5 years ago

To build all third parties with PIC, you have to use toolchain, example:

Alternatively, you can build all libraries as shared:

BourneYin commented 5 years ago

To build all third parties with PIC, you have to use toolchain, example:

Alternatively, you can build all libraries as shared:

Thanks very much!