meson.build error: ERROR: Index 1 out of bounds of array of size 1.
When I try to compile PulseAudio on docker image of Ubuntu(rolling - 20.04) with this commands
- sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list
- export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true
- apt update
- apt build-dep -y pulseaudio
- apt install -y meson ninja-build
- meson build
- ninja -C build
then I get this error
C++ linker for the host machine: c++ ld.bfd 2.34
Host machine cpu family: x86_64
Host machine cpu: x86_64
meson.build:13:0: ERROR: Index 1 out of bounds of array of size 1.
A full log can be found at /builds/qarmin/pulseaudio/build/meson-logs/meson-log.txt
Seems that this doesn't work well for other git repositories and version_split
is an array with only one element
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/blob/master/meson.build#L7-13
Probably check if version_split.length() > 1:
should be enough
Failed job log - https://gitlab.com/qarmin/pulseaudio/-/jobs/526128429
Gitlab CI file - https://gitlab.com/qarmin/pulseaudio/-/blob/c0c35341ded5926aba92ed218e7265bee9a1978f/.gitlab-ci.yml
Edited by Rafał Mikrut