Nixpkgs: Amarok is unusable

Created on 6 May 2016  Â·  19Comments  Â·  Source: NixOS/nixpkgs

Issue description

Amarok installs, but then errors at startup informing the user "Amarok could not find any collection plugins. It is possible that Amarok is installed under the wrong prefix".

Steps to reproduce

nix-env -i amarok
amarok

Technical details

  • System: 16.03.678.2597f52 (Emu)
  • Nix version: nix-env (Nix) 1.11.2
  • Nixpkgs version: 6.03.678.2597f52
bug qkde

All 19 comments

In 16.09.git.d553293 (Flounder), I get this error on startup:

"GREPME MySQLe query failed! (2000) Can't find messagefile '/not/a/real/dir/share/mysql/errmsg.sys' on init"

This was also reported on IRC (back in 2015), but never got a response.

A few more lines of context from amarok --debug:

amarok:           [CollectionManager] initializing "amarok_collection-mysqlecollection" 
amarok:           [ERROR__] MySQL library initialization failed. 
amarok:           [ERROR__] [MySqlStorage] "GREPME MySQLe query failed! (2000) Can't find messagefile '/not/a/real/dir/share/mysql/errmsg.sys' on init" 
amarok:           [MySqlStorage] Initialized thread, count== 1 
amarok:           [ERROR__] [MySqlStorage] Tried to perform query on uninitialized MySQL 

Running it like this makes it work:

MY_BASEDIR_VERSION=/nix/store/8dlai5mmg5vrqlpnjkjdcjvw6hmb29mj-mariadb-10.1.9 amarok

amarok was broken by
mariadb going multi-output.
I failed to fix it with limited
effort

@Phreedom: it was reported that #15421 should've fixed (some of) the errors, but apparently not in this case.

@vcunat, #15421 will fix the problem for any program that calls mysqld, but amarok (and no doubt other things waiting in the woodwork) uses libmysqld. That doesn't exec(mysqld), and so never uses the wrapper. Until the mariadb package stops setting DEFAULT_MYSQL_HOME to /not/a/real/dir, everything using libmysqld will need a fix like #16578.

Yeah, you're right. I thought about trying to hunt down such packages and make an analogous change for all of them, but wasn't really sure how to do it.

I did try changing mariadb/default.nix to set DEFAULT_MYSQL_HOME to $out, and that at least did _not_ result in an infinite recursion / self-reference loop as someone had reported in one of the other issues. But, it was going to rebuild a _ton_ of stuff and, since I'm working through other issues as well right now, I didn't want to wait for that. I think if someone has the time to let that rebuild run in the background, it's worth a try, though.

Is there even some case where it makes sense to use libmysql* _without_ any access to those ${mysql.out} files? If not, there's hardly a point in keeping those files in a different output than the libs.

@jerith666, did you try to just build mariadb after that change? nix-build -A mariadb? I'm pretty sure you get the cyclic reference sometime after the install phase.

@vcunat, I am not an expert on mysql/mariadb, but there are a lot of files that seem to be shared by the lib and bin. Besides the error messages above we're seeing errors for here, there are also plugins that are shared. If the error messages and plugin stuff could be split into its own output that both lib and out/bin depend on, there might be some benefit.

