Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 756196 - media-sound/pulseaudio unquoted arg is thus passed to econf aka configure as multiple args
Summary: media-sound/pulseaudio unquoted arg is thus passed to econf aka configure as ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal major
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2020-11-23 10:18 UTC by flippynelle
Modified: 2020-11-23 22:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description flippynelle 2020-11-23 10:18:53 UTC
Apparently, coding error in the ebuild makes it fail to emerge.

configure: error: unrecognized option: `-lelogind'


Reproducible: Always

Steps to Reproduce:
1. try to emerge media-sound/pulseaudio-13.0 or media-sound/pulseaudio-13.0-r1

Actual Results:  


 * econf: updating pulseaudio-13.0/build-aux/config.sub with /usr/share/gnuconfig/config.sub
/var/tmp/portage/media-sound/pulseaudio-13.0/work/pulseaudio-13.0/configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --docdir=/usr/share/doc/pulseaudio-13.0 --htmldir=/usr/share/doc/pulseaudio-13.0/html --libdir=/usr/lib64 --disable-adrian-aec --disable-esound --disable-gconf --disable-solaris --enable-largefile --localstatedir=/var --with-systemduserunitdir=/usr/lib/systemd/user --with-udev-rules-dir=//lib/udev/rules.d --enable-alsa --disable-bluez5 --enable-gsettings --disable-gtk3 --disable-jack --disable-samplerate --disable-lirc --enable-orc --disable-oss-output --enable-openssl --disable-default-build-tests --enable-udev --disable-webrtc-aec --disable-avahi --without-fftw --with-soxr --with-database=gdbm --enable-glib2 --enable-asyncns --disable-neon-opt --disable-tcpwrap --enable-dbus --enable-x11 --disable-systemd-daemon --disable-systemd-login --disable-systemd-journal --disable-ipv6 --with-caps --enable-systemd-login SYSTEMDLOGIN_CFLAGS=-I/usr/include/elogind SYSTEMDLOGIN_LIBS=-L/lib64 -lelogind --with-pulsedsp-location=/usr/\\$$LIB/pulseaudio
configure: error: unrecognized option: `-lelogind'
Try `/var/tmp/portage/media-sound/pulseaudio-13.0/work/pulseaudio-13.0/configure --help' for more information

...
 *             environment, line 4536:  Called econf '--disable-adrian-aec' '--disable-esound' '--disable-gconf' '--disable-solaris' '--enable-largefile' '--localstatedir=/var' '--with-systemduserunitdir=/usr/lib/systemd/user' '--with-udev-rules-dir=//lib/udev/rules.d' '--enable-alsa' '--disable-bluez5' '--enable-gsettings' '--disable-gtk3' '--disable-jack' '--disable-samplerate' '--disable-lirc' '--enable-orc' '--disable-oss-output' '--enable-openssl' '--disable-default-build-tests' '--enable-udev' '--disable-webrtc-aec' '--disable-avahi' '--without-fftw' '--with-soxr' '--with-database=gdbm' '--enable-glib2' '--enable-asyncns' '--disable-neon-opt' '--disable-tcpwrap' '--enable-dbus' '--enable-x11' '--disable-systemd-daemon' '--disable-systemd-login' '--disable-systemd-journal' '--disable-ipv6' '--with-caps' '--enable-systemd-login' 'SYSTEMDLOGIN_CFLAGS=-I/usr/include/elogind' 'SYSTEMDLOGIN_LIBS=-L/lib64' '-lelogind' '--with-pulsedsp-location=/usr/\$$LIB/pulseaudio'


You see: 'SYSTEMDLOGIN_LIBS=-L/lib64' '-lelogind' are passed as two args here!


Expected Results:  
emerges without errors, by having the two args 'SYSTEMDLOGIN_LIBS=-L/lib64' '-lelogind' passed as one to econf aka configure


if use elogind && multilib_is_native_abi; then
	myconf+=(
		--enable-systemd-login
		SYSTEMDLOGIN_CFLAGS=`pkg-config --cflags "libelogind" 2>/dev/null`
		SYSTEMDLOGIN_LIBS=`pkg-config --libs "libelogind" 2>/dev/null`
	)
fi

...
	econf "${myconf[@]}"
....

https://gitweb.gentoo.org/repo/gentoo.git/tree/media-sound/pulseaudio/pulseaudio-13.0.ebuild?id=b200a01e8760313986635054e71e6f93fb455300#n204

pkg-config there clearly expands to multiple args, and that apparent variable assignment is just an element inside of a bash array, thus quoting it is needed if it's to be taken as just 1 arg.


I'm not sure why in this other bug which has a build.log attached, it simply worked ok and didn't yield the error about `-lelogind': https://bugs.gentoo.org/740498#c4
Any ideas? They are very likely to be using the same ebuild.
Which makes me wonder if this is an issue that's happening only on my system, but the logic, unless I've missed something, seems sound as to why it happens and appears to be system-independent.
Comment 1 flippynelle 2020-11-23 10:28:31 UTC
My pulseaudio configure was generated by autoconf 2.69, just in case this somehow added the "unrecognized option:" check.

sys-devel/autoconf-2.69-r5::gentoo
Comment 2 flippynelle 2020-11-23 15:09:49 UTC
That patch media-sound/pulseaudio/files/pulseaudio-13.99.3-avoid_bashisms.patch in the github PR, doesn't apply for me for pulseaudio-13.0-r1
It seems to expect nonexisting contents in configure.ac

for example this line exists in pulseaudio-13.0-r1:

AS_IF([test "x$enable_legacy_database_entry_format" != "xno"], ENABLE_LEGACY_DATABASE_ENTRY_FORMAT=yes, ENABLE_LEGACY_DATABASE_ENTRY_FORMAT=no)                                                                                                                                         

but this line, which the patch expects, doesn't (yet):

AS_IF([test "x$enable_stream_restore_clear_old_devices" == "xyes"], ENABLE_STREAM_RESTORE_CLEAR_OLD_DEVICES=yes, ENABLE_STREAM_RESTORE_CLEAR_OLD_DEVICES=no)
Comment 3 flippynelle 2020-11-23 15:17:32 UTC
If I apply only this commit https://github.com/gentoo/gentoo/pull/18375/commits/a86e78dd0b3fb682bd991193fb06561d2d33f738
then media-sound/pulseaudio-13.0-r1::localrepo
emerges just fine, thank you for the fix!
Comment 4 Mart Raudsepp gentoo-dev 2020-11-23 22:01:22 UTC
If this is some sort of autoconf upgrade + eautoreconf trigger issue or pkgconf upgrade or some such, it might get hit by modemmanager, gnome-panel, gdm, gnome-flashback and mate-system-monitor too, as I make elogind supported through the same autoconf precious variable "hack" without a subshell. Pretty sure that at the time I added this, it worked fine
Comment 5 Mart Raudsepp gentoo-dev 2020-11-23 22:01:50 UTC
Oh, you've got it covered in bug 756238 already! Nice
Comment 6 Larry the Git Cow gentoo-dev 2020-11-23 22:06:12 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f1e91c667fb2ae4694070397d47f78ed23144d82

commit f1e91c667fb2ae4694070397d47f78ed23144d82
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2020-11-23 11:23:30 +0000
Commit:     Mart Raudsepp <leio@gentoo.org>
CommitDate: 2020-11-23 22:03:42 +0000

    media-sound/pulseaudio: Fixed quoting for elogind configure args
    
    Also use tc-getPKG_CONFIG from toolchain-funcs.eclass to find pkg-config
    
    Reported-by: flippynelle <flippynelle@pm.me>
    Closes: https://bugs.gentoo.org/756196
    Package-Manager: Portage-3.0.10, Repoman-3.0.2
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
    Signed-off-by: Mart Raudsepp <leio@gentoo.org>

 media-sound/pulseaudio/pulseaudio-13.0-r1.ebuild | 7 ++++---
 media-sound/pulseaudio/pulseaudio-13.0.ebuild    | 7 ++++---
 2 files changed, 8 insertions(+), 6 deletions(-)