Bug 218821 - audio/amarok-kde4: Amarok could not find any collection plugins
Summary: audio/amarok-kde4: Amarok could not find any collection plugins
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: David Naylor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-23 05:52 UTC by David Naylor
Modified: 2017-11-04 17:18 UTC (History)
3 users (show)

See Also:
tcberner: maintainer-feedback+


Attachments
Add SSL to MySQLE collections (467 bytes, patch)
2017-09-27 19:19 UTC, David Naylor
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Naylor freebsd_committer 2017-04-23 05:52:35 UTC
# cat /usr/local/etc/pkg/repos/FreeBSD.conf 
FreeBSD: { url: "pkg+http://pkg.freebsd.org/FreeBSD:11:amd64/latest" }

# pkg upgrade amarok
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
Your packages are up to date.

# amarok -d
amarok -d
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
amarok: BEGIN: App::App() 
amarok:   BEGIN: void App::continueInit() 
amarok:     BEGIN: EngineController::EngineController() 
amarok:     END__: EngineController::EngineController() [Took: 0.004s] 
amarok:     BEGIN: void EngineController::initializePhonon() 
WARNING: Phonon::createPath: Cannot connect  Phonon::MediaObject ( no objectName ) to  Phonon::AudioDataOutput ( no objectName ). 
Object::connect: No such signal Phonon::VLC::MediaObject::angleChanged(int)
Object::connect: No such signal Phonon::VLC::MediaObject::availableAnglesChanged(int)
amarok:       [EngineController] Established Phonon equalizer effect with 11 parameters. 
amarok:       [EngineController] Tick Interval (actual):  100 
amarok:     END__: void EngineController::initializePhonon() [Took: 0.22s] 
amarok:     BEGIN: CollectionManager::CollectionManager() 
amarok:     END__: CollectionManager::CollectionManager() [Took: 0s] 
amarok:     BEGIN: MainWindow::MainWindow() 
amarok:       BEGIN: Plugins::PluginManager::PluginManager(QObject *) 
amarok:         BEGIN: void Plugins::PluginManager::findAllPlugins() 
amarok:           [PluginManager] found plugin: "amarok_collection-audiocdcollection" enabled: false 
amarok:           [PluginManager] found plugin: "amarok_collection-daapcollection" enabled: false 
amarok:           [PluginManager] found plugin: "amarok_collection-mtpcollection" enabled: false 
amarok:           [PluginManager] found plugin: "amarok_collection-mysqlservercollection" enabled: true 
amarok:           [PluginManager] found plugin: "amarok_collection-mysqlecollection" enabled: true 
amarok:           [PluginManager] found plugin: "amarok_collection-nepomukcollection" enabled: false 
amarok:           [PluginManager] found plugin: "amarok_collection-upnpcollection" enabled: false 
amarok:           [PluginManager] found plugin: "amarok_collection-umscollection" enabled: false 
amarok:           [PluginManager] found plugin: "amarok_collection-ipodcollection" enabled: false 
amarok:           [PluginManager] found plugin: "amarok_service_ampache" enabled: false 
amarok:           [PluginManager] found plugin: "amarok_service_jamendo" enabled: false 
amarok:           [PluginManager] found plugin: "amarok_service_lastfm" enabled: false 
amarok:           [PluginManager] found plugin: "amarok_service_amazonstore" enabled: false 
amarok:           [PluginManager] found plugin: "amarok_service_mp3tunes" enabled: false 
amarok:           [PluginManager] found plugin: "amarok_service_magnatunestore" enabled: false 
amarok:           [PluginManager] found plugin: "amarok_service_opmldirectory" enabled: false 
amarok:           [PluginManager] 16 plugins in total 
amarok:         END__: void Plugins::PluginManager::findAllPlugins() [Took: 0.005s] 
amarok:         [WARNING] [PluginManager] "Failed to get factory 'amarok_collection-mysqlecollection' from KPluginLoader: Cannot load library /usr/local/lib/kde4/amarok_collection-mysqlecollection.so: (/usr/local/lib/kde4/amarok_collection-mysqlecollection.so: Undefined symbol "SSL_connect")" 
amarok:         [PluginManager] No Amarok collection plugins found, running kbuildsycoca4. 
amarok:         BEGIN: virtual int App::newInstance() 
amarok:           BEGIN: static void App::handleCliArgs() 
amarok:           END__: static void App::handleCliArgs() [Took: 0s] 
amarok:         END__: virtual int App::newInstance() [Took: 0s] 
dbn@dragon:/usr/ports> amarok:         [PluginManager] Second attempt at finding collection plugins 
amarok:         [WARNING] [PluginManager] "Failed to get factory 'amarok_collection-mysqlecollection' from KPluginLoader: Cannot load library /usr/local/lib/kde4/amarok_collection-mysqlecollection.so: (/usr/local/lib/kde4/amarok_collection-mysqlecollection.so: Undefined symbol "SSL_connect")"
Comment 1 Tobias C. Berner freebsd_committer 2017-06-02 19:49:46 UTC
Is this still an issue? 