As the derivation stands now, lib can never be used without out also being present. So the multiple output is broken (in that it doesn't actually reduce the closure size) while also breaking stuff like Amarok.

Unless the discussion in #8494 is making a proper multiple output derivation sound much harder than it actually is, I can't fix it the ideal (multi output) way. Would you entertain a PR that makes mariadb single output again?

"Sharing files" between outputs is perfectly fine, e.g. out depending on lib in this case. The main point in mariadb is currently to avoid the bin/* stuff in most closures, as it's ~130 MB (most likely due to upstream using static linking for them by default).

Okay, I'm trying nix-build -A mariadb with 85fea05; will report back on results.

@pwetzel You're right, it got almost to the end and then failed. :(

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/k3pw3ihvybm0cxxvgay3kpprfv3pcw6n-mariadb-10.1.9
<snip>
gzipping man pages in /nix/store/k3pw3ihvybm0cxxvgay3kpprfv3pcw6n-mariadb-10.1.9
stripping (with flags -S) in /nix/store/k3pw3ihvybm0cxxvgay3kpprfv3pcw6n-mariadb-10.1.9/bin 
<snip>
patching script interpreter paths in /nix/store/k3pw3ihvybm0cxxvgay3kpprfv3pcw6n-mariadb-10.1.9
<snip>
shrinking RPATHs of ELF executables and libraries in /nix/store/g051dba5hlv6hpqyg3rk9050spdgmhjw-mariadb-10.1.9-lib
<snip>
shrinking /nix/store/g051dba5hlv6hpqyg3rk9050spdgmhjw-mariadb-10.1.9-lib/lib/mysql/plugin/file_key_management.so
shrinking /nix/store/g051dba5hlv6hpqyg3rk9050spdgmhjw-mariadb-10.1.9-lib/lib/libmysqld.so.18
stripping (with flags -S) in /nix/store/g051dba5hlv6hpqyg3rk9050spdgmhjw-mariadb-10.1.9-lib/lib  /nix/store/g051dba5hlv6hpqyg3rk9050spdgmhjw-mariadb-10.1.9-lib/bin 
strip:/nix/store/g051dba5hlv6hpqyg3rk9050spdgmhjw-mariadb-10.1.9-lib/lib/mysql/plugin/daemon_example.ini: File format not recognized
strip:/nix/store/g051dba5hlv6hpqyg3rk9050spdgmhjw-mariadb-10.1.9-lib/bin/mysql_config: File format not recognized
patching script interpreter paths in /nix/store/g051dba5hlv6hpqyg3rk9050spdgmhjw-mariadb-10.1.9-lib
/nix/store/g051dba5hlv6hpqyg3rk9050spdgmhjw-mariadb-10.1.9-lib/bin/mysql_config: interpreter directive changed from "/bin/sh" to "/nix/store/hbgd7mbpylfz6zxj5bkdyi07yag77b8l-bash-4.3-p42/bin/sh  "
cycle detected in the references of ‘/nix/store/g051dba5hlv6hpqyg3rk9050spdgmhjw-mariadb-10.1.9-lib’
error: build of ‘/nix/store/88f6ini5jvgw7psmkgvg5n1dc542wihr-mariadb-10.1.9.drv’ failed

I believe the mysql/mariadb problems should be gone after #17413 (staged ATM). I wanted to test amarok, but it won't run even before the change, due to not finding any collection plugins (which might be because I didn't install anything but ran it directly from nix store).

The only issue I know of w/ amarok plugins is https://github.com/NixOS/nixpkgs/issues/16588, but that's about _gstreamer_ plugins, not _collection_ plugins. All my testing has been done with amarok installed as normal, though.

Let's just keep the other open issue, as mysql/mariadb is probably OK now.

@vcunat are you suggesting that Amarok is usable now then?

I think he's just suggesting that #16588 better captures the reason it's not working. :)

Right, but I disagree with closing issues when the actual issue is not fixed. This just seems like a guess. Of course that issue could have all sorts of knock-on breakages - I'm not suggesting we capture all of them. But someone (i.e., me) has expressed direct interest in Amarok being broken, so I'd rather be following this issue (and being asked to check with things like "@ocharles I fixed x, could you see if that's solved this problem?")

I closed this just as I would close any duplicate issue. It seems counter-productive to have two of them, and the current problems seemed to be better described in the other one.

It's possible I misunderstand the status. @ocharles: you can reopen (technically) and I won't mind at all if you do it. (It's also possible to edit the issue description to reflect current status, etc.)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ob7 picture ob7  Â·  3Comments

copumpkin picture copumpkin  Â·  3Comments

matthiasbeyer picture matthiasbeyer  Â·  3Comments

ayyess picture ayyess  Â·  3Comments

domenkozar picture domenkozar  Â·  3Comments