nixpkgs/pkgs
Will Dietz 503f8efbcd epoxy: explicitly search libGL path as fallback
Don't rely on questionable impact of DT_RPATH on dlopen().

This is a bit of a messy subject, but probably the clearest
reference to motivate *not* relying on how dlopen() behaves
in the presence of RPATH or RUNPATH is the following:

https://sourceware.org/ml/libc-hacker/2002-11/msg00011.html

FWIW the dlopen() manpage only mentions the the RPATH
and RUNPATH in the "executable file for the calling program";
no mention of the executable files for libraries--
this has been brought to the attention of the relevant
parties and AFAICT nothing has been done.

The best reference for glibc behavior is
apparently to ... "try it and see".
Luckily a generous soul did exactly that
and reported the findings:

https://www.spinics.net/lists/linux-man/msg02291.html

Qt wrote on the subject a bit when they were bit by this,
linking to the above articles (directly or indirectly).

See:
http://blog.qt.io/blog/2011/10/28/rpath-and-runpath/

--------

Since we know the path of libGL at build-time for libepoxy,
there's a simple solution we can use to avoid all of this:
simply teach libepoxy to explicitly look in the libGL path.

This commit patches libepoxy to accomplish this,
looking to "LIBGL_PATH" as a fallback if it cannot find
the libraries otherwise.

---------

This fixes use of libepoxy w/musl on NixOS!
2018-04-02 12:35:37 -05:00
..
applications tortoisehg: 4.5 -> 4.5.2 2018-03-30 22:53:42 +02:00
build-support Merge pull request #37928 from VShell/patch-2 2018-03-28 09:34:41 +01:00
common-updater common-updater: support updating source URL 2018-03-16 23:17:07 +09:00
data hackage: update db snapshot 2018-03-29 20:46:32 +02:00
desktops Merge remote-tracking branch 'upstream/master' into HEAD 2018-03-30 08:14:35 +02:00
development epoxy: explicitly search libGL path as fallback 2018-04-02 12:35:37 -05:00
games mar1d: fix build 2018-03-28 16:25:14 +03:00
misc Merge remote-tracking branch 'upstream/master' into HEAD 2018-03-30 08:14:35 +02:00
os-specific Merge remote-tracking branch 'upstream/master' into HEAD 2018-03-30 08:14:35 +02:00
servers Merge remote-tracking branch 'upstream/master' into HEAD 2018-03-30 08:14:35 +02:00
shells treewide: cleanup procps uses 2018-03-27 18:17:37 -05:00
stdenv meta: Simplify platform check logic 2018-03-27 11:59:59 -04:00
test tree-wide: autorename gnome packages to use dashes 2018-02-25 17:41:16 +01:00
tools Merge remote-tracking branch 'upstream/master' into HEAD 2018-03-30 08:14:35 +02:00
top-level Merge remote-tracking branch 'upstream/master' into HEAD 2018-03-30 08:14:35 +02:00