05-14-2020 05:58 PM
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):
05-15-2020 01:26 AM
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.