looks like VLAIS has been introduced into pulseaudio-10.0.
Here is the log:
libtool: compile: /usr/bin/clang -DHAVE_CONFIG_H -I. -I.. -I../src -I../src/modules -I../src/modules -DPA_ALSA_PATHS_DIR=\"/usr/share/pulseaudio/alsa-mixer/paths\" -DPA_ALSA_PROFILE_SETS_DIR=\"/usr/share/pulseaudio/alsa-mixer/profile-sets\" -DPA_SRCDIR=\"/builddir/build/BUILD/pulseaudio-10.0/src\" -DPA_BUILDDIR=\"/builddir/build/BUILD/pulseaudio-10.0/src\" -DPULSE_LOCALEDIR=\"/usr/share/locale\" -DFASTPATH -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -std=gnu11 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -Os -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fPIC -flto -Wall -W -Wextra -Wno-long-long -Wno-overlength-strings -Wundef -Wformat=2 -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -fno-common -fdiagnostics-show-option -fdiagnostics-color=auto -c pulsecore/iochannel.c -fPIC -DPIC -o pulsecore/.libs/libpulsecommon_10.0_la-iochannel.o
make: Leaving directory '/builddir/build/BUILD/pulseaudio-10.0/src'
pulsecore/iochannel.c:324:9: warning: cast from 'unsigned char *' to 'struct ucred *' increases required alignment from 1 to 4 [-Wcast-align]
u = (struct ucred*) CMSG_DATA(&cmsg.hdr);
pulsecore/iochannel.c:358:17: error: fields must have a constant size: 'variable length array in structure' extension will never be supported
uint8_t data[CMSG_SPACE(sizeof(int) * nfd)];
pulsecore/iochannel.c:377:15: warning: cast from 'unsigned char *' to 'int *' increases required alignment from 1 to 4 [-Wcast-align]
msgdata = (int*) CMSG_DATA(&cmsg.hdr);
pulsecore/iochannel.c:450:35: warning: cast from 'unsigned char *' to 'int *' increases required alignment from 1 to 4 [-Wcast-align]
3 warnings and 1 error generated.
make: *** [Makefile:7816: pulsecore/libpulsecommon_10.0_la-iochannel.lo] Error 1
make: *** Waiting for unfinished jobs....
make: Entering directory '/builddir/build/BUILD/pulseaudio-10.0/src'
Oops, we weren't aware that variable length arrays in structs would be forbidden by the C standard. Will fix.
Out of curiosity, what are you working on, how did you run into this issue? (It's interesting to know what projects are building pulseaudio with less common tools.)
As a side note, I'm just trying out building with clang on Travis (this was in our config, but commented out). If it works, will push it out so we have this tested as well.
(In reply to Tanu Kaskinen from comment #1)
> Oops, we weren't aware that variable length arrays in structs would be
> forbidden by the C standard. Will fix.
VLAIS is not a C standard, it's only a GNU extension.
> Out of curiosity, what are you working on, how did you run into this issue?
> (It's interesting to know what projects are building pulseaudio with less
> common tools.)
I'm from https://www.openmandriva.org distribution camp :)
We are building Linux with LLVM/clang almost everywhere.
Feel free to take a look on our build system:
Thanks for the fix.
(In reply to Arun Raghavan from comment #2)
> As a side note, I'm just trying out building with clang on Travis (this was
> in our config, but commented out). If it works, will push it out so we have
> this tested as well.
It appears it is now enabled?
Yes, the Clang build is now enabled on Travis.
Any news when this issue will be fixed ?
Sorry for the delay. I submitted a patch now:
Thanks for your patch. I've applied it and it works.
The fix is now in the master branch.