-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
2.58.2 libgio.so breaks Linux ldconfig #40
Comments
Upon further investigation, the problem is only caused when Meson's parameter |
As described in conda-forge#40, on Linux, the new Meson build system futzes with the rpaths of the libraries that it installs in a way that is legal but confuses ldconfig, which can lead to obscure failures for downstream package that use glib and run ldconfig at some point. Closes conda-forge#40.
I would like to get @jpakkane's opinion on this problem. There's a good reason Meson does this |
@SoapZA Hopefully mesonbuild/meson#4685 will be a good place for that discussion to happen. Hacking RPATH is something I can definitely get behind — conda is built on it — but this particular implementation seems to have unfortunate corner cases. |
We ran into another instance of conda-forge/glib-feedstock#40 AKA mesonbuild/meson#4685, in which Meson edits the rpaths of the binaries it installs in a way that breaks future `ldconfig` invocations. From previous investigations, setting an `install_rpath` for the installed binaries avoids the issue, so let's do that.
Instead of patching all the libraries that are affected by this, can't we just patch the meson-feedstock? See for example this patch: (comment mesonbuild/meson#314 (comment) might be relevant here) |
@jpakkane Maybe we should add this in Meson instead? |
Note that having an empty rpath entry in the ELF file is different from not having it at all. No, I don't know how, but this caused problems in some distro (Debian?) where it triggered something. First you probably want to examine is this will cause issues to you. |
I am planning to incorporate the buildroot patch into the pending 0.53.0 package of meson (conda-forge/meson-feedstock#26). In the broader ecosystem I can see how issues like the Debian corner case might crop up, but in Conda we are already munging RPATHs and forcing them to have specific, nonempty paths, so I don't believe we'll encounter any problems here. |
All those Nevertheless, the |
@kleisauke Since the
I'll take a look and see if I can figure out this issue and see if there's an issue with meson 0.53 in general, or what. (If you have the chance to also take a look that would be awesome!) |
Ah I see, since it adds non-empty RPATHs this issue would not manifest. It looks like the |
Thanks @kleisauke , I didn't do any googling. Looks like we should monitor and hold off deploying 0.53.0 for the time being. |
Indeed it's wiser to stick with version 0.52.1. You may also need to increase the Python requirement to |
Meson 0.53.1 is out and we have a candidate package at conda-forge/meson-feedstock#27. |
Hoo boy. I just discovered a fun esoteric problem with the Linux binaries distributed with the new version 2.58.2.
This new version uses the Meson build system. It turns out that upon installation, Meson will automatically modify the RPATH data for ELF libraries and executables that it installs, doing the same sort of consistency work that the Conda build system does. The relevant file is called depfixer.py.
The problem is that the rewriting done during this process can create binaries that are OK according to the ELF spec, but are confusing to certain tools that are naive in how they parse ELF executables. Relevant discussion is here.
Unfortunately, one of these naive tools is
ldconfig
. And in the case of our glib package, what happens is thatldconfig
decides that the SONAME oflibgio-2.0.so
is actually\n
(i.e. a single newline character), which leads it to create a file called$PREFIX/lib/\n
— the first time I've ever run across an instance of the fun Unix feature that it is legal to create files with newlines in their names. Note that if youreadelf -d
the resulting file, you'll get the right answer, becausereadelf
is sufficiently smart.chrpath -l
will give you the wrong answer because it is not.Finally, if you're trying to build a package that depends on glib and calls
ldconfig
, this new file will confuse Conda's verifier that tries to compare the contents of the resulting tarball and the Conda file listing, resulting in a very very very hard-to-trace-downException('info/files')
.I think the best solution here is to turn off Meson's RPATH munging. Unfortunately, I can't find a built-in way to turn it off, so I think we'll have to patch it.
CC @conda-forge/meson.
The text was updated successfully, but these errors were encountered: