Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BME680 BSEC ESP32 ESP-IDF Build Errors

    BME680 BSEC ESP32 ESP-IDF Build Errors

    eugenyd
    New Poster

    My project linked BSEC same as: https://community.bosch-sensortec.com/t5/MEMS-sensors-forum/Linking-BSEC-library-to-ESP-IDF-for-BME6...
    My build erros:
    Generated D:/Projects/ehaw1/build/bootloader/bootloader.bin
    [5/6] cmd.exe /C "cd . && C:\espressif\tools\xtensa-esp32-elf\esp-2019r2-8.2.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-g++.exe -mlongcalls -Wno-frame-address -nostdlib @CMakeFiles\app-template.elf.rsp -o app-template.elf && cd ."
    FAILED: app-template.elf
    cmd.exe /C "cd . && C:\espressif\tools\xtensa-esp32-elf\esp-2019r2-8.2.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-g++.exe -mlongcalls -Wno-frame-address -nostdlib @CMakeFiles\app-template.elf.rsp -o app-template.elf && cd ."
    c:/espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:/Projects/ehaw1/components/BSEC/lib\libalgobsec.a(GasHumidityBaselineTracker.o):(.text.bsec_GasHumidityBaselineTracker_updateInterfaceDependency+0x14): undefined reference to `fabsf'
    c:/espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:/Projects/ehaw1/components/BSEC/lib\libalgobsec.a(GasHumidityBaselineTracker.o):(.text.bsec_GasHumidityBaselineTracker_updateInterfaceDependency+0x18): undefined reference to `floorf'
    c:/espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:/Projects/ehaw1/components/BSEC/lib\libalgobsec.a(GasHumidityBaselineTracker.o): in function `bsec_GasHumidityBaselineTracker_updateInterfaceDependency':
    GasHumidityBaselineTracker.c:(.text.bsec_GasHumidityBaselineTracker_updateInterfaceDependency+0x9f): undefined reference to `fabsf'
    c:/espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: GasHumidityBaselineTracker.c:(.text.bsec_GasHumidityBaselineTracker_updateInterfaceDependency+0xf1): undefined reference to `floorf'
    c:/espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:/Projects/ehaw1/components/BSEC/lib\libalgobsec.a(IaqEstimator.o): in function `bsec_IaqEstimator_updateInterfaceDependency':
    IaqEstimator.c:(.text.bsec_IaqEstimator_updateInterfaceDependency+0x6c): undefined reference to `fabsf'
    c:/espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:/Projects/ehaw1/components/BSEC/lib\libalgobsec.a(bsec_codegen_update_subscription.o):(.text.bsec_codegen_update_subscription+0x30): undefined reference to `roundf'
    c:/espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:/Projects/ehaw1/components/BSEC/lib\libalgobsec.a(bsec_codegen_update_subscription.o): in function `bsec_codegen_update_subscription':
    bsec_codegen_update_subscription.c:(.text.bsec_codegen_update_subscription+0x156): undefined reference to `roundf'
    c:/espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:/Projects/ehaw1/components/BSEC/lib\libalgobsec.a(HumidityTemperatureCorrector.o):(.text.bsec_HumidityTemperatureCorrector_updateInterfaceDependency+0x8): undefined reference to `fminf'
    c:/espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:/Projects/ehaw1/components/BSEC/lib\libalgobsec.a(HumidityTemperatureCorrector.o):(.text.bsec_HumidityTemperatureCorrector_updateInterfaceDependency+0xc): undefined reference to `sinf'
    c:/espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:/Projects/ehaw1/components/BSEC/lib\libalgobsec.a(HumidityTemperatureCorrector.o): in function `bsec_HumidityTemperatureCorrector_updateInterfaceDependency':
    HumidityTemperatureCorrector.c:(.text.bsec_HumidityTemperatureCorrector_updateInterfaceDependency+0x43): undefined reference to `fminf'
    c:/espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: HumidityTemperatureCorrector.c:(.text.bsec_HumidityTemperatureCorrector_updateInterfaceDependency+0x5b): undefined reference to `sinf'
    c:/espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:/Projects/ehaw1/components/BSEC/lib\libalgobsec.a(bsec_codegen_rtwutil.o):(.text.bsec_rt_roundd+0x8): undefined reference to `fabs'
    c:/espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:/Projects/ehaw1/components/BSEC/lib\libalgobsec.a(bsec_codegen_rtwutil.o):(.text.bsec_rt_roundd+0xc): undefined reference to `floor'
    c:/espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:/Projects/ehaw1/components/BSEC/lib\libalgobsec.a(bsec_codegen_rtwutil.o):(.text.bsec_rt_roundd+0x10): undefined reference to `ceil'
    c:/espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:/Projects/ehaw1/components/BSEC/lib\libalgobsec.a(bsec_codegen_rtwutil.o):(.text.bsec_rt_roundd+0x1b): undefined reference to `fabs'
    c:/espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:/Projects/ehaw1/components/BSEC/lib\libalgobsec.a(bsec_codegen_rtwutil.o): in function `bsec_rt_roundd':
    bsec_codegen_rtwutil.c:(.text.bsec_rt_roundd+0x55): undefined reference to `floor'
    c:/espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: bsec_codegen_rtwutil.c:(.text.bsec_rt_roundd+0x84): undefined reference to `ceil'
    c:/espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:/Projects/ehaw1/components/BSEC/lib\libalgobsec.a(log10.o):(.text.bsec_log10+0x0): undefined reference to `log10f'
    c:/espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:/Projects/ehaw1/components/BSEC/lib\libalgobsec.a(log10.o): in function `bsec_log10':
    log10.c:(.text.bsec_log10+0xa): undefined reference to `log10f'
    c:/espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:/Projects/ehaw1/components/BSEC/lib\libalgobsec.a(sqrt.o):(.text.bsec_b_sqrt+0x0): undefined reference to `sqrtf'
    c:/espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:/Projects/ehaw1/components/BSEC/lib\libalgobsec.a(sqrt.o): in function `bsec_b_sqrt':
    sqrt.c:(.text.bsec_b_sqrt+0xa): undefined reference to `sqrtf'
    c:/espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:/Projects/ehaw1/components/BSEC/lib\libalgobsec.a(applyScalarFunctionInPlace.o): in function `bsec_applyScalarFunctionInPlace':
    applyScalarFunctionInPlace.c:(.text.bsec_applyScalarFunctionInPlace+0xa): undefined reference to `sqrtf'
    c:/espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:/Projects/ehaw1/components/BSEC/lib\libalgobsec.a(sin.o): in function `bsec_sin':
    sin.c:(.text.bsec_sin+0xa): undefined reference to `sinf'
    collect2.exe: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.
    Build complete (23 errors, 0 warnings):

    1 REPLY 1

    Vincent
    Community Moderator
    Community Moderator

    it looks like the math lib is missing in your complier.  please double check if you include correct math lib in your project or environment.

    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