Since amarok is beeing removed from gentoo, I tested the 9999 version in the kde overlay. Unfortunately, the collection doesn't work, which renders it almost unuseful. I get this error on startup: "The amarok database reported the following error: the configured database plugin could not be loaded". Does anybody has an idea on what is happening ? Should this bug be reported upstream ?
Output of emerge --info: Portage 2.3.13 (python 3.5.4-final-0, default/linux/amd64/17.0/desktop, gcc-6.4.0, glibc-2.25-r9, 4.14.5 x86_64) ================================================================= System uname: Linux-4.14.5-x86_64-Intel-R-_Core-TM-_i5-3230M_CPU_@_2.60GHz-with-gentoo-2.4.1 KiB Mem: 3924172 total, 61336 free KiB Swap: 3145724 total, 2845216 free Timestamp of repository gentoo: Thu, 14 Dec 2017 20:00:01 +0000 Head commit of repository gentoo: 1153f2f142d6d3f8a5c2a037334aa1667c5887b3 sh bash 4.3_p48-r1 ld GNU ld (Gentoo 2.29.1 p3) 2.29.1 distcc 3.2rc1 x86_64-pc-linux-gnu [disabled] ccache version 3.2.4 [enabled] app-shells/bash: 4.3_p48-r1::gentoo dev-java/java-config: 2.2.0-r3::gentoo dev-lang/perl: 5.24.3::gentoo dev-lang/python: 2.7.14-r1::gentoo, 3.5.4-r1::gentoo dev-util/ccache: 3.2.4::gentoo dev-util/cmake: 3.8.2::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.4.1-r2::gentoo sys-apps/openrc: 0.34.11::gentoo sys-apps/sandbox: 2.12::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69::gentoo sys-devel/automake: 1.11.6-r2::gentoo, 1.15.1-r1::gentoo sys-devel/binutils: 2.29.1-r1::gentoo sys-devel/gcc: 6.4.0::gentoo sys-devel/gcc-config: 1.8-r1::gentoo sys-devel/libtool: 2.4.6-r3::gentoo sys-devel/make: 4.2.1::gentoo sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers) sys-libs/glibc: 2.25-r9::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-extra-opts: --exclude='/lost+found' x-portage location: /usr/local/portage masters: gentoo priority: 0 kde location: /var/lib/layman/kde masters: gentoo priority: 50 zugaina location: /var/lib/layman/zugaina masters: gentoo priority: 50 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/easy-rsa /usr/share/genkernel/arch/x86_64 /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.3/conf" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.0/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=native -O2 -pipe" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs buildsyspkg ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync webrsync-gpg xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://gentoo.mirrors.ovh.net/gentoo-distfiles/" LANG="fr_BE.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j9 -l7" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_EXTRA_OPTS="--exclude='/lost+found'" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cddb cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gpm gtk iconv ipv6 java jpeg kerberos kpathsea lcms libnotify lzma mad mmx mng modules mp3 mp4 mpeg multilib musicbrainz ncurses nls nptl nsplugin ogg opengl openmp pam pango pcre pdf pkcs11 png policykit ppds qt3support qt5 readline samba scanner sdl seccomp semantic-desktop session spell sse sse2 sse3 sse4 ssl ssse3 startup-notification svg systemd tcpd tiff truetype udev udisks unicode upnp upower usb v4l2 vim-syntax vorbis wxwidgets xattr xcb xml xosd xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="mouse evdev synaptics" KERNEL="linux" L10N="fr" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="fr" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_6" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python3_5 python2_7" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="intel i915" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
I can confirm this. I got the same issue and collection does not work.
Not a lot of hope left, then.
I've happily used media-sound/amarok-9999 for over two years now, at this moment in combination with dev-db/mariadb-10.2.11. The embedded database plugin has never worked for me on the 9999 version, and since libmysqld has been deprecated I doubt upstream will spend any time fixing it. The "external" MariaDB database works well, though. If I recall the setup process correctly, the "gotcha" here was that when Amarok uses server "localhost" it will actually connect via UNIX sockets. This means that Amarok's suggested command: GRANT ALL PRIVILEGES ON nameofdatabase.* TO 'nameofuser' IDENTIFIED BY 'fancypassword'; Should actually be: GRANT ALL PRIVILEGES ON nameofdatabase.* TO 'nameofuser'@'localhost' IDENTIFIED BY 'fancypassword'; Those interested in significance of this difference can read more in the reference manual, search for the sentence "The server uses sorting rules" on the following page: https://dev.mysql.com/doc/refman/5.7/en/connection-access.html I'll post the same information on the upstream bugtracker at https://bugs.kde.org/show_bug.cgi?id=388248
I really wonder how you manage to use the collection. In my case, when it opens, the error message is shown, the dialog box with option opens. I can set up the connection to the database and test it successfully. However, if I reopen the option, the DB settings I have just set up are lost. I use mariadb 10.1.29. Would this make a difference ?
(In reply to François Valenduc from comment #5) > I really wonder how you manage to use the collection. In my case, when it > opens, the error message is shown, the dialog box with option opens. I can > set up the connection to the database and test it successfully. However, if > I reopen the option, the DB settings I have just set up are lost. I use > mariadb 10.1.29. Would this make a difference ? I have exact the same issue. Mariadb 10.1.26-r1 - connection test works, but settings are not saved :-( I'm compiling mariadb-10.2.11 now. Will see.
I compiled 10.2.11 but still does not work [20:20:19 marian@worker share]$ eix -I mariadb [I] dev-db/mariadb Available versions: ~5.5.58(0/18)^d 10.0.30-r1(0/18)^d 10.0.32-r1(0/18)^d ~10.0.33(0/18)^d 10.1.24-r1(0/18)^d 10.1.26-r1(0/18)^d ~10.1.29(0/18)^d ~10.2.10(0/18)^td (~)10.2.11(0/18)^td {+backup bindist cluster +community cracklib debug embedded extraengine galera innodb-lz4 innodb-lzo innodb-snappy jdbc jemalloc kerberos latin1 libressl max-idx-128 minimal mroonga numa odbc +openssl oqgraph pam +perl profiling rocksdb selinux +server sphinx ssl sst-mariabackup sst-rsync sst-xtrabackup static static-libs systemd systemtap tcmalloc test tokudb xml yassl ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32" ELIBC="FreeBSD"} Installed versions: 10.2.11(19:49:52 2.1.2018)(backup bindist embedded pam perl server xml -cracklib -debug -extraengine -galera -innodb-lz4 -innodb-lzo -innodb-snappy -jdbc -jemalloc -kerberos -latin1 -libressl -mroonga -numa -odbc -oqgraph -profiling -rocksdb -selinux -sphinx -sst-mariabackup -sst-rsync -sst-xtrabackup -static -static-libs -systemd -systemtap -tcmalloc -test -tokudb -yassl ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="32 64 -x32" ELIBC="-FreeBSD") Homepage: http://mariadb.org/ Description: An enhanced, drop-in replacement for MySQL [20:20:27 marian@worker share]$ eix -I amarok [I] media-sound/amarok Available versions: (4) {M}2.8.90-r5 (5) {M}(**)9999^t[1] {debug +embedded ffmpeg +handbook ipod lastfm mp3tunes mtp ofa opengl test +utils} Installed versions: 9999(5)^t[1](20:09:26 2.1.2018)(opengl utils -debug -embedded -ffmpeg -handbook -ipod -lastfm -mtp -ofa -test) Homepage: https://amarok.kde.org/ Description: Advanced audio player based on KDE frameworks [1] "kde" /var/lib/layman/kde [
I don't know why but it seems you have to re-install amarok:5 after initial merge to have the sql plugins loadable. The warning "The amarok database reported the following error: the configured database plugin could not be loaded" is caused due an wrong plugin metadata embedded into the plugins files (*.so). I don't know why but on first merge the wrong plugin metadata (it looks like the old version for amarok:4) is generated/used.
Indeed, compiling amarok a second time allows at least to use an embedded database. However, using an external database is still impossible, since the settings are not persisted (see comment #5).
(In reply to François Valenduc from comment #9) > Indeed, compiling amarok a second time allows at least to use an embedded > database. However, using an external database is still impossible, since the > settings are not persisted (see comment #5). If you have setup the external database in amarok:4 you can copy the amarok:4 settings file (~/.kde4/share/config/amarokrc) to the new location (~/.config/). With this the settings are "persisted" ;) At least when no other changes to the file are done I assume
Found the problem. The apply/ok buttons on the config dialog doesn't trigger the "save changes" functionality. Due an change in KConfigDialog in kde frameworks 5 a derived class will break the button handling of KConfigDialog when changing the displayed buttons via KPageDialog::setButtonBox (KConfigDialog is derived from KPageDialog). The current code of amarok uses KPageDialog::setButtonBox to hide the "restore default" button. I will attach a patch which fixes this.
Created attachment 513488 [details, diff] Fixes amarok config dialog doesn't save changes Make the apply/ok buttons on the config dialog trigger again the "save changes" functionality.
Nice! Do you want to submit this upstream or should we forward it?
Superb, my collection is back. Thanks a lot for fix.
(In reply to Andreas Sturmlechner from comment #13) > Nice! Do you want to submit this upstream or should we forward it? Seems to be already forwarded :) https://phabricator.kde.org/R181:b32eb3f5a7dee644b514cb02557658551f156034 Thanks
Regarding broken plugins on initial install i have found more information about the problem. The embedded plugin information is the right one but on initial install (no amarok installed yet) the format of the data differs. The embedded plugin information is a json file. Here is an example of the differences of that json file Embedded in the intial build version: "X-KDE-Amarok-framework-version": "73", Embedded in the working version: "X-KDE-Amarok-framework-version": 73, As you can see the version number for the framework-version is specified as an string in the initial version. In the working version the version number is specified as a number. The plugin manager of amarok expects the value of X-KDE-Amarok-framework-version to be a number and not a string. Here the full differences as unified diff. --- failed/json_mysqlcollection.txt 2018-01-07 15:03:15.654926422 +0100 +++ succes/json_mysqlcollection.txt 2018-01-07 15:06:21.517911791 +0100 @@ -103,12 +103,16 @@ "Version": "1.0" }, "NoDisplay": "true", - "X-KDE-Amarok-authors": "Maximilian Kossick", - "X-KDE-Amarok-email": "maximilian.kossick@googlemail.com", - "X-KDE-Amarok-framework-version": "73", + "X-KDE-Amarok-authors": [ + "Maximilian Kossick" + ], + "X-KDE-Amarok-email": [ + "maximilian.kossick@googlemail.com" + ], + "X-KDE-Amarok-framework-version": 73, "X-KDE-Amarok-name": "mysql-collection", - "X-KDE-Amarok-rank": "100", - "X-KDE-Amarok-version": "1", - "X-KDE-Amarok-vital": "true" + "X-KDE-Amarok-rank": 100, + "X-KDE-Amarok-version": 1, + "X-KDE-Amarok-vital": true } " I don't know yet why the json file is formatted differently when doing initial build or an re-build. Maybe on initial build for the X-KDE-Amarok* json properties the specification is missing how the properties should be formatted in json format
We should simply drop USE=embedded since it has no future.
Ah the definition of the properties are defined in amarok-plugin.deskop (src/amarok-plugin.desktop) On initial install this file doesn't exists on the system an so the tool which generates the json file on build (from the*.desktop file) doesn't finds amarok-plugin.desktop. And so has no information how to format the X-KDE-Amarok* properties as json and fallbacks to string as value type. But this problem seems only to occur when building amarok via emerge. A manual build generates the correct json file. Somehow the emerge install filters some paths so that the cmake commandkcoreaddons_desktop_to_json doesn't finds the amarok-plugin.desktop under src/
(In reply to Andreas Sturmlechner from comment #17) > We should simply drop USE=embedded since it has no future. This won't fix the initial build problem. Because all amarok plugins are affected by this.
(In reply to Andreas Sturmlechner from comment #17) > We should simply drop USE=embedded since it has no future. Maybe you misunderstood my description of the build problem. With "The embedded plugin information" I didn't referred to the embedded mysql plugin. I referred to the plugin data (the json file content) which is embedded to the plugin binary file. In my example the mentioned plugin was not the storage plugin which uses the mysql embedded library. It is the collection plugin which uses mysql as backend.
Thanks for the clarification. We can keep this bug open until this is fixed.
Created attachment 513640 [details, diff] Fixes initial build of the collection/storage plugins When generating the json file, which gets embedded into the plugin binary, specify the desktop file which contains the specification of the custom properties used in the source desktop file
Well done, once again. However, could we get away with DEFAULT_SERVICE_TYPE instead of SERVICE_TYPES +path?
(In reply to Andreas Sturmlechner from comment #23) > Well done, once again. However, could we get away with DEFAULT_SERVICE_TYPE > instead of SERVICE_TYPES +path? I guess not. As documented in the description of kcoreaddons_desktop_to_json (https://github.com/KDE/kcoreaddons/blob/master/KF5CoreAddonsMacros.cmake) the user of kcoreaddons_desktop_to_json must specify either DEFAULT_SERVICE_TYPE or SERVICE_TYPES. And DEFAULT_SERVICE_TYPE should only be used when no custom properties are defined/used by the application. Here the relevant part: "# All files in SERVICE_TYPES will be parsed by desktoptojson to ensure that the generated # json uses the right data type (string, string list, int, double or bool) for all of the # properties. If your application does not have any custom properties defined you should pass # DEFAULT_SERVICE_TYPE instead. It is an error if neither of these arguments is given. # This is done in order to ensure that all applications explicitly choose the right service # type and don't have runtime errors because of the data being wrong (QJsonValue does not # perform any type conversions)."
Pushed upstream, thanks!