> (/usr/local/lib/kde4/amarok_collection-mysqlecollection.so: Undefined symbol "SSL_connect")"
raises one or the other eye-brow.
Comment 2 David Naylor freebsd_committer 2017-06-04 07:20:31 UTC
Exact same problem:
# pkg info amarok | head -n1
amarok-2.8.0_11
# uname -r
11.0-RELEASE-p8
# amarok -d |& grep SSL_connect
amarok:         [WARNING] [PluginManager] "Failed to get factory 'amarok_collection-mysqlecollection' from KPluginLoader: Cannot load library /usr/local/lib/kde4/amarok_collection-mysqlecollection.so: (/usr/local/lib/kde4/amarok_collection-mysqlecollection.so: Undefined symbol "SSL_connect")"
Comment 3 Thiago Rodrigues Santos 2017-08-12 11:00:35 UTC
This bug is also affecting me and I'm using the quarterly pkg branch. Same error as reported. I'll try to compile amarok from ports and report back.
Comment 4 David Naylor freebsd_committer 2017-08-12 11:19:09 UTC
I tried compiling, but that didn't work for me :-(.  Maybe change the build so that amarok_collection-mysqlecollection.so links to SSL?
Comment 5 Thiago Rodrigues Santos 2017-08-12 14:16:09 UTC
(In reply to David Naylor from comment #4)

Ok, just tried it but couldn't make it work. I'm not sure how to change the linking, tough... Sorry :(
Comment 6 David Naylor freebsd_committer 2017-09-27 19:19:33 UTC
Created attachment 186768 [details]
Add SSL to MySQLE collections

Please test the attached patch, it adds -lssl to the linking arguments for amarok_mysqlecollection.so.
Comment 7 Raphael Kubo da Costa freebsd_committer 2017-09-29 11:09:18 UTC
Your approach is valid: if I link amarok_collection-mysqlecollection.so with -Wl,--no-undefined, I see several errors coming from libmysqld.a referencing SSL_*, EVP_* and MD5_* symbols that are not found.

However, another approach is to generalize this check: https://cgit.kde.org/amarok.git/tree/CMakeLists.txt?h=v2.8.0#n77

    if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--as-needed")
    endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")

which was added in https://cgit.kde.org/amarok.git/commit/CMakeLists.txt?h=v2.8.0&id=ef0d251381532902cbd81bfa7732358be3cecedb for some similar reason apparently.

Amarok doesn't seem to need or use any of those missing symbols, but I haven't tried running it after building everything with --as-needed.

Either approach is fine with me.
Comment 8 David Naylor freebsd_committer 2017-11-04 11:41:08 UTC
It appears the base linker on FreeBSD doesn't understand --as-needed.
Comment 9 commit-hook freebsd_committer 2017-11-04 17:14:23 UTC
A commit references this bug:

Author: dbn
Date: Sat Nov  4 17:13:35 UTC 2017
New revision: 453473
URL: https://svnweb.freebsd.org/changeset/ports/453473

Log:
  audio/amarok-kde4: fix local collections not working

  The local collection backend uses embedded MySQL, however mysqle needs
  to be linked against SSL.

  Also, explicitly state we need both client and embedded version of mysql
  in USES.

  PR:		218821
  PR:		221467

Changes:
  head/audio/amarok-kde4/Makefile
  head/audio/amarok-kde4/files/patch-src_core-impl_collections-db-sql-mysqlcollection-CMakeLists.txt
Comment 10 David Naylor freebsd_committer 2017-11-04 17:18:37 UTC
Fix committed, thanks for testing