alsa-utils fails to build with the midi use flag disabled: localhost ~ # paludis -i1 alsa-utils Building target list... Building dependency list... These packages will be installed: * media-sound/alsa-utils :0.9 [U 1.0.16-r2 -> 1.0.17] <target> -midi* -minimal -nls Total: 1 package (1 upgrade) Use flags: * midi: Build the sequencer (midi) utilities (1 of 1) Installing media-sound/alsa-utils-1.0.17:0.9::gentoo >>> Running ebuild phase killold as root:root... >>> Starting builtin_killold >>> Done builtin_killold >>> Completed ebuild phase killold >>> Running ebuild phases init saveenv as root:root... >>> Starting builtin_init >>> Done builtin_init >>> Starting builtin_saveenv >>> Done builtin_saveenv >>> Completed ebuild phases init saveenv >>> Running ebuild phases loadenv setup saveenv as root:root... >>> Starting builtin_loadenv >>> Done builtin_loadenv >>> Starting pkg_setup >>> Done pkg_setup >>> Starting builtin_saveenv >>> Done builtin_saveenv >>> Completed ebuild phases loadenv setup saveenv >>> Running ebuild phases loadenv unpack compile saveenv as root:root... >>> Starting builtin_loadenv >>> Done builtin_loadenv >>> Starting src_unpack >>> Unpacking alsa-utils-1.0.17.tar.bz2 to /var/tmp/paludis/media-sound-alsa-utils-1.0.17/work tar jxf /usr/paludis/distfiles/alsa-utils-1.0.17.tar.bz2 --no-same-owner * Applying alsa-utils-1.0.11_rc2-nls.patch ... [ ok ] * Applying alsa-utils-1.0.11_rc5-alsaconf-redirect.patch ... [ ok ] * Applying alsa-utils-1.0.14-alsaconf-modules-update.patch ... [ ok ] * Applying alsa-utils-1.0.17-seq.patch ... [ ok ] * Running eautoreconf in '/var/tmp/paludis/media-sound-alsa-utils-1.0.17/work/alsa-utils-1.0.17' ... * Running aclocal -I m4 -I m4 ... [ ok ] * Running autoconf ... [ ok ] * Running autoheader ... [ ok ] * Running automake --add-missing --copy --foreign ... [ ok ] >>> Done src_unpack >>> Starting src_compile econf: updating /var/tmp/paludis/media-sound-alsa-utils-1.0.17/work/alsa-utils-1.0.17/config.guess with /usr/share/gnuconfig/config.guess econf: updating /var/tmp/paludis/media-sound-alsa-utils-1.0.17/work/alsa-utils-1.0.17/config.sub with /usr/share/gnuconfig/config.sub ./configure --prefix=/usr --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --disable-nls --disable-sequencer --build=x86_64-pc-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether NLS is requested... no checking for msgfmt... /usr/bin/msgfmt checking for gmsgfmt... /usr/bin/gmsgfmt checking for xgettext... /usr/bin/xgettext checking for msgmerge... /usr/bin/msgmerge checking for style of include used by make... GNU checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether x86_64-pc-linux-gnu-gcc accepts -g... yes checking for x86_64-pc-linux-gnu-gcc option to accept ISO C89... none needed checking dependency style of x86_64-pc-linux-gnu-gcc... gcc3 checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking for ld used by GCC... /usr/x86_64-pc-linux-gnu/bin/ld checking if the linker (/usr/x86_64-pc-linux-gnu/bin/ld) is GNU ld... yes checking for shared library run path origin... done checking for CFPreferencesCopyAppValue... no checking for CFLocaleCopyCurrent... no checking whether to use NLS... no checking for x86_64-pc-linux-gnu-gcc... (cached) x86_64-pc-linux-gnu-gcc checking whether we are using the GNU C compiler... (cached) yes checking whether x86_64-pc-linux-gnu-gcc accepts -g... (cached) yes checking for x86_64-pc-linux-gnu-gcc option to accept ISO C89... (cached) none needed checking dependency style of x86_64-pc-linux-gnu-gcc... (cached) gcc3 checking for a BSD-compatible install... /usr/bin/install -c checking whether ln -s works... yes checking for ALSA CFLAGS... checking for ALSA LDFLAGS... -lasound -lm -ldl -lpthread checking for libasound headers version >= 1.0.16... found. checking for snd_ctl_open in -lasound... yes checking how to run the C preprocessor... x86_64-pc-linux-gnu-gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for ncurses5-config... yes checking for an ANSI C-conforming const... yes checking for inline... inline checking whether time.h and sys/time.h may both be included... yes checking whether x86_64-pc-linux-gnu-gcc needs -traditional... no checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... no configure: creating ./config.status config.status: creating Makefile config.status: creating alsactl/Makefile config.status: creating alsamixer/Makefile config.status: creating amidi/Makefile config.status: creating amixer/Makefile config.status: creating m4/Makefile config.status: creating po/Makefile.in config.status: creating alsaconf/alsaconf config.status: creating alsaconf/Makefile config.status: creating alsaconf/po/Makefile config.status: WARNING: 'alsaconf/po/Makefile.in' seems to ignore the --datarootdir setting config.status: creating aplay/Makefile config.status: creating include/Makefile config.status: creating iecset/Makefile config.status: creating utils/Makefile config.status: creating utils/alsa-utils.spec config.status: creating seq/Makefile config.status: creating seq/aconnect/Makefile config.status: creating seq/aplaymidi/Makefile config.status: creating seq/aseqdump/Makefile config.status: creating seq/aseqnet/Makefile config.status: creating speaker-test/Makefile config.status: creating speaker-test/samples/Makefile config.status: creating include/aconfig.h config.status: executing po-directories commands config.status: creating po/POTFILES config.status: creating po/Makefile config.status: executing depfiles commands make -j2 Making all in include make[1]: Entering directory `/var/tmp/paludis/media-sound-alsa-utils-1.0.17/work/alsa-utils-1.0.17/include' cd .. && /bin/sh /var/tmp/paludis/media-sound-alsa-utils-1.0.17/work/alsa-utils-1.0.17/missing --run autoheader rm -f stamp-h1 touch aconfig.h.in cd .. && /bin/sh ./config.status include/aconfig.h config.status: creating include/aconfig.h config.status: include/aconfig.h is unchanged /usr/bin/make all-am make[2]: Entering directory `/var/tmp/paludis/media-sound-alsa-utils-1.0.17/work/alsa-utils-1.0.17/include' make[2]: Leaving directory `/var/tmp/paludis/media-sound-alsa-utils-1.0.17/work/alsa-utils-1.0.17/include' make[1]: Leaving directory `/var/tmp/paludis/media-sound-alsa-utils-1.0.17/work/alsa-utils-1.0.17/include' Making all in alsactl make[1]: Entering directory `/var/tmp/paludis/media-sound-alsa-utils-1.0.17/work/alsa-utils-1.0.17/alsactl' x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../include -march=athlon64 -O2 -O3 -pipe -fomit-frame-pointer -frename-registers -ftree-vectorize -MT alsactl.o -MD -MP -MF .deps/alsactl.Tpo -c -o alsactl.o alsactl.c x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../include -march=athlon64 -O2 -O3 -pipe -fomit-frame-pointer -frename-registers -ftree-vectorize -MT state.o -MD -MP -MF .deps/state.Tpo -c -o state.o state.c mv -f .deps/alsactl.Tpo .deps/alsactl.Po x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../include -march=athlon64 -O2 -O3 -pipe -fomit-frame-pointer -frename-registers -ftree-vectorize -MT names.o -MD -MP -MF .deps/names.Tpo -c -o names.o names.c names.c: In function 'probe_rawmidi_virtual': names.c:288: error: 'snd_rawmidi_t' undeclared (first use in this function) names.c:288: error: (Each undeclared identifier is reported only once names.c:288: error: for each function it appears in.) names.c:288: error: 'rawmidi1' undeclared (first use in this function) names.c:288: error: 'rawmidi2' undeclared (first use in this function) names.c:294: error: 'SND_RAWMIDI_NONBLOCK' undeclared (first use in this function) names.c: In function 'probe_rawmidi_card': names.c:318: error: 'snd_rawmidi_info_t' undeclared (first use in this function) names.c:318: error: 'info1' undeclared (first use in this function) names.c:318: error: 'info2' undeclared (first use in this function) names.c:335: error: 'SND_RAWMIDI_STREAM_OUTPUT' undeclared (first use in this function) names.c:339: error: 'SND_RAWMIDI_STREAM_INPUT' undeclared (first use in this function) names.c:345: warning: assignment makes pointer from integer without a cast names.c:346: warning: assignment makes pointer from integer without a cast names.c:353: warning: assignment makes pointer from integer without a cast names.c:354: warning: assignment makes pointer from integer without a cast names.c:366: warning: assignment makes pointer from integer without a cast names.c:368: warning: assignment makes pointer from integer without a cast make[1]: *** [names.o] Error 1 make[1]: *** Waiting for unfinished jobs.... mv -f .deps/state.Tpo .deps/state.Po make[1]: Leaving directory `/var/tmp/paludis/media-sound-alsa-utils-1.0.17/work/alsa-utils-1.0.17/alsactl' make: *** [all-recursive] Error 1 /usr/libexec/paludis/utils/emake: emake returned error 2 !!! ERROR in media-sound/alsa-utils-1.0.17: !!! In src_compile at line 3889 !!! make failed !!! Call stack: !!! * src_compile (/var/tmp/paludis/media-sound-alsa-utils-1.0.17/temp/loadsaveenv:3889) !!! * ebuild_f_compile (/usr/libexec/paludis/0/src_compile.bash:49) !!! * ebuild_main (/usr/libexec/paludis/ebuild.bash:463) !!! * main (/usr/libexec/paludis/ebuild.bash:478) diefunc: making ebuild PID 30616 exit with error die trap: exiting with error. Install error: * In program paludis (--log-level warning) -i1 alsa-utils: * When performing install action from command line: * When executing install task: * When installing 'media-sound/alsa-utils-1.0.17:0.9::gentoo': * Install error: Install failed for 'media-sound/alsa-utils-1.0.17:0.9::gentoo' Reproducible: Always
Forgot to disable cflags. Here it is again with safe cflags: make Making all in include make[1]: Entering directory `/var/tmp/paludis/media-sound-alsa-utils-1.0.17/work/alsa-utils-1.0.17/include' cd .. && /bin/sh /var/tmp/paludis/media-sound-alsa-utils-1.0.17/work/alsa-utils-1.0.17/missing --run autoheader rm -f stamp-h1 touch aconfig.h.in cd .. && /bin/sh ./config.status include/aconfig.h config.status: creating include/aconfig.h config.status: include/aconfig.h is unchanged /usr/bin/make all-am make[2]: Entering directory `/var/tmp/paludis/media-sound-alsa-utils-1.0.17/work/alsa-utils-1.0.17/include' make[2]: Leaving directory `/var/tmp/paludis/media-sound-alsa-utils-1.0.17/work/alsa-utils-1.0.17/include' make[1]: Leaving directory `/var/tmp/paludis/media-sound-alsa-utils-1.0.17/work/alsa-utils-1.0.17/include' Making all in alsactl make[1]: Entering directory `/var/tmp/paludis/media-sound-alsa-utils-1.0.17/work/alsa-utils-1.0.17/alsactl' x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../include -O2 -pipe -MT alsactl.o -MD -MP -MF .deps/alsactl.Tpo -c -o alsactl.o alsactl.c mv -f .deps/alsactl.Tpo .deps/alsactl.Po x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../include -O2 -pipe -MT state.o -MD -MP -MF .deps/state.Tpo -c -o state.o state.c mv -f .deps/state.Tpo .deps/state.Po x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../include -O2 -pipe -MT names.o -MD -MP -MF .deps/names.Tpo -c -o names.o names.c names.c: In function 'probe_rawmidi_virtual': names.c:288: error: 'snd_rawmidi_t' undeclared (first use in this function) names.c:288: error: (Each undeclared identifier is reported only once names.c:288: error: for each function it appears in.) names.c:288: error: 'rawmidi1' undeclared (first use in this function) names.c:288: error: 'rawmidi2' undeclared (first use in this function) names.c:294: error: 'SND_RAWMIDI_NONBLOCK' undeclared (first use in this function) names.c: In function 'probe_rawmidi_card': names.c:318: error: 'snd_rawmidi_info_t' undeclared (first use in this function) names.c:318: error: 'info1' undeclared (first use in this function) names.c:318: error: 'info2' undeclared (first use in this function) names.c:335: error: 'SND_RAWMIDI_STREAM_OUTPUT' undeclared (first use in this function) names.c:339: error: 'SND_RAWMIDI_STREAM_INPUT' undeclared (first use in this function) names.c:345: warning: assignment makes pointer from integer without a cast names.c:346: warning: assignment makes pointer from integer without a cast names.c:353: warning: assignment makes pointer from integer without a cast names.c:354: warning: assignment makes pointer from integer without a cast names.c:366: warning: assignment makes pointer from integer without a cast names.c:368: warning: assignment makes pointer from integer without a cast make[1]: *** [names.o] Error 1 make[1]: Leaving directory `/var/tmp/paludis/media-sound-alsa-utils-1.0.17/work/alsa-utils-1.0.17/alsactl' make: *** [all-recursive] Error 1 /usr/libexec/paludis/utils/emake: emake returned error 2
I have got same problem here, is there any olution?
(In reply to comment #2) > I have got same problem here, is there any olution? > Some smart person somewhere (can't remember who/where now) said that you need to compile alsa-lib with USE="midi" for this to work! Seems like alsa-utils does not respect the -midi flag, as it's accessing some midi related code...: names.c:318: error: 'snd_rawmidi_info_t' undeclared (first use in this function) names.c:318: error: 'info1' undeclared (first use in this function) names.c:318: error: 'info2' undeclared (first use in this function) names.c:335: error: 'SND_RAWMIDI_STREAM_OUTPUT' undeclared (first use in this function) names.c:339: error: 'SND_RAWMIDI_STREAM_INPUT' undeclared (first use in this function) Eddie
I just hit this too, however I think the real problem may lie with alsa-lib rather than the alsa-utils package itself. With USE=-midi, alsa-utils-1.0.16 and alsa-utils-1.0.17 will BOTH fail to build against either alsa-lib-1.0.17-r1 or alsa-lib-1.0.17a, however both 1.0.16 and 1.0.17 versions of alsa-utils build just fine against alsa-lib-1.0.16. The alsa-headers version seems to make no difference.
*** Bug 246230 has been marked as a duplicate of this bug. ***
*** Bug 245591 has been marked as a duplicate of this bug. ***
*** Bug 246458 has been marked as a duplicate of this bug. ***
same error with 1.0.18
Same problem here with media-sound/alsa-utils-1.0.17.
(In reply to comment #3) > Some smart person somewhere (can't remember who/where now) said that you need > to compile alsa-lib with USE="midi" for this to work! I can confirm this workaround. This worked out: USE="midi" emerge alsa-lib alsa-utils As this issue applies to x86 here I suggest to change the Hardware flag to 'all'.
(In reply to comment #10) I can also confirm this workaround for ppc32. I had no problems with alsa with G4 machines, but it failed with the same error reported above for a G3 ppc32. After adding the midi flag for G3, no problem. (Note midi is default for G4s.) The profile I'm using is default/linux/powerpc/ppc32/2008.0 * for both G3 and G4 machines.
Still an issue with alsa-utils-1.0.17 and Portage on amd46. I have USE="-midi" in /etc/make.conf, as I do not want any kind of midi support. I don't want it. Don't need it. Don't want applications compiled and linked against it. So the workaround of building ALSA against midi is unacceptable. Bumping severity to major, as world updates cannot proceed. I'd mark it blocker, but at least I still have a working version of ALSA, 1.0.16.
Created attachment 176963 [details, diff] modified alsa-utils-1.0.17-seq.patch As there was no activity here I took a closer look at this, and came up with a modified alsa-utils-1.0.17-seq.patch, but then I discovered where the real problem lies... As I stated in comment #4, they compile fine against alsa-lib-1.0.16, but alsa-utils 1.0.14 and up all fail when compiled against alsa-lib 1.0.17 or later with -midi in USE. Looking at the alsa-lib ebuilds, and one of the main changes is 1.0.17* contains $(use_enable midi rawmidi), in place of $(use_enable midi instr) for 1.0.16 (although --disable-instr isn't listed in 1.0.16's ./configure --help...). Changing "use_enable midi rawmidi" back to "use_enable midi instr" in the alsa-lib 1.0.17 ebuilds enables alsa-utils to compile against it again even with USE=-midi, although /usr/lib/libasound.so.2.0.0 is a little larger than with --disable-rawmidi. OTOH, the patch I worked up allows alsa-utils to compile against alsa-lib even with --disable-rawmidi, but I'm no programmer so it's pretty much a complete hack. The patch does two things; 1) it omits the probe_rawmidi_* functions if BUILD_SEQ is not defined 2) it doesn't build amidi, which also failed after the errors in names.c were resolved amidi probably shouldn't be built with USE=-midi anyways... the _only_ thing I'm not so sure of is this change in names.c; static probe_fcn * probes[] = { probe_ctl, probe_pcm, #ifdef BUILD_SEQ probe_rawmidi, #endif probe_timer, probe_seq, NULL }; I have absolutely no idea of the consequences of this (like I said, not a programmer), but alsactl (which is where names.c is used) seems to work fine with this change, even `alsactl names` seems to work fine, which is marked as DEPRECATED and is possibly the only place names.c is used anyways...
(In reply to comment #12) > Still an issue with alsa-utils-1.0.17 and Portage on amd46. > > I have USE="-midi" in /etc/make.conf, as I do not want any kind of midi > support. I don't want it. Don't need it. Don't want applications compiled and > linked against it. So the workaround of building ALSA against midi is > unacceptable. > > Bumping severity to major, as world updates cannot proceed. I'd mark it > blocker, but at least I still have a working version of ALSA, 1.0.16. > Bare in mind the functionality added by USE=-midi is courtesy of a seemingly gentoo-specific patch, namely alsa-utils-1.0.17-seq.patch, and in any other distro you'd probably be stuck with midi. It would probably be easiest to simply remove the midi USE flag altogether, and I for one am grateful to the devs for not doing so.
*** Bug 253397 has been marked as a duplicate of this bug. ***
(In reply to comment #4) > (..), however both 1.0.16 and > 1.0.17 versions of alsa-utils build just fine against alsa-lib-1.0.16. I tried to emerge alsa-utils-1.0.17 with alsa-lib-1.0.16 (by masking alsa-libs-1.0.17) but emerge refuses to do so since alsa-utils-1.0.17 seems to depend on ">=alsa-lib-1.0.17"
Matthias: sorry, I had copied the ebuild to an overlay and relaxed that dependency, I probably should have mentioned that. Anyways, still no action on this? I stated where the problem was and two different possible fixes to it over a month ago...
It's only been 10 weeks since you submitted your patch. Check back around August or September.
I found out that alsa-utils-1.0.19 compiles only if alsa-lib has the midi use enabled, (the state of the flag for alsa-utils doesn't make any difference here). As it seems pretty close to this bug I put my comment here instead of opening a new one.
Same problem here with alsa-lib-0.17a and alsa-utils-0.17 and USE="-midi".
I'm also in the "don't want/need MIDI" camp. At the very least, the ebuild needs to die if USE=-midi so as to not deceive the user into thinking that all is well (assuming alsa-lib gets patched to not support USE=-midi).
Created attachment 189887 [details, diff] Patch for alsa-utils-1.0.18 Here is a patch for alsa-utils-1.0.18, amd64 stable version. BTW it seems that the bug is already fixed in alsa-utils.git so after 1.0.20 will be released the problem will be fixed.
Created attachment 189889 [details] Fixed alsa-utils-1.0.18 ebuild
I just wanted to confirm as comment #22 that installing alsa-lib and alsa-utils without midi wasn't a problem with version 1.0.20.
USE midi has been punted from ALSA in ~arch.
(In reply to comment #25) Good to go. Emerges fine with USE="-midi". Thanks.