Skip to content

fix(nimble): Fix undefined reference in ble_hs_deinit when GATT Server is disabled #107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: nimble-1.6.0-idf
Choose a base branch
from

Conversation

iranl
Copy link

@iranl iranl commented Jul 20, 2025

Description

Since commit 45352c4 compilation of the https://github.com/espressif/esp-idf/tree/master/examples/bluetooth/nimble/blecent example with

CONFIG_BT_NIMBLE_GATT_SERVER=n  #Will also be disabled when CONFIG_BT_NIMBLE_ROLE_PERIPHERAL=n
CONFIG_EXAMPLE_INIT_DEINIT_LOOP=y

will fail with

/home/root/.espressif/tools/xtensa-esp-elf/esp-14.2.0_20241119/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/bt/libbt.a(ble_hs.c.obj):(.literal.ble_hs_deinit+0x4): undefined reference to `ble_gatts_stop'
/home/root/.espressif/tools/xtensa-esp-elf/esp-14.2.0_20241119/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/bt/libbt.a(ble_hs.c.obj): in function `ble_hs_deinit':
/home/root/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_hs.c:933:(.text.ble_hs_deinit+0x4b): undefined reference to `ble_gatts_stop'

Related

Testing

Example builds succesfully with this change


Checklist

Before submitting a Pull Request, please ensure the following:

  • 🚨 This PR does not introduce breaking changes.
  • All CI checks (GH Actions) pass.
  • Documentation is updated as needed.
  • Tests are updated or added as necessary.
  • Code is well-commented, especially in complex areas.
  • Git history is clean — commits are squashed to the minimum necessary.

@CLAassistant
Copy link

CLAassistant commented Jul 20, 2025

CLA assistant check
All committers have signed the CLA.

@rahult-github
Copy link
Collaborator

rahult-github commented Jul 21, 2025

Hi @iranl ,

Thank you for the fix. Will integrate it.

update: There is a extra fix needed. i will add it up.

espressif-bot pushed a commit that referenced this pull request Jul 29, 2025
Code was not under correct flag. Hence if flag is disabled, then
compilation warnings are observed. Fixed the same

Based on PR : #107
espressif-bot pushed a commit that referenced this pull request Jul 29, 2025
Code was not under correct flag. Hence if flag is disabled, then
compilation warnings are observed. Fixed the same

Based on PR : #107
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants