Mixxx fails to find libmp3lame on some Linux platforms

Bug #920191 reported by Magnus Holmgren
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Medium
Daniel Schürmann
1.10
Fix Released
Undecided
Daniel Schürmann

Bug Description

src/encoding/encodermp3.cpp:

QLibrary searches LD_LIBRARY_PATH (according to the documentation) unless an absolute filename is provided. By providing an absolute filename you prevent Mixxx from finding libmp3lame.so on 64-bit architectures where 64-bit libraries are installed in /usr/lib64, as well as on Debian, where libraries are installed in per-arch subdirectories of /usr/lib.

#ifdef __LINUX__
    libnames << "libmp3lame.so.0";

should suffice (WITH ".0"). I suspect that a absolute path isn't necessary on MacOS X either.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Thanks Magnus -- you're right we should avoid absolute paths and let the library search path handle it for us.

Changed in mixxx:
status: New → Confirmed
importance: Undecided → Medium
milestone: none → 1.10.1
Revision history for this message
Daniel Schürmann (daschuer) wrote :

QLibrary("mp3lame", 0) and Qt will do the magic.

According to
http://qt-project.org/doc/qt-4.8/qlibrary.html#fileName-prop
this should work for all platforms.
In this case only for Linux and Mac OS, because of the different name in Windows.

The attached patch touches only the Linux Path.
This was tested with Ubuntu 32 bit and should work for 64 bit too as Magnus reported in #0

Changed in mixxx:
status: Confirmed → In Progress
assignee: nobody → Daniel Schürmann (daschuer)
Revision history for this message
Daniel Schürmann (daschuer) wrote :

If a Mac User wants to try this patch, we may simplify the code a bit more ...

http://qt-project.org/doc/qt-4.8/qlibrary.html#QLibrary-3

Revision history for this message
Daniel Schürmann (daschuer) wrote :

A Mac OS Build including the patch of comment #3 can be found here:
http://builds.mixxx.org/builds/experimental-daschuers_trunk/mixxx-1.11.0-alpha-daschuer~daschuers-trunk-bzr2949-macintel32.dmg
If any Mac User wants to test it, please don’t forget to backup your .mixxx folder first.

Revision history for this message
jus (jus) wrote :

I tried mixxx-1.11.0-alpha-daschuer~daschuers-trunk-bzr2952-macintel32 on MacOSX and it throws the "Mixxx cannot record or stream in MP3 ..." error message. The lame file path on my system is /usr/local/lib/libmp3lame.dylib

There is no issue recording in mp3 with the latest trunk.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Hi jus,

Thank you for testing.

Ok, than we take the patch from #2

On Linux the path is generated by Qt to a "libmp3lame.so.0"
On Mac OS, the path is hart coded to /usr/local/lib/libmp3lame.dylib because it has no libmp3lame.0.dylib in any case.

You can try:
http://builds.mixxx.org/builds/experimental-daschuers_trunk/mixxx-1.11.0-alpha-daschuer~daschuers-trunk-bzr2953-macintel32.dmg
if you like.
(Don’t forget to backup your .mixxx folder)

Revision history for this message
jus (jus) wrote :

Tried mixxx-1.11.0-alpha-daschuer~daschuers-trunk-bzr2953-macintel32 and mp3 recording works again. Thanks.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Patch from #2 looks good to me. Feel free to commit -- thanks Daniel!

Changed in mixxx:
milestone: 1.10.1 → 1.11.0
Changed in mixxx:
status: In Progress → Fix Committed
Revision history for this message
- (bartsimpson-l) wrote :

The same on fedora 17 x86_64:

strace output:

pid 29180] open("/usr/lib/libmp3lame.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 29180] open("/usr/lib/libmp3lame.so.0.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 29180] open("/usr/lib/libmp3lame.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
Debug: [EngineSideChain 1]: **** Encoder init failed

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Hi bartsimpson-l,

This is fixed in Mixxx 1.10.1. Are you using Mixxx 1.10.1?

Revision history for this message
- (bartsimpson-l) wrote :

No because it is not in the software repo.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote : Re: [Bug 920191] Re: Mixxx fails to find libmp3lame on some Linux platforms

Ubuntu takes forever to update that. You can use our PPA?
On Dec 8, 2012 11:15 AM, "-" <email address hidden> wrote:

> No because it is not in the software repo.
>
> --
> You received this bug notification because you are a member of Mixxx
> Development Team, which is subscribed to Mixxx.
> https://bugs.launchpad.net/bugs/920191
>
> Title:
> Mixxx fails to find libmp3lame on some Linux platforms
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mixxx/+bug/920191/+subscriptions
>

RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/6255

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.