espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.81k stars 7.32k forks source link

nimBLE compilation error when CONFIG_BT_NIMBLE_MAX_BONDS == 0 (IDFGH-13867) #14712

Open KaeLL opened 1 month ago

KaeLL commented 1 month ago

Answers checklist.

General issue report

Setting CONFIG_BT_NIMBLE_MAX_BONDS to 0 (a valid value) results in

/esp-idf/components/bt/host/nimble/nimble/nimble/host/store/config/src/ble_store_config.c: In function 'ble_store_config_delete_local_irk':
/esp-idf/components/bt/host/nimble/nimble/nimble/host/store/config/src/ble_store_config.c:732:10: error: implicit declaration of function 'ble_store_config_delete_obj'; did you mean 'ble_store_config_delete_cccd'? [-Wimplicit-function-declaration]
  732 |     rc = ble_store_config_delete_obj(ble_store_config_local_irks,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |          ble_store_config_delete_cccd
/esp-idf/components/bt/host/nimble/nimble/nimble/host/store/config/src/ble_store_config.c: In function 'ble_store_config_delete_rpa_rec':
/esp-idf/components/bt/host/nimble/nimble/nimble/host/store/config/src/ble_store_config.c:878:11: error: implicit declaration of function 'ble_store_config_find_rpa_rec'; did you mean 'ble_store_config_read_rpa_rec'? [-Wimplicit-function-declaration]
  878 |     idx = ble_store_config_find_rpa_rec(key_rpa_rec);
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |           ble_store_config_read_rpa_rec

Also, almost entirely unrelated: https://github.com/espressif/esp-idf/blob/6e5a178b3120dced7fa5c29c655cc22ea182df3d/components/bt/host/nimble/Kconfig.in#L172

rahult-github commented 1 month ago

Hi @KaeLL ,

Thanks for reporting. The attached patch should help fix the issue . You can give it a try. The patch goes in $IDF_PATH/components/bt/host/nimble/nimble path

fix_compilation_issue.txt

Also, almost entirely unrelated:

Noted. will fix this too.