Skip to content

Issue with shared lib in setup.py when using Pi4 with PiFour_Armv8 BSEC 2.4.4 Library #21

@ahmadnav

Description

@ahmadnav

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions