Compilation fail on ubuntu 20.04.6
- PipeWire version (
pipewire --version
): 0.3.75 - Distribution and distribution version (
PRETTY_NAME
from/etc/os-release
): ubuntu 20.04.6 - Desktop Environment: Gnome
- Kernel version (
uname -r
): 5.18.15-051815-generic - gcc version : gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Description of Problem:
Compilation 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.
How Reproducible:
try to Compile on Ubuntu 20.04.6
Steps to Reproduce:
- Clone the repo
- try to compile with options enabled
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= \
- you can always reproduce
Actual Results:
Compilation error
Expected Results:
Should compile successfully
Additional Info (as attachments):
Problem came up with 65d94955