Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BSEC 2.4.0.0 errors when installing BME68x library for Python

    BSEC 2.4.0.0 errors when installing BME68x library for Python

    fabioCarfi95
    Member

    I'm trying to install bme68x on 64-bit architecture Raspberry Pi 4.

    I tryied to use the BSEC 2.4.0.0 downloaded from your webpage and I followed all the steps explained in this repository but I get some errors when launching the setup.py installation. Following the screenshot of the error I get

    249394534-346174d7-1de0-48bd-bd60-63d14fc947bb.png

    Can you help me?

    12 REPLIES 12

    BSTRobin
    Community Moderator
    Community Moderator

    Hi fabioCarfi95,

    Could we know your host architecture for your Raspberry Pi 4? If it is ARMV8 architecture, you should use the library "BSEC2.4.0.0_Generic_Release_23012023\algo\normal_version\bin\RaspberryPi\PiFour_Armv8\libalgobsec.a".

    The host architecture is an aarch64.

    Using the uname -a  CLI command I get this: "linux ubuntu 5.4.0-1089-raspi #100-Ubuntu SMP PREEMPT ... aarch64 aarch64 aarch64 GNU/Linux"

    I also tryied changing the the directory to PiFour_Armv8, as you suggested, but I get this errors:

    "aarch64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-aarch64-3.8/bme68xmodule.o build/temp.linux-aarch64-3.8/BME68x-Sensor-API/bme68x.o build/temp.linux-aarch64-3.8/internal_functions.o -L/usr/local/lib -LBSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8 -lpthread -lm -lrt -lalgobsec -o build/lib.linux-aarch64-3.8/bme68x.cpython-38-aarch64-linux-gnu.so
    /usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(bsec_codegen_do_steps.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
    BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(bsec_codegen_do_steps.o): in function `bsec_codegen_do_steps':
    bsec_codegen_do_steps.c:(.text+0x7c): dangerous relocation: unsupported relocation
    /usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(bsec_codegen_do_steps.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
    bsec_codegen_do_steps.c:(.text+0x1a0): dangerous relocation: unsupported relocation
    /usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(bsec_codegen_do_steps.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
    bsec_codegen_do_steps.c:(.text+0x254): dangerous relocation: unsupported relocation
    /usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(bsec_codegen_sensor_control.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
    BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(bsec_codegen_sensor_control.o): in function `bsec_codegen_sensor_control':
    bsec_codegen_sensor_control.c:(.text+0x1a0): dangerous relocation: unsupported relocation
    /usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(bsec_codegen_update_subscription.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
    BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(bsec_codegen_update_subscription.o): in function `bsec_codegen_update_subscription':
    bsec_codegen_update_subscription.c:(.text+0x70): dangerous relocation: unsupported relocation
    /usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(bsec_codegen_update_subscription.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `iv1' which may bind externally can not be used when making a shared object; recompile with -fPIC
    bsec_codegen_update_subscription.c:(.text+0xe8): dangerous relocation: unsupported relocation
    /usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(bsec_codegen_update_subscription.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
    bsec_codegen_update_subscription.c:(.text+0xf0): dangerous relocation: unsupported relocation
    /usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(bsec_codegen_update_subscription.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
    bsec_codegen_update_subscription.c:(.text+0x310): dangerous relocation: unsupported relocation
    /usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(bsec_codegen_update_subscription.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
    bsec_codegen_update_subscription.c:(.text+0x39c): dangerous relocation: unsupported relocation
    /usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
    BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): in function `bsec_Bsec_applyUpdateSubscription.part.0':
    Bsec.c:(.text+0x20): dangerous relocation: unsupported relocation
    /usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
    Bsec.c:(.text+0x80): dangerous relocation: unsupported relocation
    /usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `iv' which may bind externally can not be used when making a shared object; recompile with -fPIC
    Bsec.c:(.text+0x84): dangerous relocation: unsupported relocation
    /usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.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
    Bsec.c:(.text+0xfc): dangerous relocation: unsupported relocation
    /usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.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
    BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): in function `bsec_Bsec_checkIfSensorRequired':
    Bsec.c:(.text+0x1e4): dangerous relocation: unsupported relocation
    /usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
    BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): in function `bsec_Bsec_checkSamplIntvlCompatibility':
    Bsec.c:(.text+0x264): dangerous relocation: unsupported relocation
    /usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
    Bsec.c:(.text+0x2ec): dangerous relocation: unsupported relocation
    /usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
    Bsec.c:(.text+0x354): dangerous relocation: unsupported relocation
    /usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
    BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): in function `bsec_Bsec_requestOutput':
    Bsec.c:(.text+0x7d4): dangerous relocation: unsupported relocation
    /usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
    BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): in function `bsec_Bsec_setHyperConfiguration':
    Bsec.c:(.text+0xb14): dangerous relocation: unsupported relocation
    /usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.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
    BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): in function `bsec_Bsec_setSensorOpMode':
    Bsec.c:(.text+0xd14): dangerous relocation: unsupported relocation
    /usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
    BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): in function `bsec_b_Bsec_setHyperConfiguration':
    Bsec.c:(.text+0xf94): dangerous relocation: unsupported relocation
    /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 `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
    BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(ChannelHub.o): in function `bsec_ChannelHub_do':
    ChannelHub.c:(.text+0x188): dangerous relocation: unsupported relocation
    /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 `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
    ChannelHub.c:(.text+0x34c): dangerous relocation: unsupported relocation
    /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 `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
    BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(ChannelHub.o): in function `bsec_ChannelHub_getOutput':
    ChannelHub.c:(.text+0x9f4): dangerous relocation: unsupported relocation
    /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
    BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(ChannelHub.o): in function `bsec_ChannelHub_recalculateDownsampling':
    ChannelHub.c:(.text+0xa5c): dangerous relocation: unsupported relocation
    /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
    BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(ChannelHub.o): in function `bsec_ChannelHub_setInput':
    ChannelHub.c:(.text+0xd38): dangerous relocation: unsupported relocation
    /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 `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
    BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(ChannelHub.o): in function `bsec_ChannelHub_updateOutputSamplIntvl':
    ChannelHub.c:(.text+0xe08): dangerous relocation: unsupported relocation
    /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 `iv' which may bind externally can not be used when making a shared object; recompile with -fPIC
    ChannelHub.c:(.text+0xe14): dangerous relocation: unsupported relocation
    /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 `iv1' which may bind externally can not be used when making a shared object; recompile with -fPIC
    ChannelHub.c:(.text+0xe84): dangerous relocation: unsupported relocation
    /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
    collect2: error: ld returned 1 exit status
    error: command 'aarch64-linux-gnu-gcc' failed with exit status 1"

     

    What is it about?

    kmca
    Established Member

    In this instance the PI is running a 64 bit OS, and the BSEC library although it includes an ARM V8 directory it is a 32bit library that is provided.  There are various approaches to running 32 bit code on 64 bit linux , but add in the Python 32/64 and the PI3G C wrapper and you could waste a lot of time trying.  

    My question for BSTRobin is will BOSCH Sensortec be creating a 64bit BSEC library for the  PI as the 64bit OS is becoming a more popular choice.

    Regards

    Keith

     

    BSTRobin
    Community Moderator
    Community Moderator

    Hi fabioCarfi95,

    The host architecture is the core of MPU, not compiler information.
    In addtion, we would like to know your compiler information. You can run "aarch64-linux-gnu-gcc -v" command to display your compiler information.

    Hi fabioCarfi95,kmca,

    There is already a 64 bit Linux BSEC library libalgobsec.a in the BSEC directory "BSEC2.4.0.0_Generic_Release_23012023\algo\normal_version\bin\gcc\Linux\m64", and I am not sure if this is what you need, so I need you to provide detailed information on the host architecture and compiler information.

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist