Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    BME688 BSEC2.2.0.0 pi3g segmentation fault

    BME688 BSEC2.2.0.0 pi3g segmentation fault

    Established Member

    I adapted the pi3g library for reading the values of a sensor with a raspberry pi. To do so I changed the BSEC_SAMPLE_RATE_HIGH_PERFORMANCE to BSEC_SAMPLE_RATE_SCAN and the BSEC_OUTPUT_COMPENSATED_GAS was commented out in the switch and removed from the virtual sensor array (also shifted the last virtual sensor of 1 position because of that).

    After that I installed everything following the pi3g instruction but when running the program to take samples to then pass to the bme ai studio software in goes into segmentation fault. I checked the issue on github and updated the amount of memory allocated for the process and the number of core as suggested there, but nothing seems to change. 

    After that i tried to check what the Raspberry Pi 400 runs and it seems that the architecture is an ARMV8, so i tried to change the configuration of the to use the PiThree_ARMV8 instead of the default PiThree_ARMV6 and now i'm stuck on this compilation problem:

    /usr/bin/ld: BSEC_2.2.0.0_Generic_Release_30052022/algo/normal_version/bin/RaspberryPi/PiThree_ArmV8/libalgobsec.a(GasHumidityBaselineTracker.o)(.text+0x20e4): unresolvable R_ARM_CALL relocation against symbol `truncf@@GLIBC_2.4'
    /usr/bin/ld: final link failed: symbol needs debug section which does not exist
    collect2: error: ld returned 1 exit status
    error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

    Checking on stack overflow it seems like some flags are missing for the gcc so i'll try that, but in the meantime i'd like to know if someone faced the same issue i'm facing and was able to overcome it.

    11 REPLIES 11

    Community Moderator
    Community Moderator

    Hi Prop4et,

    We're not familiar with your platform. If you need to run BSEC library on your platform, you need to provide us with detailed information about your host architecture and compiler information, then we provide the corresponding BSEC library to you. If you run the example code, you need to refer to them strictly.

    Community Moderator
    Community Moderator

    Since there was no feedback for a long time, we close this topic first. You could update feedback in the future if you have.