-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Enabling CONFIG_BT_AUDIO with no (audio) services enabled causes build error #37770
Comments
Is this really related to #38403 ? #38403 is because the cleanup in #37512 results in warning in several samples when building those in their default setup.
It's not an error, it's a warning. And in this case it sounds to me like the has only partially configured a feature. To me that sounds like A user who does To me the only other good alternative seems to be if enabling |
They are related in my opinion, even if they need different solutions.
That may be the case later, or perhaps BT_AUDIO will be a "hidden" config that is enabled if any of the subconfigs are enabled. |
yes, I took a deeper look into this, and it is introduced with this commit: 2371284 from same PR, #37512. So I agree they are then related. Seems @dcpleung just went ahead and added What we should strive towards is some clear and logical libraries, and avoid using So #37512 is good in creating libs where things were placed in |
seems 2371284 was the only glitch in this regard. |
Since all the indicated source files are compiled only if certain kconfigs are enabled, we can use the ALLOW_EMPTY property to suppress the warning. As for subsys/bluetooth, I thought about having one big bluetooth subsys library. But since every subdirectories define their own library, I was simply following the convention there. Maybe it's time to group all subsys/bluetooth into one big library? |
This was exactly my concern raised here, if introducing such property:
That property is intended for special cases, in general we should avoid such situations. |
That was actually part of a big cleanup I tried to long time ago: 8a23d85 (from #8451) So i'm all in favor of continuing that process, but in smaller steps this time. and not: |
@Thalley not convinced this is actually an issue. Printing a warning is not an error if it informs the user of a potential misconfiguration. Because i'm not familiar with bluetooth audio I have some questions.
The summary of the above indicates to me that printing a warning when BT_AUDIO is enabled but no files are placed in the library is correct, as bluetooth audio is not functional in the system in this case. Please correct me if my observation is wrong. If a downstream project is relying on Similar to what is done in entropy, where Zephyr provides the library here: zephyr/drivers/entropy/CMakeLists.txt Line 3 in 9e2b9c7
but in the sdk-nrf downstream project, it may happen that no files are added to the lib by Zephyr itself, instead this is done in the downstream project, here:
If you have a similar use-case for audio, then ensure to add something to the |
@tejlmand Your observation is correct.
We can probably leave this as is for now (unless the error is too much of a problem), but otherwise it will likely be fixed in the future when we start moving the |
@Thalley thanks for pointing my attention to the And I do see the issue arising there, as zephyr/subsys/bluetooth/host/CMakeLists.txt Line 125 in e40e2df
https://github.com/zephyrproject-rtos/zephyr/blob/topic-le-audio/subsys/bluetooth/host/audio/CMakeLists.txt I assume the In that case I think we should close this issue as an issue because when it appears on so that the bluetooth subsys has only a single, or few logically named libraries. |
It's still just a warning:
and it is ignored by CI. |
Correct. I am fine by closing this issue if it causes conflicts with bug cleanup for the LTS release. It does, however, still serve as a reminder that something needs to be done w.r.t. the Kconfig an LE Audio, which we hope to get upstreamed to the |
@tejlmand I was just pinged by @carlescufi for this issue. What do you suggest we do about it? We can close it as you suggested, or we can fix it. The easiest fix I can think of, is to make What are your thoughts? |
@Thalley I think we should change this from a bug to something else, so that we can consider the appropriate way to handle this before Not sure exactly what it should be turned into, as it's not a bug, neither an enhancement. |
Once BAPS have been upstreamed, we should revisit this and refactor the BT_AUDIO Kconfig. |
Will be fixed as part of upstreaming BAPS #41190 |
Describe the bug
If
CONFIG_BT_AUDIO
is enabled, but none of the services (e.g. CONFIG_BT_VCS, CONFIG_BT_MICS) or clients are enabled, then we get a build error statingBecause the directory's CMakeLists.txt only has conditionally enabled source files.
To Reproduce
Build e.g. the BT shell project with CONFIG_BT_AUDIO=y and none of the services/clients from
subsys/bluetooth/audio/CMakeLists.txt
enabled.Expected behavior
If nothing BLE audio related is enabled but CONFIG_BT_AUDIO=y it should still build without error.
Impact
Very minor, as CONFIG_BT_AUDIO can just be disabled.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: