LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-13-2021, 04:06 PM   #1
joe.krzeszewski
LQ Newbie
 
Registered: Sep 2021
Posts: 3

Rep: Reputation: Disabled
Odd problem with mpg123


Greetings all!

I don't know if this is the right place to ask the question, but I have an issue with mpg123 on Slackware Current.

The short version of the story is this:

mpg123 doesn't work if called with the full path but does work if just called.

e.g.

Code:
mpg123 foo.mp3
works while

Code:
/usr/bin/mpg123 foo.mp3
will fail with this:

Code:
/usr/bin/mpg123 *.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
        version 1.29.0; written and copyright by Michael Hipp and others
        free software (LGPL) without any warranty but with best wishes
[src/libout123/module.c:open_module_here():133] error: Failed to open module pulse.
[src/libout123/libout123.c:out123_open():484] error: Found no driver out of [pulse] working with device <default>.
main: [src/mpg123.c:check_fatal_output():331] error: out123 error 3: failure loading driver module
I had a clean 14.2 64 bit system then upgraded to Current. I noticed the problem because calling /usr/bin/mpg123 in cron failed while calling mpg123 on the command line worked. When I called /usr/bin/mpg123 on the command line it failed with the above error.

I can't figure out what is different between the two cases.

Is this something broken in Current, or just me?

Thanks!
 
Old 09-14-2021, 02:43 PM   #2
gegechris99
Senior Member
 
Registered: Oct 2005
Location: France
Distribution: Slackware current 64bit
Posts: 1,078
Blog Entries: 5

Rep: Reputation: 277Reputation: 277Reputation: 277
mpg123 works here with both mpg123 and /usr/bin/mpg123 commands in Slackware64 current.

Something might be missing from your upgrade from 14.2 to current.

As a first step, check that pulse module is available:

Code:
$/usr/bin/mpg123 --list-modules

Available modules
-----------------
alsa           output  Output audio using Advanced Linux Sound Architecture (ALSA).
dummy          output  Dummy audio output - does not output audio.
pulse          output  Output audio using PulseAudio Server
sdl            output  Output audio using SDL (Simple DirectMedia Layer).
oss            output  Output audio using OSS
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)
hex            output  interleaved hex printout (builtin)
txt            output  plain text printout, a column per channel (builtin)
then provide the output of this cat command:
Code:
$cat /etc/asound.conf 
# ALSA system-wide config file
# By default, redirect to PulseAudio:
pcm.default pulse
ctl.default pulse
 
1 members found this post helpful.
Old 09-15-2021, 12:20 AM   #3
joe.krzeszewski
LQ Newbie
 
Registered: Sep 2021
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thanks for the help. It sounds like it is just me.

As suggested...

Code:
> /usr/bin/mpg123 --list-modules

Available modules
-----------------
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)
hex            output  interleaved hex printout (builtin)
txt            output  plain text printout, a column per channel (builtin)
and

Code:
> cat /etc/asound.conf 
# ALSA system-wide config file
# By default, redirect to PulseAudio:
pcm.default pulse
ctl.default pulse
So it looks like /usr/bin/mpg123 doesn't have the output modules it needs... however, the one that works does.

Code:
> mpg123 --list-modules

Available modules
-----------------
alsa           output  Output audio using Advanced Linux Sound Architecture (ALSA).
oss            output  Output audio using OSS
pulse          output  Output audio using PulseAudio Server
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)
hex            output  interleaved hex printout (builtin)
txt            output  plain text printout, a column per channel (builtin)
This feels for all the world like I somehow have two copies of mpg123 hanging around.

I would have thought that /usr/bin/mpg123 would have been upgraded when I changed to Current. Then again, I am not sure it would have even worked in 14.2 without alsa or oss modules.
 
Old 09-15-2021, 12:44 AM   #4
Petri Kaukasoina
Member
 
Registered: Mar 2007
Posts: 742

Rep: Reputation: 484Reputation: 484Reputation: 484Reputation: 484Reputation: 484
Try
Code:
type mpg123
 
Old 09-15-2021, 12:45 AM   #5
joe.krzeszewski
LQ Newbie
 
Registered: Sep 2021
Posts: 3

Original Poster
Rep: Reputation: Disabled
Aha! Progress...

I figured out that if I install the "mpg123-compat32-1.29.0-x86_64-1compat32" from "multilib" it breaks /usr/bin/mpg123 but not mpg123 without the full path.
If I uninstall "mpg123-compat32-1.29.0-x86_64-1compat32" both mpg123 and /usr/bin/mpg123 work fine.

So this is a multilib issue?
 
Old 09-15-2021, 12:57 AM   #6
gsl
Member
 
Registered: Jun 2007
Location: Australia
Distribution: Slackware
Posts: 46

Rep: Reputation: 24
Quote:
Originally Posted by joe.krzeszewski View Post
Thanks for the help. It sounds like it is just me.
It's not just you. I see the same thing with "mpg123 --list-modules" showing pulse, alsa, etc. and "/usr/bin/mpg123 --list-modules" not showing them.

Code:
> which mpg123
/usr/bin/mpg123
My system is multilib and "/usr/bin/32/mpg123 --list-modules" shows all modules and plays mp3s fine, but "/usr/bin/mpg123" doesn't work.

No idea why it happens or whether it is evidence of a problem but it does seem strange.

Geoff.
 
Old 09-15-2021, 02:35 AM   #7
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 -current
Posts: 1,110

Rep: Reputation: 817Reputation: 817Reputation: 817Reputation: 817Reputation: 817Reputation: 817Reputation: 817
Quote:
Originally Posted by joe.krzeszewski View Post
If I uninstall "mpg123-compat32-1.29.0-x86_64-1compat32" both mpg123 and /usr/bin/mpg123 work fine.
You can check which binary is being called with 'type' (or 'which'). From the sounds of it, without mpg123-compat32-1.29.0-x86_64-1compat32 installed `type mpg123` will return "/usr/bin/mpg123", whereas with that package installed `type mpg123` will return "/usr/bin/32/mpg123"?

*edit* Hmm no, just read the post above, it must break mpg123 in a different way..

Last edited by drgibbon; 09-15-2021 at 02:39 AM.
 
Old 09-15-2021, 06:35 AM   #8
Petri Kaukasoina
Member
 
Registered: Mar 2007
Posts: 742

Rep: Reputation: 484Reputation: 484Reputation: 484Reputation: 484Reputation: 484
Maybe you have /etc/profile.d/32dev.sh executable? If you are not building 32-bit stuff just now, don't.
 
Old 09-16-2021, 07:34 PM   #9
kingbeowulf
Senior Member
 
Registered: Oct 2003
Location: WA
Distribution: Slackware
Posts: 1,129
Blog Entries: 11

Rep: Reputation: 559Reputation: 559Reputation: 559Reputation: 559Reputation: 559Reputation: 559
Interesting...I was able to reproduce the OP issue here. This seems to be a multilib quirk. All Current systems updated as of 7 days ago. /etc/profile.d/32dev.sh is not executable

System 1: Slackware64-Current w/ mulitlib, clean install when current hit kernel 5.4 last year.
mpg123 works
/usr/bin/mpg123 fails

System 2: Slackware64-Current pure no multilib
mpg123 works
/usr/bin/mpg123 works

System 3: Slackware64-Current w/ mulitlib, clean install a few months ago
mpg123 works
/usr/bin/mpg123 fails

On the multilib systems, '/usr/bin/32/mpg123' works as well, and sees the full module list. Module listing on System 2 (no multilib) provides identical output for mpg123 and /usr/bin/mpg123.

Weird stuff.
 
Old 09-16-2021, 08:02 PM   #10
gsl
Member
 
Registered: Jun 2007
Location: Australia
Distribution: Slackware
Posts: 46

Rep: Reputation: 24
As another data point, I checked my work PC running 14.2 multilib with mpg123 1.23.4 and all cases played mp3s fine (mpg123, /usr/bin/mpg123 & /usr/bin/32/mpg123).

Geoff.
 
Old 09-17-2021, 09:57 PM   #11
Pithium
Member
 
Registered: Jul 2014
Location: Vancouver, WA
Distribution: Slackware 14.2/current
Posts: 106

Rep: Reputation: 103Reputation: 103
I think I found the source of the problem. On runtime mpg123 scans for its module directory. If $MPG123_MODDIR is not specified then it tries to scan based on the path specified by the user. You can manually override this by adding the env variable like this:

Code:
   
$ mpg123 --list-modules

Available modules
-----------------
alsa           output  Output audio using Advanced Linux Sound Architecture (ALSA).
dummy          output  Dummy audio output - does not output audio.
oss            output  Output audio using OSS
pulse          output  Output audio using PulseAudio Server
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)
hex            output  interleaved hex printout (builtin)
txt            output  plain text printout, a column per channel (builtin)
$ /usr/bin/mpg123 --list-modules

Available modules
-----------------
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)
hex            output  interleaved hex printout (builtin)
txt            output  plain text printout, a column per channel (builtin)
$ MPG123_MODDIR=/usr/lib64/mpg123/ /usr/bin/mpg123 --list-modules

Available modules
-----------------
alsa           output  Output audio using Advanced Linux Sound Architecture (ALSA).
dummy          output  Dummy audio output - does not output audio.
oss            output  Output audio using OSS
pulse          output  Output audio using PulseAudio Server
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)
hex            output  interleaved hex printout (builtin)
txt            output  plain text printout, a column per channel (builtin)
$ MPG123_MODDIR=/usr/lib/mpg123/ /usr/bin/mpg123 --list-modules

Available modules
-----------------
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)
hex            output  interleaved hex printout (builtin)
txt            output  plain text printout, a column per channel (builtin)

Last edited by Pithium; 09-17-2021 at 09:59 PM.
 
2 members found this post helpful.
Old 09-17-2021, 10:31 PM   #12
Pithium
Member
 
Registered: Jul 2014
Location: Vancouver, WA
Distribution: Slackware 14.2/current
Posts: 106

Rep: Reputation: 103Reputation: 103
I think the problem might be upstream. If you don't specify the environment it tries to search relative to the binpath. modulesearch[] is not aware of 64bit paths.

lib64_moddir_fix.patch
Code:
diff -Naur mpg123-1.28.2-original/src/libout123/module.c mpg123-1.28.2/src/libout123/module.c
--- mpg123-1.28.2-original/src/libout123/module.c	2021-07-11 00:17:04.000000000 -0700
+++ mpg123-1.28.2/src/libout123/module.c	2021-09-17 20:04:45.764270212 -0700
@@ -29,7 +29,8 @@
    to wide and then replace / by \. No need to define another list. */
 static const char* modulesearch[] =
 {
-	 "../lib/mpg123"
+      "../lib64/mpg123"
+	, "../lib/mpg123"
 	,"plugins"
 	,"libout123/modules/.libs"
 	,"libout123/modules"
patch -p1 < lib64_moddir_fix.patch in source/ap/mpg123/mpg123.SlackBuild seems to solve the problem.
 
2 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Odd situation with raid10 array, odd number of drives, and it took, can't regrow now Red Squirrel Linux - Software 9 08-08-2014 02:15 PM
Run mpg123: system("mpg123"); How to know what PID it gets? And a Emacs highlightin q kornerr Programming 10 08-06-2005 10:17 AM
Start mpg123 problem satimis Linux - Software 4 01-21-2004 01:02 AM
Starting mpg123 problem satimis Linux - Software 4 01-20-2004 09:07 AM
Sound only with mpg123, not through GUIs tunedLow Linux - Newbie 0 01-09-2002 10:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration