Another build failure with a2dp disabled

From: Bastien Nocera <hadess@hadess.net>
Date: 2025-12-15 09:36:37

Hey,

We probably need to add this selection of options to the CI. I found
this using the meson build system, but it also applies to autotools.

Cheers

$ ./bootstrap-configure --disable-a2dp && make
[...]
profiles/audio/media.c: In function ‘media_player_destroy’:
profiles/audio/media.c:2010:17: error: implicit declaration of function ‘avrcp_unregister_player’ [-Wimplicit-function-declaration]
 2010 |                 avrcp_unregister_player(player);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/media.c: At top level:
profiles/audio/media.c:2282:15: error: variable ‘player_cb’ has initializer but incomplete type
 2282 | static struct avrcp_player_cb player_cb = {
      |               ^~~~~~~~~~~~~~~
profiles/audio/media.c:2283:10: error: ‘struct avrcp_player_cb’ has no member named ‘list_settings’
 2283 |         .list_settings = media_player_list_settings,
      |          ^~~~~~~~~~~~~
profiles/audio/media.c:2283:26: error: excess elements in struct initializer [-Werror]
 2283 |         .list_settings = media_player_list_settings,
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/media.c:2283:26: note: (near initialization for ‘player_cb’)
profiles/audio/media.c:2284:10: error: ‘struct avrcp_player_cb’ has no member named ‘get_setting’
 2284 |         .get_setting = media_player_get_setting,
      |          ^~~~~~~~~~~
profiles/audio/media.c:2284:24: error: excess elements in struct initializer [-Werror]
 2284 |         .get_setting = media_player_get_setting,
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/media.c:2284:24: note: (near initialization for ‘player_cb’)
profiles/audio/media.c:2285:10: error: ‘struct avrcp_player_cb’ has no member named ‘set_setting’
 2285 |         .set_setting = media_player_set_setting,
      |          ^~~~~~~~~~~
profiles/audio/media.c:2285:24: error: excess elements in struct initializer [-Werror]
 2285 |         .set_setting = media_player_set_setting,
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/media.c:2285:24: note: (near initialization for ‘player_cb’)
profiles/audio/media.c:2286:10: error: ‘struct avrcp_player_cb’ has no member named ‘list_metadata’
 2286 |         .list_metadata = media_player_list_metadata,
      |          ^~~~~~~~~~~~~
profiles/audio/media.c:2286:26: error: excess elements in struct initializer [-Werror]
 2286 |         .list_metadata = media_player_list_metadata,
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/media.c:2286:26: note: (near initialization for ‘player_cb’)
profiles/audio/media.c:2287:10: error: ‘struct avrcp_player_cb’ has no member named ‘get_uid’
 2287 |         .get_uid = media_player_get_uid,
      |          ^~~~~~~
profiles/audio/media.c:2287:20: error: excess elements in struct initializer [-Werror]
 2287 |         .get_uid = media_player_get_uid,
      |                    ^~~~~~~~~~~~~~~~~~~~
profiles/audio/media.c:2287:20: note: (near initialization for ‘player_cb’)
profiles/audio/media.c:2288:10: error: ‘struct avrcp_player_cb’ has no member named ‘get_metadata’
 2288 |         .get_metadata = media_player_get_metadata,
      |          ^~~~~~~~~~~~
profiles/audio/media.c:2288:25: error: excess elements in struct initializer [-Werror]
 2288 |         .get_metadata = media_player_get_metadata,
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/media.c:2288:25: note: (near initialization for ‘player_cb’)
profiles/audio/media.c:2289:10: error: ‘struct avrcp_player_cb’ has no member named ‘get_position’
 2289 |         .get_position = media_player_get_position,
      |          ^~~~~~~~~~~~
profiles/audio/media.c:2289:25: error: excess elements in struct initializer [-Werror]
 2289 |         .get_position = media_player_get_position,
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/media.c:2289:25: note: (near initialization for ‘player_cb’)
profiles/audio/media.c:2290:10: error: ‘struct avrcp_player_cb’ has no member named ‘get_duration’
 2290 |         .get_duration = media_player_get_duration,
      |          ^~~~~~~~~~~~
profiles/audio/media.c:2290:25: error: excess elements in struct initializer [-Werror]
 2290 |         .get_duration = media_player_get_duration,
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/media.c:2290:25: note: (near initialization for ‘player_cb’)
profiles/audio/media.c:2291:10: error: ‘struct avrcp_player_cb’ has no member named ‘get_status’
 2291 |         .get_status = media_player_get_status,
      |          ^~~~~~~~~~
profiles/audio/media.c:2291:23: error: excess elements in struct initializer [-Werror]
 2291 |         .get_status = media_player_get_status,
      |                       ^~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/media.c:2291:23: note: (near initialization for ‘player_cb’)
profiles/audio/media.c:2292:10: error: ‘struct avrcp_player_cb’ has no member named ‘get_name’
 2292 |         .get_name = media_player_get_player_name,
      |          ^~~~~~~~
profiles/audio/media.c:2292:21: error: excess elements in struct initializer [-Werror]
 2292 |         .get_name = media_player_get_player_name,
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/media.c:2292:21: note: (near initialization for ‘player_cb’)
profiles/audio/media.c:2293:10: error: ‘struct avrcp_player_cb’ has no member named ‘play’
 2293 |         .play = media_player_play,
      |          ^~~~
profiles/audio/media.c:2293:17: error: excess elements in struct initializer [-Werror]
 2293 |         .play = media_player_play,
      |                 ^~~~~~~~~~~~~~~~~
profiles/audio/media.c:2293:17: note: (near initialization for ‘player_cb’)
profiles/audio/media.c:2294:10: error: ‘struct avrcp_player_cb’ has no member named ‘stop’
 2294 |         .stop = media_player_stop,
      |          ^~~~
profiles/audio/media.c:2294:17: error: excess elements in struct initializer [-Werror]
 2294 |         .stop = media_player_stop,
      |                 ^~~~~~~~~~~~~~~~~
profiles/audio/media.c:2294:17: note: (near initialization for ‘player_cb’)
profiles/audio/media.c:2295:10: error: ‘struct avrcp_player_cb’ has no member named ‘pause’
 2295 |         .pause = media_player_pause,
      |          ^~~~~
profiles/audio/media.c:2295:18: error: excess elements in struct initializer [-Werror]
 2295 |         .pause = media_player_pause,
      |                  ^~~~~~~~~~~~~~~~~~
profiles/audio/media.c:2295:18: note: (near initialization for ‘player_cb’)
profiles/audio/media.c:2296:10: error: ‘struct avrcp_player_cb’ has no member named ‘next’
 2296 |         .next = media_player_next,
      |          ^~~~
profiles/audio/media.c:2296:17: error: excess elements in struct initializer [-Werror]
 2296 |         .next = media_player_next,
      |                 ^~~~~~~~~~~~~~~~~
profiles/audio/media.c:2296:17: note: (near initialization for ‘player_cb’)
profiles/audio/media.c:2297:10: error: ‘struct avrcp_player_cb’ has no member named ‘previous’
 2297 |         .previous = media_player_previous,
      |          ^~~~~~~~
profiles/audio/media.c:2297:21: error: excess elements in struct initializer [-Werror]
 2297 |         .previous = media_player_previous,
      |                     ^~~~~~~~~~~~~~~~~~~~~
profiles/audio/media.c:2297:21: note: (near initialization for ‘player_cb’)
profiles/audio/media.c: In function ‘set_status’:
profiles/audio/media.c:2327:9: error: implicit declaration of function ‘avrcp_player_event’ [-Wimplicit-function-declaration]
 2327 |         avrcp_player_event(mp->player, AVRCP_EVENT_STATUS_CHANGED, mp->status);
      |         ^~~~~~~~~~~~~~~~~~
profiles/audio/media.c:2327:40: error: ‘AVRCP_EVENT_STATUS_CHANGED’ undeclared (first use in this function)
 2327 |         avrcp_player_event(mp->player, AVRCP_EVENT_STATUS_CHANGED, mp->status);
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/media.c:2327:40: note: each undeclared identifier is reported only once for each function it appears in
profiles/audio/media.c: In function ‘set_position’:
profiles/audio/media.c:2356:41: error: ‘AVRCP_EVENT_TRACK_REACHED_START’ undeclared (first use in this function)
 2356 |                                         AVRCP_EVENT_TRACK_REACHED_START, NULL);
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/media.c:2365:48: error: ‘AVRCP_EVENT_TRACK_REACHED_END’ undeclared (first use in this function)
 2365 |                 avrcp_player_event(mp->player, AVRCP_EVENT_TRACK_REACHED_END,
      |                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/media.c:2371:40: error: ‘AVRCP_EVENT_STATUS_CHANGED’ undeclared (first use in this function)
 2371 |         avrcp_player_event(mp->player, AVRCP_EVENT_STATUS_CHANGED, status);
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/media.c: In function ‘parse_player_metadata’:
profiles/audio/media.c:2545:40: error: ‘AVRCP_EVENT_TRACK_CHANGED’ undeclared (first use in this function)
 2545 |         avrcp_player_event(mp->player, AVRCP_EVENT_TRACK_CHANGED, &uid);
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/media.c:2546:40: error: ‘AVRCP_EVENT_TRACK_REACHED_START’ undeclared (first use in this function)
 2546 |         avrcp_player_event(mp->player, AVRCP_EVENT_TRACK_REACHED_START, NULL);
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/media.c: In function ‘set_property’:
profiles/audio/media.c:2564:40: error: ‘AVRCP_EVENT_SETTINGS_CHANGED’ undeclared (first use in this function)
 2564 |         avrcp_player_event(mp->player, AVRCP_EVENT_SETTINGS_CHANGED, key);
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/media.c: In function ‘media_player_create’:
profiles/audio/media.c:2787:22: error: implicit declaration of function ‘avrcp_register_player’ [-Wimplicit-function-declaration]
 2787 |         mp->player = avrcp_register_player(adapter->btd_adapter, &player_cb,
      |                      ^~~~~~~~~~~~~~~~~~~~~
profiles/audio/media.c:2787:20: error: assignment to ‘struct avrcp_player *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
 2787 |         mp->player = avrcp_register_player(adapter->btd_adapter, &player_cb,
      |                    ^
profiles/audio/media.c: At top level:
profiles/audio/media.c:2282:31: error: storage size of ‘player_cb’ isn’t known
 2282 | static struct avrcp_player_cb player_cb = {
      |                               ^~~~~~~~~
profiles/audio/media.c:1488:13: error: ‘a2dp_endpoint_supported’ defined but not used [-Werror=unused-function]
 1488 | static bool a2dp_endpoint_supported(struct btd_adapter *adapter)
      |             ^~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/media.c:645:15: error: ‘get_capabilities’ defined but not used [-Werror=unused-function]
  645 | static size_t get_capabilities(struct a2dp_sep *sep, uint8_t **capabilities,
      |               ^~~~~~~~~~~~~~~~
profiles/audio/media.c:638:20: error: ‘get_path’ defined but not used [-Werror=unused-function]
  638 | static const char *get_path(struct a2dp_sep *sep, void *user_data)
      |                    ^~~~~~~~
profiles/audio/media.c:631:20: error: ‘get_name’ defined but not used [-Werror=unused-function]
  631 | static const char *get_name(struct a2dp_sep *sep, void *user_data)
      |                    ^~~~~~~~
profiles/audio/media.c:533:32: error: ‘find_device_transport’ defined but not used [-Werror=unused-function]
  533 | static struct media_transport *find_device_transport(
      |                                ^~~~~~~~~~~~~~~~~~~~~
profiles/audio/media.c:496:17: error: ‘select_configuration’ defined but not used [-Werror=unused-function]
  496 | static gboolean select_configuration(struct media_endpoint *endpoint,
      |                 ^~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:8595: profiles/audio/bluetoothd-media.o] Error 1
make[1]: *** Waiting for unfinished jobs....
profiles/audio/transport.c: In function ‘media_transport_get_device_volume’:
profiles/audio/transport.c:2769:17: error: unused variable ‘l’ [-Werror=unused-variable]
 2769 |         GSList *l;
      |                 ^
profiles/audio/transport.c: In function ‘media_transport_update_device_volume’:
profiles/audio/transport.c:2800:17: error: unused variable ‘l’ [-Werror=unused-variable]
 2800 |         GSList *l;
      |                 ^
cc1: all warnings being treated as errors
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help