Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amarok is unusable #15264

Closed
ocharles opened this issue May 6, 2016 · 19 comments
Closed

Amarok is unusable #15264

ocharles opened this issue May 6, 2016 · 19 comments

Comments

@ocharles
Copy link
Contributor

ocharles commented May 6, 2016

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
@jerith666
Copy link
Contributor

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.

@jerith666
Copy link
Contributor

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 

@jerith666
Copy link
Contributor

Running it like this makes it work:

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

@Phreedom
Copy link
Member

Phreedom commented Jun 28, 2016 via email

@vcunat
Copy link
Member

vcunat commented Jun 28, 2016

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

@pwetzel
Copy link
Contributor

pwetzel commented Jul 1, 2016

@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.

@jerith666
Copy link
Contributor

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.

@vcunat
Copy link
Member

vcunat commented Jul 1, 2016

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.

@pwetzel
Copy link
Contributor

pwetzel commented Jul 1, 2016

@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?

@vcunat
Copy link
Member

vcunat commented Jul 2, 2016

"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).

@jerith666
Copy link
Contributor

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

@jerith666
Copy link
Contributor

@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

jerith666 added a commit to jerith666/nixpkgs that referenced this issue Jul 20, 2016
@vcunat
Copy link
Member

vcunat commented Aug 7, 2016

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).

@jerith666
Copy link
Contributor

The only issue I know of w/ amarok plugins is #16588, but that's about gstreamer plugins, not collection plugins. All my testing has been done with amarok installed as normal, though.

@vcunat
Copy link
Member

vcunat commented Mar 22, 2017

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

@vcunat vcunat closed this as completed Mar 22, 2017
@ocharles
Copy link
Contributor Author

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

@jerith666
Copy link
Contributor

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

@ocharles
Copy link
Contributor Author

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?")

@vcunat
Copy link
Member

vcunat commented Mar 23, 2017

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants