Bug 760039 - phonon_backend gstreamer could not be loaded
Summary: phonon_backend gstreamer could not be loaded
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: phonon
Version: 15
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-05 10:23 UTC by Rafael Louback Ferraz
Modified: 2012-04-01 22:55 UTC (History)
8 users (show)

Fixed In Version: phonon-4.5.1-3.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-01 22:55:57 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Trolltech.conf on /etc/ diretory (45 bytes, application/octet-stream)
2011-12-05 16:50 UTC, Rafael Louback Ferraz
no flags Details
Trolltech.conf on $HOME/.config/ diretory (11.00 KB, application/octet-stream)
2011-12-05 16:51 UTC, Rafael Louback Ferraz
no flags Details
strace log of qmusicplayer (54.12 KB, application/x-bzip)
2011-12-07 17:54 UTC, Rafael Louback Ferraz
no flags Details

Description Rafael Louback Ferraz 2011-12-05 10:23:14 UTC
same bug as this: https://bugs.launchpad.net/ubuntu/+source/phonon/+bug/250772

but using fedora 16 x86_64, with phonon:

phonon-backend-gstreamer-4.5.90-3.fc16.x86_64
phonon-4.5.57-3.20111031.fc16.x86_64
phonon-devel-4.5.57-3.20111031.fc16.x86_64

and qt:

qt-4.8.0-0.23.rc1.fc16.x86_64

Comment 1 Rex Dieter 2011-12-05 11:21:16 UTC
I doubt ubuntu's 2-year-old bug is relevant here, even if the symptoms seem the same.

Comment 2 Rafael Louback Ferraz 2011-12-05 12:18:00 UTC
(In reply to comment #1)
> I doubt ubuntu's 2-year-old bug is relevant here, even if the symptoms seem the
> same.

Ok, but my program gives the same error:

WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
Phonon::createPath: Cannot connect Phonon::MediaObject(no objectName) to Phonon::AudioOutput(no objectName).
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded

Comment 3 Rafael Louback Ferraz 2011-12-05 12:23:36 UTC
I write a simples test, using this command:

Phonon::MediaObject *mediaObject = Phonon::createPlayer(Phonon::NoCategory, Phonon::MediaSource("./file.ogg"));

mediaObject->play();

It worked in previous versions of qt on fedora, and still working on windows 7 with qt 4.7.4

Comment 4 Kevin Kofler 2011-12-05 12:36:21 UTC
The installation location of the Phonon stuff is the same in current Fedora 15 updates (Phonon 4.5.1) and current Fedora 16 updates (Phonon 4.5.57).

I think your problem is related to, but not the same as the Ubuntu issue. What's going on is that Phonon installs to /usr/lib(64)/kde4/plugins/phonon_backend/, which is only added to the Qt plugin path for KDE Plasma sessions. I see 2 possible fixes:
* unconditionally add this to the Qt plugin path (in /etc/profile.d, as we have been doing in the past, though only if KDE stuff was installed – we'd need to move this to kde-filesystem or something equally low-level instead to enforce this even for only Phonon) or
* install the Phonon stuff to the default Qt plugin directory instead.

Comment 5 Rex Dieter 2011-12-05 13:05:48 UTC
One way to find out for sure, set

QT_PLUGIN_PATH=/usr/lib64/kde4/plugins

does it work now?

Comment 6 Rex Dieter 2011-12-05 13:32:59 UTC
From a irc chat with phonon dev:

[12/05/11 07:19] <tdfischer> hmm
[12/05/11 07:19] <tdfischer>         QCoreApplication::addLibraryPath(QLatin1String(PHONON_LIBRARY_PATH));
[12/05/11 07:19] <tdfischer> if no platform plugin is loaded, that should cause QLibrary to look inside kde4/plugins

So, in general, PHONON_LIBRARY_PATH should get searched regardless of whether one is in a plasma session or not.

and my simple test using xfce + clementine (a qt-only phonon-using application) worked ok for me.

So, it's hard to say yet.

Comment 7 Torrie Fischer 2011-12-05 13:36:09 UTC
According to the backend loading code in libphonon, it first checks if there is a platform plugin and if it provides a backend. If not, it then searches QCoreApplication::libraryPaths() + "/phonon_backend/" for the first loadable plugin.

Prior to getting to this point, it adds PHONON_LIBRARY_PATH to that list, which is defined at buildtime to ${PLUGIN_INSTALL_DIR}/plugins.

This feels to me like a buggy system, and not a libphonon bug. This code was added in 2008 according to git, and you seem to be the only person with this bug.

Could you find out what QT_PLUGIN_PATH is and the value of libraryPath in any Trolltech.conf you find on your system?

Comment 8 Rafael Louback Ferraz 2011-12-05 16:49:47 UTC
echo $QT_PLUGIN_PATH returns an empty line. And none of the Trolltech.conf files has an line with libraryPath.

Comment 9 Rafael Louback Ferraz 2011-12-05 16:50:16 UTC
Created attachment 541013 [details]
Trolltech.conf on /etc/ diretory

Comment 10 Rafael Louback Ferraz 2011-12-05 16:51:38 UTC
Created attachment 541014 [details]
Trolltech.conf on $HOME/.config/ diretory

Comment 11 Rafael Louback Ferraz 2011-12-05 16:59:15 UTC
doing QT_PLUGIN_PATH=/usr/lib64/kde4/plugins doesnt solve the problem

Comment 12 Rex Dieter 2011-12-05 17:08:46 UTC
You've some other problem then, resetting summary.

Mind reproducing the test I tried?

yum install clementine
and, run it, (ideally with some audio files in ~/Music)


what DE are you using?


mind posting your code that doesn't work?

Comment 13 Rex Dieter 2011-12-05 17:10:33 UTC
Or another simple test case,

yum install qt-examples

and run,
/usr/lib64/qt4/examples/phonon/qmusicplayer

Comment 14 Rex Dieter 2011-12-05 17:11:02 UTC
er, make that:
/usr/lib64/qt4/examples/phonon/qmusicplayer/qmusicplayer

Comment 15 Kevin Kofler 2011-12-05 17:13:22 UTC
An strace log might also be helpful, to see where it's looking for the plugin.

Comment 16 Kevin Kofler 2011-12-05 17:14:03 UTC
Oh, and are you sure your app is 64-bit? 32-bit apps need the 32-bit phonon-backend-gstreamer multilib.

Comment 17 Rafael Louback Ferraz 2011-12-05 23:59:57 UTC
I installed phonon-backend-gstreamer 32-bits and dont work anyway.

Comment 18 Rafael Louback Ferraz 2011-12-07 17:53:20 UTC
Some error message using qmusicplayer

Comment 19 Rafael Louback Ferraz 2011-12-07 17:54:06 UTC
Created attachment 542091 [details]
strace log of qmusicplayer

Comment 20 Rex Dieter 2011-12-07 18:15:28 UTC
Well, I'll be a monkey's uncle,

QT_PLUGIN_PATH= \
/usr/lib64/qt4/examples/phonon/qmusicplayer/qmusicplayer
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded 

and, indeed, looking through my own strace, see no references to /usr/lib64/kde4/plugins

but,
QT_PLUGIN_PATH=/usr/lib64/kde4/plugins \ /usr/lib64/qt4/examples/phonon/qmusicplayer/qmusicplayer

go figure.

Now, here's the oops, methinks, PHONON_LIBRARY_PATH looks like a relative path according to cmake's generated files:

phonon/CMakeFiles/phonon.dir/flags.make:... -DPHONON_LIBRARY_PATH=\"lib64/kde4/plugins\"

I'd have expected this to be /usr/lib64/kde4/plugins instead.

Comment 21 Rex Dieter 2011-12-07 18:23:34 UTC
Yup, according to FindKDE4Internal.cmake
#  PLUGIN_INSTALL_DIR       - the subdirectory relative to the install prefix where plugins will be installed (default is ${KDE4_LIB_INSTALL_DIR}/kde4)

So, Ill try prepending PREFIX in there somewhere

diff -up phonon-4.5.57/phonon/CMakeLists.txt.plugindir phonon-4.5.57/phonon/CMakeLists.txt
--- phonon-4.5.57/phonon/CMakeLists.txt.plugindir       2011-10-21 08:54:42.000000000 -0500
+++ phonon-4.5.57/phonon/CMakeLists.txt 2011-12-07 12:18:01.148682382 -0600
@@ -78,7 +78,7 @@ if (PHONON_NO_PLATFORMPLUGIN)
     add_definitions(-DQT_NO_PHONON_PLATFORMPLUGIN)
 endif (PHONON_NO_PLATFORMPLUGIN)
 
-add_definitions(-DPHONON_LIBRARY_PATH="${PLUGIN_INSTALL_DIR}/plugins")
+add_definitions(-DPHONON_LIBRARY_PATH="${CMAKE_INSTALL_PREFIX}/${PLUGIN_INSTALL_DIR}/plugins")
 
 automoc4_add_library(phonon SHARED ${phonon_LIB_SRCS})
 target_link_libraries(phonon ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})


this seems to do the trick, makes the case of unsetting QT_PLUGIN_PATH work for me without error.

Comment 22 Fedora Update System 2011-12-07 18:58:54 UTC
phonon-4.5.57-4.20111031.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/phonon-4.5.57-4.20111031.fc16

Comment 23 Fedora Update System 2011-12-07 19:19:20 UTC
phonon-4.5.1-2.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/phonon-4.5.1-2.fc15

Comment 24 Fedora Update System 2011-12-10 19:39:30 UTC
Package phonon-4.5.1-2.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing phonon-4.5.1-2.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-16858/phonon-4.5.1-2.fc15
then log in and leave karma (feedback).

Comment 25 Fedora Update System 2011-12-22 22:38:29 UTC
phonon-4.5.57-4.20111031.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 26 Fedora Update System 2011-12-27 22:55:21 UTC
phonon-4.5.1-2.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 27 franck.bonin 2012-03-12 16:05:44 UTC
Problem on Fedora15 64bit :

Using phonon-4.5.1-2.fc15 on X86_64 still not working.
But downgrade to phonon-4.5.0-2.fc15 make things back in place (sudo yum downgrade phonon phonon-devel)

This problem can be seen using 
/usr/lib64/qt4/examples/phonon/qmusicplayer/qmusicplayer

Comment 28 Rex Dieter 2012-03-12 16:12:53 UTC
sounds like you're experiencing a separate problem then.  The patch provided here was to fix something that has been broken in phonon since forever, 4.5.0 included.

Just to restore some sanity here,

Does,

QT_PLUGIN_PATH=/usr/lib64/kde4/plugins \
/usr/lib64/qt4/examples/phonon/qmusicplayer/qmusicplayer

make phonon-4.5.1 work for you?

Comment 29 franck.bonin 2012-03-14 15:14:09 UTC
Yes, 

QT_PLUGIN_PATH=/usr/lib64/kde4/plugins \
/usr/lib64/qt4/examples/phonon/qmusicplayer/qmusicplayer

Works. But if this is a workaround, I'm not sure this is the best method (patch QT_PLUGIN_PATH prior launching our tools)

Our tools use default Fedora provided Qt and Phonon packages, maybe those packages shall be configured to integrate together without any user configuration ?

Comment 30 Rex Dieter 2012-03-14 18:43:19 UTC
OK, no that just confirms my backporting the patch for phonon-4.5 didn't work right.  I'll have to look into it more.  thanks for the confirmation.

Comment 31 Fedora Update System 2012-03-16 01:55:47 UTC
phonon-4.5.1-3.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/phonon-4.5.1-3.fc15

Comment 32 Fedora Update System 2012-03-17 23:48:15 UTC
Package phonon-4.5.1-3.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing phonon-4.5.1-3.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-4052/phonon-4.5.1-3.fc15
then log in and leave karma (feedback).

Comment 33 Rex Dieter 2012-03-29 02:54:50 UTC
Would you mind testing the update:

# su -c 'yum update --enablerepo=updates-testing phonon

and give some feedback if it works for you?

Comment 34 Fedora Update System 2012-04-01 22:55:57 UTC
phonon-4.5.1-3.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.