Ubuntu 20.04 still in support and not reached its EOL
Sourav Das (0b8f78ad) at 23 Mar 05:42
meson: Downgrade glib-2.68 to glib2.64 to support ubuntu 20.04
can we track this at ppa:pipewire-debian if packaging related issue ? if not then you come back here again.
May I ask for your usecase to enable vulkan
This is for ubuntu PPA (ppa:pipewire-debian/pipewire-upstream).
OKey I disabled vulkan for ubuntu 20.04 (as you said : Currently vulkan is only used for two example clients afaik) as raising vulkan version also will not solve, see: https://github.com/KhronosGroup/Vulkan-Loader/issues/870 and out of scope for above ppa.
are you recommending same ?
Yes. from vulkan-headers v1.3 symbols are there.
Correct me if I am worong, upgrading vulkan-headers
may breaks other vulkan-*
packages and programs which is using it. In that case can we not use checks. or any suggestion
Hi @columbarius can you please see this ?
pipewire --version
): 0.3.81 or masterPRETTY_NAME
from /etc/os-release
): 20.04.6uname -r
): 5.18.15-051815-genericCompilation failed : when vulkan enabled
../spa/plugins/vulkan/vulkan-compute-utils.c: In function ‘runCommandBuffer’:
../spa/plugins/vulkan/vulkan-compute-utils.c:32:2: error: unknown type name ‘PFN_vkQueueSubmit2KHR’; did you mean ‘PFN_vkQueueSubmit’?
32 | PFN_##name name = (PFN_##name)vkGetInstanceProcAddr(s->base.instance, #name)
| ^~~~
../spa/plugins/vulkan/vulkan-compute-utils.c:284:2: note: in expansion of macro ‘VULKAN_INSTANCE_FUNCTION’
284 | VULKAN_INSTANCE_FUNCTION(vkQueueSubmit2KHR);
| ^~~~~~~~~~~~~~~~~~~~~~~~
../spa/plugins/vulkan/vulkan-compute-utils.c:32:21: error: ‘PFN_vkQueueSubmit2KHR’ undeclared (first use in this function); did you mean ‘vkQueueSubmit2KHR’?
32 | PFN_##name name = (PFN_##name)vkGetInstanceProcAddr(s->base.instance, #name)
| ^~~~
../spa/plugins/vulkan/vulkan-compute-utils.c:284:2: note: in expansion of macro ‘VULKAN_INSTANCE_FUNCTION’
284 | VULKAN_INSTANCE_FUNCTION(vkQueueSubmit2KHR);
| ^~~~~~~~~~~~~~~~~~~~~~~~
../spa/plugins/vulkan/vulkan-compute-utils.c:32:21: note: each undeclared identifier is reported only once for each function it appears in
32 | PFN_##name name = (PFN_##name)vkGetInstanceProcAddr(s->base.instance, #name)
| ^~~~
../spa/plugins/vulkan/vulkan-compute-utils.c:284:2: note: in expansion of macro ‘VULKAN_INSTANCE_FUNCTION’
284 | VULKAN_INSTANCE_FUNCTION(vkQueueSubmit2KHR);
| ^~~~~~~~~~~~~~~~~~~~~~~~
../spa/plugins/vulkan/vulkan-compute-utils.c:32:32: error: expected ‘,’ or ‘;’ before ‘vkGetInstanceProcAddr’
32 | PFN_##name name = (PFN_##name)vkGetInstanceProcAddr(s->base.instance, #name)
| ^~~~~~~~~~~~~~~~~~~~~
../spa/plugins/vulkan/vulkan-compute-utils.c:284:2: note: in expansion of macro ‘VULKAN_INSTANCE_FUNCTION’
284 | VULKAN_INSTANCE_FUNCTION(vkQueueSubmit2KHR);
| ^~~~~~~~~~~~~~~~~~~~~~~~
../spa/plugins/vulkan/vulkan-compute-utils.c:306:2: error: unknown type name ‘VkSemaphoreSubmitInfo’; did you mean ‘VkSemaphoreWaitInfo’?
306 | VkSemaphoreSubmitInfo semaphore_wait_info[s->n_streams];
| ^~~~~~~~~~~~~~~~~~~~~
| VkSemaphoreWaitInfo
../spa/plugins/vulkan/vulkan-compute-utils.c:308:2: error: unknown type name ‘VkSemaphoreSubmitInfo’; did you mean ‘VkSemaphoreWaitInfo’?
308 | VkSemaphoreSubmitInfo semaphore_signal_info[1];
| ^~~~~~~~~~~~~~~~~~~~~
| VkSemaphoreWaitInfo
../spa/plugins/vulkan/vulkan-compute-utils.c:359:55: error: ‘VkSemaphoreSubmitInfo’ undeclared (first use in this function); did you mean ‘VkSemaphoreWaitInfo’?
359 | semaphore_wait_info[semaphore_wait_info_len++] = (VkSemaphoreSubmitInfo) {
| ^~~~~~~~~~~~~~~~~~~~~
| VkSemaphoreWaitInfo
../spa/plugins/vulkan/vulkan-compute-utils.c:359:77: error: expected ‘;’ before ‘{’ token
359 | semaphore_wait_info[semaphore_wait_info_len++] = (VkSemaphoreSubmitInfo) {
| ^~
| ;
../spa/plugins/vulkan/vulkan-compute-utils.c:396:78: error: expected ‘;’ before ‘{’ token
396 | semaphore_signal_info[semaphore_signal_info_len++] = (VkSemaphoreSubmitInfo) {
| ^~
| ;
../spa/plugins/vulkan/vulkan-compute-utils.c:401:2: error: unknown type name ‘VkCommandBufferSubmitInfoKHR’; did you mean ‘VkCommandBufferBeginInfo’?
401 | VkCommandBufferSubmitInfoKHR commandBufferInfo = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| VkCommandBufferBeginInfo
../spa/plugins/vulkan/vulkan-compute-utils.c:402:3: error: field name not in record or union initializer
402 | .sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO,
| ^
../spa/plugins/vulkan/vulkan-compute-utils.c:402:3: note: (near initialization for ‘commandBufferInfo’)
../spa/plugins/vulkan/vulkan-compute-utils.c:402:12: error: ‘VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO’ undeclared (first use in this function); did you mean ‘VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO’?
402 | .sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO
../spa/plugins/vulkan/vulkan-compute-utils.c:403:3: error: field name not in record or union initializer
403 | .commandBuffer = s->commandBuffer,
| ^
../spa/plugins/vulkan/vulkan-compute-utils.c:403:3: note: (near initialization for ‘commandBufferInfo’)
../spa/plugins/vulkan/vulkan-compute-utils.c:403:20: warning: excess elements in scalar initializer
403 | .commandBuffer = s->commandBuffer,
| ^
../spa/plugins/vulkan/vulkan-compute-utils.c:403:20: note: (near initialization for ‘commandBufferInfo’)
../spa/plugins/vulkan/vulkan-compute-utils.c:406:8: error: unknown type name ‘VkSubmitInfo2KHR’
406 | const VkSubmitInfo2KHR submitInfo = {
| ^~~~~~~~~~~~~~~~
../spa/plugins/vulkan/vulkan-compute-utils.c:407:3: error: field name not in record or union initializer
407 | .sType = VK_STRUCTURE_TYPE_SUBMIT_INFO_2_KHR,
| ^
../spa/plugins/vulkan/vulkan-compute-utils.c:407:3: note: (near initialization for ‘submitInfo’)
../spa/plugins/vulkan/vulkan-compute-utils.c:407:12: error: ‘VK_STRUCTURE_TYPE_SUBMIT_INFO_2_KHR’ undeclared (first use in this function); did you mean ‘VK_STRUCTURE_TYPE_SUBMIT_INFO’?
407 | .sType = VK_STRUCTURE_TYPE_SUBMIT_INFO_2_KHR,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| VK_STRUCTURE_TYPE_SUBMIT_INFO
../spa/plugins/vulkan/vulkan-compute-utils.c:408:3: error: field name not in record or union initializer
408 | .commandBufferInfoCount = 1,
| ^
../spa/plugins/vulkan/vulkan-compute-utils.c:408:3: note: (near initialization for ‘submitInfo’)
../spa/plugins/vulkan/vulkan-compute-utils.c:408:29: warning: excess elements in scalar initializer
408 | .commandBufferInfoCount = 1,
| ^
../spa/plugins/vulkan/vulkan-compute-utils.c:408:29: note: (near initialization for ‘submitInfo’)
../spa/plugins/vulkan/vulkan-compute-utils.c:409:3: error: field name not in record or union initializer
409 | .pCommandBufferInfos = &commandBufferInfo,
| ^
../spa/plugins/vulkan/vulkan-compute-utils.c:409:3: note: (near initialization for ‘submitInfo’)
../spa/plugins/vulkan/vulkan-compute-utils.c:409:26: warning: excess elements in scalar initializer
409 | .pCommandBufferInfos = &commandBufferInfo,
| ^
../spa/plugins/vulkan/vulkan-compute-utils.c:409:26: note: (near initialization for ‘submitInfo’)
../spa/plugins/vulkan/vulkan-compute-utils.c:410:3: error: field name not in record or union initializer
410 | .waitSemaphoreInfoCount = semaphore_wait_info_len,
| ^
../spa/plugins/vulkan/vulkan-compute-utils.c:410:3: note: (near initialization for ‘submitInfo’)
../spa/plugins/vulkan/vulkan-compute-utils.c:410:29: warning: excess elements in scalar initializer
410 | .waitSemaphoreInfoCount = semaphore_wait_info_len,
| ^~~~~~~~~~~~~~~~~~~~~~~
../spa/plugins/vulkan/vulkan-compute-utils.c:410:29: note: (near initialization for ‘submitInfo’)
../spa/plugins/vulkan/vulkan-compute-utils.c:411:3: error: field name not in record or union initializer
411 | .pWaitSemaphoreInfos = semaphore_wait_info,
| ^
../spa/plugins/vulkan/vulkan-compute-utils.c:411:3: note: (near initialization for ‘submitInfo’)
../spa/plugins/vulkan/vulkan-compute-utils.c:411:26: warning: excess elements in scalar initializer
411 | .pWaitSemaphoreInfos = semaphore_wait_info,
| ^~~~~~~~~~~~~~~~~~~
../spa/plugins/vulkan/vulkan-compute-utils.c:411:26: note: (near initialization for ‘submitInfo’)
../spa/plugins/vulkan/vulkan-compute-utils.c:412:3: error: field name not in record or union initializer
412 | .signalSemaphoreInfoCount = semaphore_signal_info_len,
| ^
../spa/plugins/vulkan/vulkan-compute-utils.c:412:3: note: (near initialization for ‘submitInfo’)
../spa/plugins/vulkan/vulkan-compute-utils.c:412:31: warning: excess elements in scalar initializer
412 | .signalSemaphoreInfoCount = semaphore_signal_info_len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
../spa/plugins/vulkan/vulkan-compute-utils.c:412:31: note: (near initialization for ‘submitInfo’)
../spa/plugins/vulkan/vulkan-compute-utils.c:413:3: error: field name not in record or union initializer
413 | .pSignalSemaphoreInfos = semaphore_signal_info,
| ^
../spa/plugins/vulkan/vulkan-compute-utils.c:413:3: note: (near initialization for ‘submitInfo’)
../spa/plugins/vulkan/vulkan-compute-utils.c:413:28: warning: excess elements in scalar initializer
413 | .pSignalSemaphoreInfos = semaphore_signal_info,
| ^~~~~~~~~~~~~~~~~~~~~
../spa/plugins/vulkan/vulkan-compute-utils.c:413:28: note: (near initialization for ‘submitInfo’)
In file included from ../spa/plugins/vulkan/vulkan-compute-utils.h:11,
from ../spa/plugins/vulkan/vulkan-compute-utils.c:28:
../spa/plugins/vulkan/vulkan-compute-utils.c:415:25: error: called object ‘vkQueueSubmit2KHR’ is not a function or function pointer
415 | VK_CHECK_RESULT(vkQueueSubmit2KHR(s->base.queue, 1, &submitInfo, s->fence));
| ^~~~~~~~~~~~~~~~~
../spa/plugins/vulkan/vulkan-utils.h:16:22: note: in definition of macro ‘VK_CHECK_RESULT’
16 | VkResult _result = (f); \
| ^
../spa/plugins/vulkan/vulkan-compute-utils.c:284:27: note: declared here
284 | VULKAN_INSTANCE_FUNCTION(vkQueueSubmit2KHR);
| ^~~~~~~~~~~~~~~~~
../spa/plugins/vulkan/vulkan-compute-utils.c:32:13: note: in definition of macro ‘VULKAN_INSTANCE_FUNCTION’
32 | PFN_##name name = (PFN_##name)vkGetInstanceProcAddr(s->base.instance, #name)
| ^~~~
Always 100%
-D vulkan=enabled
Should compile successfully
macros are available only above libvulkan-dev (>1.2.131.2).
!1542 introduced the problem.
Sourav Das (c6c3259a) at 30 Jul 08:43
pipewire --version
): 0.3.75PRETTY_NAME
from /etc/os-release
): ubuntu 20.04.6uname -r
): 5.18.15-051815-genericCompilation error on
[1/936] cc -Ispa/plugins/alsa/libspa-alsa.so.p -Ispa/plugins/alsa -I../spa/plugins/alsa -I. -I.. -Ispa/include -I../spa/include -flto=1 -fdiagnostics-color=always -D_FI
LE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=gnu11 -fvisibility=hidden -fno-strict-aliasing -Werror=suggest-attribute=format -Wsign-compare -Wpointer-a
rith -Wpointer-sign -Wformat -Wformat-security -Wimplicit-fallthrough -Wmissing-braces -Wtype-limits -Wvariadic-macros -Wmaybe-uninitialized -Wno-missing-field-initiali
zers -Wno-unused-parameter -Wno-pedantic -Wdeprecated-declarations -Wunused-result -Werror=return-type -D_GNU_SOURCE -DFASTPATH -Werror=implicit-function-declaration -W
error=int-conversion -Werror=old-style-declaration -Werror=old-style-definition -Werror=missing-parameter-type -Werror=strict-prototypes -g -O2 -fdebug-prefix-map=/home
/sdas/pw/test/pipewire-0.3.75=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DHAVE_ALSA_UCM -DHAVE_READLINK -MD -MQ
spa/plugins/alsa/libspa-alsa.so.p/alsa-udev.c.o -MF spa/plugins/alsa/libspa-alsa.so.p/alsa-udev.c.o.d -o spa/plugins/alsa/libspa-alsa.so.p/alsa-udev.c.o -c ../spa/plugi
ns/alsa/alsa-udev.c
FAILED: spa/plugins/alsa/libspa-alsa.so.p/alsa-udev.c.o
cc -Ispa/plugins/alsa/libspa-alsa.so.p -Ispa/plugins/alsa -I../spa/plugins/alsa -I. -I.. -Ispa/include -I../spa/include -flto=1 -fdiagnostics-color=always -D_FILE_OFFSE
T_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=gnu11 -fvisibility=hidden -fno-strict-aliasing -Werror=suggest-attribute=format -Wsign-compare -Wpointer-arith -Wp
ointer-sign -Wformat -Wformat-security -Wimplicit-fallthrough -Wmissing-braces -Wtype-limits -Wvariadic-macros -Wmaybe-uninitialized -Wno-missing-field-initializers -Wn
o-unused-parameter -Wno-pedantic -Wdeprecated-declarations -Wunused-result -Werror=return-type -D_GNU_SOURCE -DFASTPATH -Werror=implicit-function-declaration -Werror=in
t-conversion -Werror=old-style-declaration -Werror=old-style-definition -Werror=missing-parameter-type -Werror=strict-prototypes -g -O2 -fdebug-prefix-map=/home/sdas/pw
/test/pipewire-0.3.75=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DHAVE_ALSA_UCM -DHAVE_READLINK -MD -MQ spa/plug
ins/alsa/libspa-alsa.so.p/alsa-udev.c.o -MF spa/plugins/alsa/libspa-alsa.so.p/alsa-udev.c.o.d -o spa/plugins/alsa/libspa-alsa.so.p/alsa-udev.c.o -c ../spa/plugins/alsa/
alsa-udev.c
In file included from ../spa/plugins/alsa/alsa-udev.c:17:
../spa/include/spa/utils/cleanup.h: In function ‘_spa_autoptr_cleanup_func_DIR’:
../spa/include/spa/utils/cleanup.h:52:13: error: dereferencing pointer to incomplete type ‘DIR’ {aka ‘struct __dirstream’}
52 | __typeof__(*(ptr)) *_old_value = spa_steal_ptr(ptr); \
| ^~~~~~
../spa/include/spa/utils/cleanup.h:29:2: note: in definition of macro ‘SPA_DEFINE_AUTOPTR_CLEANUP’
29 | __VA_ARGS__ \
| ^~~~~~~~~~~
../spa/include/spa/utils/cleanup.h:95:2: note: in expansion of macro ‘spa_clear_ptr’
95 | spa_clear_ptr(*thing, closedir);
| ^~~~~~~~~~~~~
../spa/include/spa/utils/cleanup.h:54:14: warning: passing argument 1 of ‘closedir’ from incompatible pointer type [-Wincompatible-pointer-types]
54 | destructor(_old_value); \
| ^~~~~~~~~~
| |
| int *
../spa/include/spa/utils/cleanup.h:29:2: note: in definition of macro ‘SPA_DEFINE_AUTOPTR_CLEANUP’
29 | __VA_ARGS__ \
| ^~~~~~~~~~~
../spa/include/spa/utils/cleanup.h:95:2: note: in expansion of macro ‘spa_clear_ptr’
| ^~~~~~~~~~~~~
../spa/include/spa/utils/cleanup.h:54:14: warning: passing argument 1 of ‘closedir’ from incompatible pointer type [-Wincompatible-pointer-types]
54 | destructor(_old_value); \
| ^~~~~~~~~~
| |
| int *
../spa/include/spa/utils/cleanup.h:29:2: note: in definition of macro ‘SPA_DEFINE_AUTOPTR_CLEANUP’
29 | __VA_ARGS__ \
| ^~~~~~~~~~~
../spa/include/spa/utils/cleanup.h:95:2: note: in expansion of macro ‘spa_clear_ptr’
95 | spa_clear_ptr(*thing, closedir);
| ^~~~~~~~~~~~~
In file included from ../spa/plugins/alsa/alsa-udev.c:12:
/usr/include/dirent.h:149:27: note: expected ‘DIR *’ {aka ‘struct __dirstream *’} but argument is of type ‘int *’
149 | extern int closedir (DIR *__dirp) __nonnull ((1));
| ~~~~~^~~~~~
ninja: build stopped: subcommand failed.
try to Compile on Ubuntu 20.04.6
dh_auto_configure -- --buildtype=plain \
-Daudiotestsrc=enabled \
-Dauto_features=enabled \
-Db_lto=true \
-Db_pie=true \
-Dbluez5-codec-lc3plus=disabled \
-Dbluez5-codec-lc3=enabled \
-Dbluez5-codec-ldac=enabled \
-Dbluez5-codec-aptx=enabled \
-Dbluez5-codec-aac=enabled \
-Dcompress-offload=disabled \
-Dlibcamera=enabled \
-Ddocs=enabled \
-Dbluez5-backend-native-mm=enabled \
-Dexamples=enabled \
-Dinstalled_tests=enabled \
-Dman=enabled \
-Dtest=enabled \
-Dvideotestsrc=enabled \
-Dvolume=enabled \
-Dvulkan=enabled \
-Droc=enabled \
-Dsession-managers= \
Compilation error
Should compile successfully
Problem came up with 65d94955
Sourav Das (c6c3259a) at 30 Jul 05:02
spa: fixes for dereferencing pointer to incomplete type in typeof
clang also define GNUC and resolves '4' along with clang which resolves '1'. On any version of clang, GNUC and resolves '4'. see c092fa2d
Sourav Das (c092fa2d) at 29 Jul 17:32
spa: make GNUC & clang detection more portable
MR !1666 (merged), adds check for macros, can you please review and merge ?
I think upstream should follow the fixes as later may be its difficult to maintain patch for only ubuntu as in future some code may be again reappear which introduce similar issue.
before gcc 10 its not supporting pointer dereferencing in typeof. so made changes according to that. Fixes #3375
Sourav Das (7a2375cc) at 29 Jul 10:02
spa: fixes for dereferencing pointer to incomplete type in typeof
Hi @pobrn , Any fixes for this please ?
pipewire --version
): 0.3.75PRETTY_NAME
from /etc/os-release
): ubuntu 20.04.6uname -r
): 5.18.15-051815-genericCompilation error on
[1/936] cc -Ispa/plugins/alsa/libspa-alsa.so.p -Ispa/plugins/alsa -I../spa/plugins/alsa -I. -I.. -Ispa/include -I../spa/include -flto=1 -fdiagnostics-color=always -D_FI
LE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=gnu11 -fvisibility=hidden -fno-strict-aliasing -Werror=suggest-attribute=format -Wsign-compare -Wpointer-a
rith -Wpointer-sign -Wformat -Wformat-security -Wimplicit-fallthrough -Wmissing-braces -Wtype-limits -Wvariadic-macros -Wmaybe-uninitialized -Wno-missing-field-initiali
zers -Wno-unused-parameter -Wno-pedantic -Wdeprecated-declarations -Wunused-result -Werror=return-type -D_GNU_SOURCE -DFASTPATH -Werror=implicit-function-declaration -W
error=int-conversion -Werror=old-style-declaration -Werror=old-style-definition -Werror=missing-parameter-type -Werror=strict-prototypes -g -O2 -fdebug-prefix-map=/home
/sdas/pw/test/pipewire-0.3.75=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DHAVE_ALSA_UCM -DHAVE_READLINK -MD -MQ
spa/plugins/alsa/libspa-alsa.so.p/alsa-udev.c.o -MF spa/plugins/alsa/libspa-alsa.so.p/alsa-udev.c.o.d -o spa/plugins/alsa/libspa-alsa.so.p/alsa-udev.c.o -c ../spa/plugi
ns/alsa/alsa-udev.c
FAILED: spa/plugins/alsa/libspa-alsa.so.p/alsa-udev.c.o
cc -Ispa/plugins/alsa/libspa-alsa.so.p -Ispa/plugins/alsa -I../spa/plugins/alsa -I. -I.. -Ispa/include -I../spa/include -flto=1 -fdiagnostics-color=always -D_FILE_OFFSE
T_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=gnu11 -fvisibility=hidden -fno-strict-aliasing -Werror=suggest-attribute=format -Wsign-compare -Wpointer-arith -Wp
ointer-sign -Wformat -Wformat-security -Wimplicit-fallthrough -Wmissing-braces -Wtype-limits -Wvariadic-macros -Wmaybe-uninitialized -Wno-missing-field-initializers -Wn
o-unused-parameter -Wno-pedantic -Wdeprecated-declarations -Wunused-result -Werror=return-type -D_GNU_SOURCE -DFASTPATH -Werror=implicit-function-declaration -Werror=in
t-conversion -Werror=old-style-declaration -Werror=old-style-definition -Werror=missing-parameter-type -Werror=strict-prototypes -g -O2 -fdebug-prefix-map=/home/sdas/pw
/test/pipewire-0.3.75=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DHAVE_ALSA_UCM -DHAVE_READLINK -MD -MQ spa/plug
ins/alsa/libspa-alsa.so.p/alsa-udev.c.o -MF spa/plugins/alsa/libspa-alsa.so.p/alsa-udev.c.o.d -o spa/plugins/alsa/libspa-alsa.so.p/alsa-udev.c.o -c ../spa/plugins/alsa/
alsa-udev.c
In file included from ../spa/plugins/alsa/alsa-udev.c:17:
../spa/include/spa/utils/cleanup.h: In function ‘_spa_autoptr_cleanup_func_DIR’:
../spa/include/spa/utils/cleanup.h:52:13: error: dereferencing pointer to incomplete type ‘DIR’ {aka ‘struct __dirstream’}
52 | __typeof__(*(ptr)) *_old_value = spa_steal_ptr(ptr); \
| ^~~~~~
../spa/include/spa/utils/cleanup.h:29:2: note: in definition of macro ‘SPA_DEFINE_AUTOPTR_CLEANUP’
29 | __VA_ARGS__ \
| ^~~~~~~~~~~
../spa/include/spa/utils/cleanup.h:95:2: note: in expansion of macro ‘spa_clear_ptr’
95 | spa_clear_ptr(*thing, closedir);
| ^~~~~~~~~~~~~
../spa/include/spa/utils/cleanup.h:54:14: warning: passing argument 1 of ‘closedir’ from incompatible pointer type [-Wincompatible-pointer-types]
54 | destructor(_old_value); \
| ^~~~~~~~~~
| |
| int *
../spa/include/spa/utils/cleanup.h:29:2: note: in definition of macro ‘SPA_DEFINE_AUTOPTR_CLEANUP’
29 | __VA_ARGS__ \
| ^~~~~~~~~~~
../spa/include/spa/utils/cleanup.h:95:2: note: in expansion of macro ‘spa_clear_ptr’
| ^~~~~~~~~~~~~
../spa/include/spa/utils/cleanup.h:54:14: warning: passing argument 1 of ‘closedir’ from incompatible pointer type [-Wincompatible-pointer-types]
54 | destructor(_old_value); \
| ^~~~~~~~~~
| |
| int *
../spa/include/spa/utils/cleanup.h:29:2: note: in definition of macro ‘SPA_DEFINE_AUTOPTR_CLEANUP’
29 | __VA_ARGS__ \
| ^~~~~~~~~~~
../spa/include/spa/utils/cleanup.h:95:2: note: in expansion of macro ‘spa_clear_ptr’
95 | spa_clear_ptr(*thing, closedir);
| ^~~~~~~~~~~~~
In file included from ../spa/plugins/alsa/alsa-udev.c:12:
/usr/include/dirent.h:149:27: note: expected ‘DIR *’ {aka ‘struct __dirstream *’} but argument is of type ‘int *’
149 | extern int closedir (DIR *__dirp) __nonnull ((1));
| ~~~~~^~~~~~
ninja: build stopped: subcommand failed.
try to Compile on Ubuntu 20.04.6
dh_auto_configure -- --buildtype=plain \
-Daudiotestsrc=enabled \
-Dauto_features=enabled \
-Db_lto=true \
-Db_pie=true \
-Dbluez5-codec-lc3plus=disabled \
-Dbluez5-codec-lc3=enabled \
-Dbluez5-codec-ldac=enabled \
-Dbluez5-codec-aptx=enabled \
-Dbluez5-codec-aac=enabled \
-Dcompress-offload=disabled \
-Dlibcamera=enabled \
-Ddocs=enabled \
-Dbluez5-backend-native-mm=enabled \
-Dexamples=enabled \
-Dinstalled_tests=enabled \
-Dman=enabled \
-Dtest=enabled \
-Dvideotestsrc=enabled \
-Dvolume=enabled \
-Dvulkan=enabled \
-Droc=enabled \
-Dsession-managers= \
Compilation error
Should compile successfully
Problem came up with 65d94955