View previous topic :: View next topic |
Author |
Message |
lars_the_bear Guru
Joined: 05 Jun 2024 Posts: 522
|
Posted: Thu Jun 06, 2024 3:08 pm Post subject: mpg123 -- no ALSA support |
|
|
Hi folks
This is odd. I'm trying to emerge media-source/mpg123-base. It's actually vlc that I want, but this is a dependency. I'm trying to install a system without systemd or pulseaudio. I soon found out that the binary release of mpg123 wasn't going to work, because emerge said:
Code: |
!!! The following binary packages have been ignored due to non matching USE:
=media-sound/mpg123-base-1.32.3 -alsa -sdl
=media-sound/mpg123-base-1.32.3 pulseaudio
|
It looks like you have to have pulseaudio to get the binary, but it seems odd that it says '-alsa' as well.
But I thought building from source would be OK. But it isn't -- still no ALSA support. I tried adding "USE=alsa", but no change.
I looked at the bulld log, and at the end of the ./configure invocation it says:
Code: |
Modules ................. enabled
Checked audio modules ... dummy
Detected audio support .. dummy
Runtime order ........... alsa sdl dummy
|
The only detected audio support is 'dummy'. So I guess that's why no ALSA support.
So I killed the emerge process just after it had unpacked the source (is there a nicer way to keep the source than this?) and ran ./configure at the prompt. It detects ALSA correctly:
Code: |
Modules ................. enabled
Module suffix ........... .la
Checked audio modules ... alsa oss coreaudio sndio sun win32 os2 esd jack portaudio pulse sdl nas arts openal dummy
Detected audio support .. alsa oss dummy
Default output module ... alsa
|
And audio plays just fine if I let it build.
So I'm completely baffled.
1. Why does ALSA support seem to be disabled in the binary release? I can understand why one might want to have pulse audio support, but why disable ALSA?
2. Why does ./configure, when run by emerge, still not detect ALSA? This is bewildering to me.
I really would like to get vlc working, so this is a bit of a blocker. I can work around it, but not in any non-ugly way I can see.
BR, Lars. |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1248 Location: Richmond Hill, Canada
|
Posted: Thu Jun 06, 2024 3:28 pm Post subject: |
|
|
lars_the_bear,
You are thinking Gentoo/Portage in a Linux binary distribution way. This is a bad idea in my opinion.
I saw several questions from you about dependency as well some USE flags question.
In this thread, you said you want "vic" but you try to satisfy its requirement manually, this is incorrect usage in Gentoo. In Gentoo if you want a package you just ask for it using emerge. you fill in the USE flag base on you desire on how to use the application.
So for example, you would do Code: | emerge --pretend --verbose vic | to let Portage to show your current system setting to see if that match your desire. in the case if mpg123-base is not already installed on your system. the emerge will show the build process will try to install mpg123-base first before compile/install vic.
However, if your system setting no USE flag or have intentionally disable the USE flag so the mpg123-base should not be installed, then it will be missing from the emerge --pretend report.
essentially the "USE" flag contral features a package developer deem optional, you as user define your desire indicate you want to enable optional feature.
So if the vic default does not enable mpg123-base you should try to find which USE flag will include the mpg123-base for you, |
|
Back to top |
|
|
Banana Moderator
Joined: 21 May 2004 Posts: 1737 Location: Germany
|
Posted: Thu Jun 06, 2024 6:08 pm Post subject: |
|
|
Quote: | I'm trying to install a system without systemd or pulseaudio. I soon found out that the binary release of mpg123 |
I'm note sure if this is even possible (maybe others do know better)
The binary releases are build for the "most common" usecases. Because the hardware world is as colorful as the human race. You can not make it work for everybody.
So if you want to have more control you should be at the right place with gentoo (but it will not come easy) but then you have to give up some time to get it right. _________________ Forum Guidelines
PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire |
|
Back to top |
|
|
lars_the_bear Guru
Joined: 05 Jun 2024 Posts: 522
|
Posted: Thu Jun 06, 2024 6:23 pm Post subject: |
|
|
pingtoo wrote: | lars_the_bear,
In this thread, you said you want "vic" but you try to satisfy its requirement manually, this is incorrect usage in Gentoo. In Gentoo if you want a package you just ask for it using emerge. you fill in the USE flag base on you desire on how to use the application.
|
Leaving aside, if possible, the question whether I'm building vlc the right way, there's still the issue that I can't install mpg123, which I also want to use.
From what you say, I shouldn't have to do more than
$ emerge media-source/mpg123-base
But it doesn't work.
I doesn't work if I get the binary version, because it has ALSA deliberately excluded (don't know why). It doesn't work if I let emerge build from source because I still get a version without ALSA support. Something in the Gentoo build configuration is stopping mpg123 being built with ALSA support. It's not a problem with the upstream version if I do ./configure, make, etc., in the traditional way.
What can I check? To be honest, this just looks like a bug to me. But I concede that I know so little about Gentoo that I could be missing something that ought to be obvious.
BR, Lars. |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1248 Location: Richmond Hill, Canada
|
Posted: Thu Jun 06, 2024 7:12 pm Post subject: |
|
|
lars_the_bear wrote: | pingtoo wrote: | lars_the_bear,
In this thread, you said you want "vic" but you try to satisfy its requirement manually, this is incorrect usage in Gentoo. In Gentoo if you want a package you just ask for it using emerge. you fill in the USE flag base on you desire on how to use the application.
|
Leaving aside, if possible, the question whether I'm building vlc the right way, there's still the issue that I can't install mpg123, which I also want to use.
From what you say, I shouldn't have to do more than
$ emerge media-source/mpg123-base
But it doesn't work.
I doesn't work if I get the binary version, because it has ALSA deliberately excluded (don't know why). It doesn't work if I let emerge build from source because I still get a version without ALSA support. Something in the Gentoo build configuration is stopping mpg123 being built with ALSA support. It's not a problem with the upstream version if I do ./configure, make, etc., in the traditional way.
What can I check? To be honest, this just looks like a bug to me. But I concede that I know so little about Gentoo that I could be missing something that ought to be obvious.
BR, Lars. |
Beside Gentoo concept, one of guideline for this forum is to provide the error messages and command used that cause the error.
Because Gentoo is not a binary distribution which mean each build have different condition, so it is not possible to guess why your build failed, let a long provide suggestion.
I am not sure why your system try to use binary for emerge, but I guess it is possible your /etc/portage/make.conf have FEATURES=getbinpkg |
|
Back to top |
|
|
lars_the_bear Guru
Joined: 05 Jun 2024 Posts: 522
|
Posted: Thu Jun 06, 2024 8:57 pm Post subject: |
|
|
pingtoo wrote: |
Beside Gentoo concept, one of guideline for this forum is to provide the error messages and command used that cause the error.
|
I'm not sure what more I can tell you. I ran the command
# emerge media-source/mpg123-base
There are no error messages -- I just got a dysfunctional mpg123.
I think there is a problem in the .ebuild script for mpg123. When I look in the build log, I see that the ./configure invocation is this:
Code: |
$ /var/tmp/portage/media-sound/mpg123-base-1.32.3/work/mpg123-1.32.3/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 --datarootdir=/usr/share --disable-dependency-tracking --disable-silent-rules --disable-static --docdir=/usr/share/doc/mpg123-base-1.32.3 --htmldir=/usr/share/doc/mpg123-base-1.32.3/html --with-sysroot=/ --libdir=/usr/lib64 --with-optimization=0 --with-audio=dummy '--with-default-audio= alsa sdl dummy' --with-cpu=x86-64 --enable-network --enable-ipv6 --enable-int-quality=no
|
The `--width-audio` and `--with-default-audio` switches are the wrong way around. The invocation lists three "default" audio outputs, but only one actual audio output, which is 'dummy'. This is illogical -- only one of several audio outputs can be the default, right?
In the .ebuild script we have:
Code: |
local myconf=(
--with-optimization=0
--with-audio=dummy
--with-default-audio="${_audio} dummy"
--with-cpu=${_cpu}
--enable-network
$(use_enable ipv6)
--enable-int-quality=$(usex int-quality)
)
|
./configure is being run incorrectly because the .ebuild script is telling it incorrectly.
I don't see how this can work correctly on any installation -- but maybe nobody but me has tried it?
Anyway -- how do I report a bug?
BR, Lars.
[edited to add:]
I figured out how to log a bug:
https://bugs.gentoo.org/933704 |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1248 Location: Richmond Hill, Canada
|
Posted: Thu Jun 06, 2024 9:35 pm Post subject: |
|
|
lars_the_bear wrote: | $ emerge media-source/mpg123-base
But it doesn't work. | My apology, I interpreted the statement as in the emerge command failed.
If you don't mind please share output of Code: | emerge --pretend --verbose media-source/mpg123-base | This is will give us an idea of how your system setting when you issue the command, so that we can review. why it is dysfunctional.
And can you give us a idea of what do you mean "dysfunctional", does it mean not able to play any sound? or does it mean you don't see any sound device from the application?
I am no expert in ALSA, so I may not able to provide help there. however It is likely that someone who do have knowledge on ALSA also will ask similar question. |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1248 Location: Richmond Hill, Canada
|
Posted: Thu Jun 06, 2024 9:42 pm Post subject: |
|
|
lars_the_bear wrote: | In the .ebuild script we have:
Code: |
local myconf=(
--with-optimization=0
--with-audio=dummy
--with-default-audio="${_audio} dummy"
--with-cpu=${_cpu}
--enable-network
$(use_enable ipv6)
--enable-int-quality=$(usex int-quality)
)
|
./configure is being run incorrectly because the .ebuild script is telling it incorrectly.
I don't see how this can work correctly on any installation -- but maybe nobody but me has tried it?
|
So I took a look at the media-sound/mpg123-base ebuild, not sure if you notice Code: | multilib_src_configure() {
local _audio=
local _cpu=generic_fpu
# Build fails without -D_GNU_SOURCE like this:
# error: ‘struct hostent’ has no member named ‘h_addr’
append-cflags -D_GNU_SOURCE
append-lfs-flags
if $(multilib_is_native_abi) ; then
local flag
for flag in coreaudio pulseaudio jack alsa oss sdl portaudio nas ; do
if use ${flag}; then
_audio+=" ${flag/pulseaudio/pulse}"
fi
done
fi
use cpu_flags_ppc_altivec && _cpu=altivec
... |
as you you can see if one of "coreaudio pulseaudio jack alsa oss sdl portaudio nas" USE flag enabled, it will have a _audio defined in the --with-default-audio="${_audio} dummy". which should let emerge build the application one or more driver.
So as you can see it is important to share the emerge invocation detail to help us to understand what is going on, |
|
Back to top |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 1921
|
Posted: Thu Jun 06, 2024 10:05 pm Post subject: |
|
|
Just built media-sound/mpg123-base with the alsa USE and it plays mp3s just fine via alsa.
Yes, it has this in the configure output: Code: | Modules ................. enabled
Checked audio modules ... dummy
Detected audio support .. dummy
Runtime order ........... alsa sdl dummy |
Maintainers of the package often have more intimate knowledge of what should be fed to configure then the average dev/user.
It is not a good thing to rely on automatic detection. Gentoo ebuilds often frown on this and rely on explicit options when possible.
Here is what mpg123 can see: Code: | ~ $ mpg123 --list-devices
Devices for output module alsa:
null Discard all samples (playback) or generate zero samples (capture)
default:CARD=Generic HD-Audio Generic, ALC1220 Analog Default Audio Device
sysdefault:CARD=Generic HD-Audio Generic, ALC1220 Analog Default Audio Device
front:CARD=Generic,DEV=0 HD-Audio Generic, ALC1220 Analog Front output / input
surround21:CARD=Generic,DEV=0 HD-Audio Generic, ALC1220 Analog 2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Generic,DEV=0 HD-Audio Generic, ALC1220 Analog 4.0 Surround output to Front and Rear speakers
surround41:CARD=Generic,DEV=0 HD-Audio Generic, ALC1220 Analog 4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Generic,DEV=0 HD-Audio Generic, ALC1220 Analog 5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Generic,DEV=0 HD-Audio Generic, ALC1220 Analog 5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Generic,DEV=0 HD-Audio Generic, ALC1220 Analog 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Generic,DEV=0 HD-Audio Generic, ALC1220 Digital IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=HDMI,DEV=0 HDA ATI HDMI, Generic Digital HDMI Audio Output
~ $ mpg123 --list-modules
Available modules
-----------------
alsa output Output audio using Advanced Linux Sound Architecture (ALSA).
dummy output Dummy audio output - does not output audio.
sdl output Output audio using SDL (Simple DirectMedia Layer).
raw output raw headerless stream (builtin)
cdr output compact disc digital audio stream (builtin)
wav output RIFF WAVE file (builtin)
au output Sun AU file (builtin)
test output output into the void (builtin)
sleep output output into the void that takes its time (builtin)
hex output interleaved hex printout (builtin)
txt output plain text printout, a column per channel (builtin) |
|
|
Back to top |
|
|
lars_the_bear Guru
Joined: 05 Jun 2024 Posts: 522
|
Posted: Fri Jun 07, 2024 7:57 am Post subject: |
|
|
grknight wrote: | Just built media-sound/mpg123-base with the alsa USE and it plays mp3s just fine via alsa.
|
OK, but It doesn't work for me.
# USE=alsa emerge media-sound/mgp123-base
# mpg123 --list-modules
Available modules
-----------------
dummy output Dummy audio output - does not output audio.
raw output raw headerless stream (builtin)
cdr output compact disc digital audio stream (builtin)
wav output RIFF WAVE file (builtin)
au output Sun AU file (builtin)
test output output into the void (builtin)
sleep output output into the void that takes its time (builtin)
hex output interleaved hex printout (builtin)
txt output plain text printout, a column per channel (builtin)
Same as yours, but no alsa. No sdl either, FWIW.
I think the fact that it works for you (and maybe others) can only be the result of some fluke in the build process. I just don't know enough about emerge to know what that is. What I do know is that if I run "./configure" with the arguments that emerge provides, then all the ALSA stuff is commented out in Makefile, and the file library that does ALSA:
./src/libout123/modules/.libs/output_alsa.so
never gets built. You could check this yourself, if you had a mind to.
What I've also discovered is that this is hard to test. mpg123 doesn't actually care how ./configure was run, when it comes to determine what output modules it has. At runtime, it just enumerates the .so files in /usr/lib/mpg123. If output_alsa.so is there, it will be included at runtime.
What this means is that if 'emerge mpg123' produces a 'bad' build (as it does for me) it won't break an earlier, correct, installation. Nor will it break a manual installation that puts files in the same places that emerge does (and that's good for me, because I now have a way forward).
Conceivably, the emerge build has '--with-audio=dummy' because it expects output_also.so to exist already, from some other package? I really don't know. In any event, this is hard to test because I think you more-or-less have to start with a completely clean installation (as, of course, I have) to see the problem.
I will update the bug report with these observations, FWIW.
BR, Lars.
. |
|
Back to top |
|
|
lars_the_bear Guru
Joined: 05 Jun 2024 Posts: 522
|
Posted: Fri Jun 07, 2024 8:29 am Post subject: |
|
|
OK, I've figured it out.
The reason that 'emerge mpg123-base' runs ./configure with --with-audio=dummy is because the output plugins actually come from a different package -- media-plugins/mpg123-output-plugins.
I had already run 'emerge vlc', which had installed mpg123 and thus mpg123-output-plugins. But, because I did not say 'USE=alsa' at that time, I got a version of mpg123-output-plugins with no ALSA support.
So when I then ran 'USE=alsa emerge mpg123-base' it rebuilt mpg123, but it didn't rebuild mpg123-output-plugins. So I still got no ALSA support. I was rebuilding the wrong thing, because the ALSA support wasn't in that package.
So -- how do I run 'emerge' in such a way that the package and all its dependencies get built with the new USE setting? I've fixed the immediate problem by reinstalling mpg123-output-plugins explicitly with USE=alsa, but surely there's a better way?
My broader question is: why is `USE=alsa` not a default? Are there Linux systems around that don't have ALSA support? I haven't seen on since the 90s. That I have to ask for ALSA explicitly was a real poke in the eye for me.
BR, Lars. |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5118 Location: Bavaria
|
Posted: Fri Jun 07, 2024 10:54 am Post subject: |
|
|
lars_the_bear wrote: | My broader question is: why is `USE=alsa` not a default? Are there Linux systems around that don't have ALSA support? |
You will get it as default if you use a desktop profile (see: "eselect profile list") ... usually a server does not need sound
I suggest to select ("eselect profile set X) a desktop profile and do a world-update ("emerge -uUDvp @world" shows what portage would do; then do the same command without "p"). _________________ https://wiki.gentoo.org/wiki/User:Pietinger |
|
Back to top |
|
|
lars_the_bear Guru
Joined: 05 Jun 2024 Posts: 522
|
Posted: Fri Jun 07, 2024 11:34 am Post subject: |
|
|
pietinger wrote: |
I suggest to select ("eselect profile set X) a desktop profile and do a world-update ("emerge -uUDvp @world" shows what portage would do; then do the same command without "p"). |
Yeah. Somebody on the bug report said the same.
Problem is -- that's what I did, right from the start. I chose profile 23. It's never been changed.
I'm starting the whole installation again, because I can only assume that the installation is borked somewhere.
I'm doing another installation, on a 2012 Lenovo Perhaps I'll see where I went wrong.
BR, Lars. |
|
Back to top |
|
|
NichtDerHans Apprentice
Joined: 27 Jan 2023 Posts: 177
|
Posted: Fri Jun 07, 2024 11:51 am Post subject: |
|
|
Waht is profile 23? |
|
Back to top |
|
|
lars_the_bear Guru
Joined: 05 Jun 2024 Posts: 522
|
Posted: Fri Jun 07, 2024 12:23 pm Post subject: |
|
|
NichtDerHans wrote: | Waht is profile 23? |
It's 'default/linux/amd64/23.0/desktop (stable)'
BR, Lars. |
|
Back to top |
|
|
lars_the_bear Guru
Joined: 05 Jun 2024 Posts: 522
|
Posted: Fri Jun 07, 2024 1:02 pm Post subject: |
|
|
Well, I did a complete reinstall, and got the same problem. I did
# emerge media-sound/mpg123-base
more-or-less the first thing I did after booting from the hard disk. I have in make.conf
USE=-pulseaudio -systemd X alsa
even though 'alsa' should be included in the profile.
After the installation, no output drivers were installed. /usr/lib64/mpg123 did not exist.
To fix the problem, I had to do
# USE=alsa media-plugins/mpg123-output-plugins
Weirdly, though, 'equery g media-source/mpg123-base' does not even list 'mpg123-output-plugins' as a dependency. It did last time I installed, even though I got a broken version with no ALSA support.
So the failures are different -- previously emerge knew that mpg123-output-plugins was a dependency of mpg123, even though I got a broken version. This time, emerge doesn't even seem to see the dependency at all.
I simply have no idea how to troubleshoot a problem like this, because I just don't know enough about how emerge works. It's a bit of a bore, to be honest -- I've spent more than two days trying to get emerge to install something that I can build from source in less than ten minutes.
To be honest, I'd be happy just to build it from source, but mpg123 is a dependency of vlc, so I guess it has to be installed using emerge, unless I want to build vlc from source as well.
BR, Lars. |
|
Back to top |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 1921
|
Posted: Fri Jun 07, 2024 1:16 pm Post subject: |
|
|
lars_the_bear wrote: | To be honest, I'd be happy just to build it from source, but mpg123 is a dependency of vlc, so I guess it has to be installed using emerge, unless I want to build vlc from source as well. |
Yes, media-sound/mpg123-base is needed by vlc to decode mp3 files. But it does not need mpg123-base to offer alsa output. vlc itself will do the alsa bits.
Just trust in the process as this is very well tested.
If you wanted to run mpg123 from the command-line, install media-sound/mpg123 metapackage which does what you want. |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5118 Location: Bavaria
|
Posted: Fri Jun 07, 2024 1:34 pm Post subject: |
|
|
lars_the_bear,
in addition to everything our great developer grknight said, I would like to invite you to try the following:
Check your active use-flags with “emerge --info”, then change your existing line USE= in your make.conf to: USE="-pulseaudio” (you absolutely need the “) and do another “emerge --info” ... you should have the same result. Why ? Because “X” and “alsa” are already set by the desktop profile. _________________ https://wiki.gentoo.org/wiki/User:Pietinger |
|
Back to top |
|
|
lars_the_bear Guru
Joined: 05 Jun 2024 Posts: 522
|
Posted: Fri Jun 07, 2024 3:05 pm Post subject: |
|
|
pietinger wrote: |
Check your active use-flags with “emerge --info”, then change your existing line USE= in your make.conf to: USE="-pulseaudio” (you absolutely need the “) and do another “emerge --info” ... you should have the same result. Why ? Because “X” and “alsa” are already set by the desktop profile. |
Thanks. But I've had `-pulseaudio` right from the start.
`emerge --info` shows that USE includes 'alsa', and there's not reference to pulseaudio.
To be honest, I don't really have time to look into this further -- I have a solution, even though I'm not sure why I need it. I need to get pCloud, vlc, and LibreOffice working now -- then I have the basics of a system I can use. Oh, and network printing. And Bluetooth. And Wifi, on the laptop. And...
BR, Lars. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|