3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications
Benno Fünfstück a4d6e2cf16 atom: avoid using LD_PRELOAD. Fixes glibc compat issues
The wrapper for Atom was loading libraries via LD_PRELOAD, for example
libxkbfile. Now, if you installed atom via nix-env and happened to use a newer
nixpkgs for that than what your system environment is build against, you could
end up with an error like this:

```
uname: relocation error:
/nix/store/68sa3m89shpfaqq1b9xp5p1360vqhwx6-glibc-2.25/lib/libdl.so.2:
symbol _dl_catch_error, version GLIBC_PRIVATE not defined in file libc.so.6
with link time reference
```

This happens because atom calls the `uname` executable from the system to
determine the platform. Because that inherits the `LD_PRELOAD` environment
variable, so the libxkbfile library that the `atom` wrapper was build against
is loaded into `uname`. But since `atom` comes from `nix-env`, the `libxkbfile`
it was built with might be compiled against a newer version of `glibc` than
`uname`, which comes from the system, was! Having two versions of glibc loaded
into the same processes results in chaos.

To fix this, we avoid setting `LD_PRELOAD` and instead use patchelf to set the
correct RPATH. RPATH is not inherited by child processes, so the above issue
can no longer occur.

The only small complication here is that the library that actually loads
libxkbfile is not the atom binary itself, but a node extension that atom uses.
So instead of setting the RPATH on `atom` only, we also set the `rpath` on all
node extensions (`*.node`) the output.
2017-03-18 01:51:36 +01:00
..
altcoins litecoin: 0.10.2.2 -> 0.13.2.1 2017-03-10 20:48:45 +00:00
audio clementine: added switches for optional dependences (#23730) 2017-03-17 00:47:37 +01:00
backup add self to crashplan maintainers 2016-11-13 14:41:57 -05:00
display-managers lightdm_qt: fix build 2017-03-11 14:52:42 +01:00
editors atom: avoid using LD_PRELOAD. Fixes glibc compat issues 2017-03-18 01:51:36 +01:00
gis qgis: Fix build after pythonPackages.sip update 2017-03-13 16:05:31 +01:00
graphics pbrt: 2016-05-19 -> 2017-01-12 (#23405) 2017-03-13 02:35:34 +01:00
inferno Use general hardening flag toggle lists 2016-03-05 18:55:26 +01:00
kde Merge pull request #23992 from ttuegel/kde-applications-16.12.3 2017-03-17 15:40:42 -05:00
misc xaster: init at release 208 2017-03-17 12:09:37 -05:00
networking terraform: use generic builder and add 0.9.0 (#23979) 2017-03-17 09:05:16 +00:00
office mmex: v1.3.1 -> v1.3.3 (#23732) 2017-03-13 02:38:27 +01:00
science hol: mark as broken 2017-03-14 15:36:06 +01:00
search
taxes Dutch tax office (Belastingdienst) software for entrepreneurs version 2014 2015-10-24 22:10:23 +02:00
version-management gitkraken: 2.1.0 -> 2.2.0 2017-03-15 23:37:18 +01:00
video mkvtoolnix-cli: fix build on darwin 2017-03-13 21:20:26 +00:00
virtualization Merge pull request #23872 from NeQuissimus/docker_17_03_0 2017-03-17 10:07:04 -04:00
window-managers icewm: fix CFGDIR 2017-03-16 16:43:33 +00:00