Error:
/usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(ChannelHub.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv2' which may bind externally can not be used when making a shared object; recompile with -fPIC
ChannelHub.c:(.text+0xe88): dangerous relocation: unsupported relocation
We cannot use the PiThree v6 and v8 libs in pi4 aarch64.
Recreate by setting lib_dirs to lib_dirs = ['/usr/local/lib',
'BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8']
and running sudo python3 setup.py install
The main issue seems to be that libalgobsec.a is not compiled with the -fpic flag a compiler directive to output position independent code, a characteristic required by shared libraries.