{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/9840","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/9840/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/9840/comments","events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/9840/events","html_url":"https://github.com/NixOS/nixpkgs/issues/9840","id":106216851,"number":9840,"title":"Segmentation fault: bzflag and Red Eclipse fail to run on non-NixOS, likely Mesa version mismatch","user":{"login":"joepie91","id":1663259,"avatar_url":"https://avatars.githubusercontent.com/u/1663259?v=3","gravatar_id":"","url":"https://api.github.com/users/joepie91","html_url":"https://github.com/joepie91","followers_url":"https://api.github.com/users/joepie91/followers","following_url":"https://api.github.com/users/joepie91/following{/other_user}","gists_url":"https://api.github.com/users/joepie91/gists{/gist_id}","starred_url":"https://api.github.com/users/joepie91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joepie91/subscriptions","organizations_url":"https://api.github.com/users/joepie91/orgs","repos_url":"https://api.github.com/users/joepie91/repos","events_url":"https://api.github.com/users/joepie91/events{/privacy}","received_events_url":"https://api.github.com/users/joepie91/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":20,"created_at":"2015-09-13T13:29:17Z","updated_at":"2015-09-13T17:22:13Z","closed_at":null,"body":"* __Platform:__ openSUSE 13.1, x86_64, XFCE\r\n* __Nix version:__ 1.9 (stand-alone)\r\n* __nixpkgs version:__ Git master\r\n* __Error:__ Segmentation fault\r\n\r\nAfter spending a lot of time yesterday debugging things with @ttuegel, it seems that there's a Mesa version mismatch issue between Nix and my OS, leading to certain games segfaulting on boot.\r\n\r\nWhereas nixpkgs uses a `10.x` version of Mesa, my system uses a `9.x` version - specifically:\r\n\r\n```\r\nsven@linux-etoq:~/projects/nixpkgs/test/bzflag> zypper info Mesa-libGL1\r\nLoading repository data...\r\nReading installed packages...\r\n\r\n\r\nInformation for package Mesa-libGL1:\r\n------------------------------------\r\nRepository: Main Update Repository\r\nName: Mesa-libGL1\r\nVersion: 9.2.5-61.13.1\r\nArch: x86_64\r\nVendor: openSUSE\r\nInstalled: Yes\r\nStatus: up-to-date\r\nInstalled Size: 376.0 KiB\r\nSummary: The GL/GLX runtime of the Mesa 3D graphics library\r\nDescription: \r\nMesa is a software library for 3D computer graphics that provides a\r\ngeneric OpenGL implementation for rendering three-dimensional\r\ngraphics.\r\n\r\nGLX (\"OpenGL Extension to the X Window System\") provides the\r\ninterface connecting OpenGL and the X Window System: it enables\r\nprograms wishing to use OpenGL to do so within a window provided by\r\nthe X Window System.\r\n```\r\n\r\nBuild commands used for OpenArena, bzflag and Red Eclipse:\r\n\r\n```\r\nsven@linux-etoq:~/projects/nixpkgs/test/openarena> nix-build ../../ -A openarena\r\nsven@linux-etoq:~/projects/nixpkgs/test/bzflag> nix-build ../../ -A bzflag\r\nsven@linux-etoq:~/projects/nixpkgs/test> nix-build ../../ -A redeclipse\r\n```\r\n\r\nRed Eclipse is a package I'm working on, it is not currently in nixpkgs. The package in its current state:\r\n\r\n```nix\r\n{ fetchurl, stdenv, SDL, SDL_image, SDL_mixer, zlib, ed }:\r\n\r\nlet\r\n  mods = {\r\n    base = \"94b0475c7c161d4fdb59a9ebe0d740ec07b1934abf348d78d4f127f369d912f8\";\r\n    acerspyro = \"18718286a72298b0a016d147524bc53094c4ad3897859ec8422131b5acc9bd3f\";\r\n    actors = \"34825b5bb7f79bf9518e5e48f01ecb720cc559bb969575b93da05b5305c209cb\";\r\n    appleflap = \"05c5aae92779ef8b6feb74ee396d27001aa8692610c35b33421419dd0d0bc4b2\";\r\n    blendbrush = \"c0fb3257fd4a9b425bfa015ff0126807af85dbada89223765689e618ad7d4b72\";\r\n    caustics = \"25b0366b0e434049d382fdeda0b62e38a7fdadf398d714713d829908f10dbb3f\";\r\n    crosshairs = \"732e0a874ad39d4ee329e4b82badd8e3b513ad4a5a6f7ea5c5c2d30a42839e6e\";\r\n    elyvisions = \"29d8554151789578cbce17718d911c36e3453ee3b700b96b4ca0b9d4f2391468\";\r\n    fonts = \"b88246a3a194afd0e3928d447d9e49c8869ce157c005dca2ad7610479344f62a\";\r\n    freezurbern = \"9669ca25a3cdffaf6172829a1e04dad51f43bf4bd98b794d1574a18dded0c078\";\r\n    john = \"8d02259d0878b91c2c16b8c323f2bbf8fba521a5694f9bb160ca5f7c32b0bcd2\";\r\n    jojo = \"a97b45a1e095c11f1b9b5c34ed2f28e6427a784c56fc0a143288638a59cc036a\";\r\n    jwin = \"539873a19cbafd10499959619199791ebc6feabcde20c4db1e9298dea14c85e4\";\r\n    luckystrike = \"21516564ba832507ecb93f05d03e662bd4dc0944d7bc800bc1127c96d941b823\";\r\n    maps = \"71a79ec665e99268637952bd883afcda02345c9944494822fe96b45511c410b8\";\r\n    mayhem = \"95a9ce7bfa8bc4e38da8197ef85e530e312ba040cf772bae99e84745cc95c9c2\";\r\n    mikeplus64 = \"57a92abff536d459e413d424e8a948c2951a7f476dbb00831bf54ddfedff42ce\";\r\n    misc = \"aec506cf659452a717430fe6104e0624eac5bd59f22c64ca5033d65cb4fc15de\";\r\n    nobiax = \"159e98527ea953e1af8f49808ad61f34d08189b720e070463ff88a4a044b3622\";\r\n    particles = \"759b46e2d8edc2ac893dd8fce8820b208789d9bc2c63679db35366b88d1e8d71\";\r\n    philipk = \"ea4daa2e02c13bbb8d0ba18ad7d3dfdc0f39355dccc36c556bbaec88aeaa13e8\";\r\n    projectiles = \"d2beb17e7b7928718d5c4d9697238027523ddd6a2f168d900b8d599d93ceb075\";\r\n    props = \"79f474367f808faa7293e73851e0331a354760db0dd0b8d061f1d74b921a70e9\";\r\n    skyboxes = \"f17df31c857abd7106159e82ba92b252db8ce68df21a893023d3017d8d2ac943\";\r\n    sounds = \"ebcc960b5e3ecee80e04aec8335554ffdb36ecc030791666903a85cad469dede\";\r\n    textures = \"a59c604d134bf0e82d31340878c4790060dc82f7a4417ada1d7782da09b3ae3f\";\r\n    torley = \"4607d60be7080b0ac5c6ef801f158d2ba6e79982e9861eecdd15698a5c2d31b3\";\r\n    trak = \"78e9bb131fe144b516ce29be6c9f64f2991731e49935576caa3ed999ca2fd377\";\r\n    ulukai = \"638fb7ac0e0d8eb1f13c7a01d00d31ce7844c06d8907ad2a20ea571b094b3b7e\";\r\n    unnamed = \"bd7da14d9e715d6dcc2687921f668739d0ba45a9f01350c1b5347e956648a242\";\r\n    vanities = \"bcd9a0f22314c0bb98fc193f18f04a3cc9f1aa6b83c70a02de34b779cc166ce1\";\r\n    vegetation = \"c076f3f50caac5bec5889fc8e11028882b7a39cee8560684918c3a0eb847228d\";\r\n    weapons = \"23d70fb68fe34ba9c952f74b2ec6ca30b9dda8664248db10f5b434cb9c3516be\";\r\n    wicked = \"0fc5a75c6b0a2a9c90a664e2b9ec958928b3059f03e90228cca547f376532b61\";\r\n  };\r\n  \r\n  createModItem = version: modName: {\r\n    name = modName;\r\n    value = fetchurl {\r\n      name = \"${modName}-${version}.tar.gz\";\r\n      url = \"https://github.com/red-eclipse/${modName}/archive/v${version}.tar.gz\";\r\n      sha256 = builtins.getAttr modName mods;\r\n    };\r\n  };\r\n  \r\n  makeModList = version:\r\n    let\r\n      modNames = builtins.attrNames mods;\r\n      modList = builtins.map\r\n        (createModItem version)\r\n        modNames;\r\n    in\r\n      builtins.listToAttrs modList;\r\n\r\n  sources = version: makeModList version;\r\nin\r\n  stdenv.mkDerivation rec {\r\n    name = \"red-eclipse-${version}\";\r\n    version = \"1.5.3\";\r\n\r\n    sourceRoot = \"base-${version}\";\r\n\r\n    srcs = builtins.attrValues (sources version);\r\n      \r\n    buildInputs = [SDL SDL_image SDL_mixer zlib ed];\r\n    \r\n    preBuild = ''\r\n      for i in \\\r\n        acerspyro actors appleflap blendbrush caustics crosshairs elyvisions \\\r\n        fonts freezurbern john jojo jwin luckystrike maps mayhem mikeplus64 misc \\\r\n        nobiax particles philipk projectiles props skyboxes sounds textures \\\r\n        torley trak ulukai unnamed vanities vegetation weapons wicked\r\n      do\r\n        rmdir \"data/$i\"\r\n        mv \"../$i-${version}\" \"data/$i\"\r\n      done\r\n    '';\r\n    \r\n    buildPhase = ''\r\n      runHook preBuild;\r\n      make ''${enableParallelBuilding:+-j''${NIX_BUILD_CORES} -l''${NIX_BUILD_CORES}} -C src/ prefix=$out system-install\r\n    '';\r\n    \r\n    installPhase = ''\r\n    \r\n    '';\r\n  }\r\n```\r\n\r\nBoth bzflag and Red Eclipse fail in the same way:\r\n\r\n```\r\nsven@linux-etoq:~/projects/nixpkgs/test/bzflag> LD_LIBRARY_PATH=~/libgl-shim/ result/bin/bzflag \r\nSegmentation fault\r\nsven@linux-etoq:~/projects/nixpkgs/test> LD_LIBRARY_PATH=~/libgl-shim/ result/bin/redeclipse\r\nSegmentation fault\r\n```\r\n\r\nThe `LD_LIBRARY_PATH` is using [this method](https://github.com/NixOS/nixpkgs/issues/9415#issuecomment-139655485) of linking against the system-native libGL, rather than using the Nix-packaged one (as this is a non-NixOS system).\r\n\r\nHowever, upon discovering that the regular libGL on my system is actually *not* in `/usr/lib64` but rather in an fglrx-specific directory (and using the one in `/usr/lib64` would only give access to `swrast`), I wrote a `find-lib-gl.sh` as follows:\r\n\r\n```bash\r\nldd `which glxinfo` | grep libGL | sed -r 's/.+libGL\\.so\\.1 => (.+) \\(.+/\\1/m'\r\n```\r\n\r\nWhich in my case outputs:\r\n\r\n```\r\nsven@linux-etoq:~/projects/nixpkgs/test> ~/find-libgl.sh \r\n/usr/X11R6/lib64/libGL.so.1\r\n```\r\n\r\n... and I copied and patched *that* file into my shim directory, instead of `/usr/lib64/libGL.so.1`.\r\n\r\nOpenArena *does* work with my newly patched libGL, but bzflag and Red Eclipse do not. It's not clear to me where the difference is.\r\n\r\n`gdb` output for Red Eclipse (running from `result/lib/redeclipse` directly, because of how Red Eclipse looks for its data and configuration files):\r\n\r\n```\r\nsven@linux-etoq:~/projects/nixpkgs/test/result/lib/redeclipse> LD_LIBRARY_PATH=~/libgl-shim/ gdb redeclipse\r\nGNU gdb (GDB; openSUSE 13.1) 7.6.50.20130731-cvs\r\nCopyright (C) 2013 Free Software Foundation, Inc.\r\nLicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\r\nThis is free software: you are free to change and redistribute it.\r\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\r\nand \"show warranty\" for details.\r\nThis GDB was configured as \"x86_64-suse-linux\".\r\nType \"show configuration\" for configuration details.\r\nFor bug reporting instructions, please see:\r\n<http://bugs.opensuse.org/>.\r\nFind the GDB manual and other documentation resources online at:\r\n<http://www.gnu.org/software/gdb/documentation/>.\r\nFor help, type \"help\".\r\nType \"apropos word\" to search for commands related to \"word\".\r\n..\r\nReading symbols from /nix/store/wbiq5zzdzc0d2j3y6g0yfy06qbi0i8lw-red-eclipse-1.5.3/lib/redeclipse/redeclipse...(no debugging symbols found)...done.\r\n(gdb) run\r\nStarting program: /nix/store/wbiq5zzdzc0d2j3y6g0yfy06qbi0i8lw-red-eclipse-1.5.3/lib/redeclipse/redeclipse \r\nwarning: File \"/nix/store/qlxp7vb63fp8kx5vk9a0y3rj8svbvl27-glibc-2.21/lib/libthread_db-1.0.so\" auto-loading has been declined by your `auto-load safe-path' set to \"$debugdir:$datadir/auto-load\".\r\nTo enable execution of this file add\r\n\tadd-auto-load-safe-path /nix/store/qlxp7vb63fp8kx5vk9a0y3rj8svbvl27-glibc-2.21/lib/libthread_db-1.0.so\r\nline to your configuration file \"/home/sven/.gdbinit\".\r\nTo completely disable this security protection add\r\n\tset auto-load safe-path /\r\nline to your configuration file \"/home/sven/.gdbinit\".\r\nFor more information about this security protection see the\r\n\"Auto-loading safe path\" section in the GDB manual.  E.g., run from the shell:\r\n\tinfo \"(gdb)Auto-loading safe path\"\r\nwarning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.\r\nMissing separate debuginfo for /home/sven/libgl-shim/libGL.so.1\r\nwarning: File \"/nix/store/kpzihgr24vi2rrxcdfv3grnfcaw7jvf4-gcc-4.9.3/lib/libstdc++.so.6.0.20-gdb.py\" auto-loading has been declined by your `auto-load safe-path' set to \"$debugdir:$datadir/auto-load\".\r\nMissing separate debuginfo for /usr/X11R6/lib64/modules/dri/fglrx_dri.so\r\nMissing separate debuginfo for /usr/lib64/libXinerama.so.1\r\nTry: zypper install -C \"debuginfo(build-id)=1e4fd16b4219872ba01206ff9d4fb163aae72d00\"\r\n\r\nProgram received signal SIGSEGV, Segmentation fault.\r\n0x00007ffff09241a7 in ?? () from /usr/X11R6/lib64/modules/dri/fglrx_dri.so\r\n```\r\n\r\nThe linking (through the shim) does appear to work correctly. Here is the `ldd` output, using the Nix-provided `ldd`, and taking into account the environment that is set up by the wrapper script(s).\r\n\r\n__OpenArena:__\r\n\r\n```\r\nsven@linux-etoq:~/projects/nixpkgs/test> LD_LIBRARY_PATH=~/libgl-shim/ LD_LIBRARY_PATH=/nix/store/y9mdjaxnlyqca3c27iri7nvnn7xlk1yh-SDL-1.2.15/lib:/nix/store/f55clf16r2lkq5c18pnfarbf13d9z62p-libogg-1.3.2/lib:/nix/store/g77q8cq3y21nkf9f6ndj0gvjr4x4mk9a-libvorbis-1.3.5/lib${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH /nix/store/qlxp7vb63fp8kx5vk9a0y3rj8svbvl27-glibc-2.21/bin/ldd /nix/store/qnssnin0hayb4vfanq0nlm5wwnbvcrz5-openarena-0.8.8/openarena-0.8.8/openarena.x86_64\r\n\tlinux-vdso.so.1 (0x00007ffd81ef0000)\r\n\tlibSDL-1.2.so.0 => /nix/store/y9mdjaxnlyqca3c27iri7nvnn7xlk1yh-SDL-1.2.15/lib/libSDL-1.2.so.0 (0x00007fc861be8000)\r\n\tlibGL.so.1 => /home/sven/libgl-shim/libGL.so.1 (0x00007fc8619d8000)\r\n\tlibvorbisfile.so.3 => /nix/store/g77q8cq3y21nkf9f6ndj0gvjr4x4mk9a-libvorbis-1.3.5/lib/libvorbisfile.so.3 (0x00007fc8617c8000)\r\n\tlibvorbis.so.0 => /nix/store/g77q8cq3y21nkf9f6ndj0gvjr4x4mk9a-libvorbis-1.3.5/lib/libvorbis.so.0 (0x00007fc861590000)\r\n\tlibogg.so.0 => /nix/store/f55clf16r2lkq5c18pnfarbf13d9z62p-libogg-1.3.2/lib/libogg.so.0 (0x00007fc861388000)\r\n\tlibrt.so.1 => /nix/store/qlxp7vb63fp8kx5vk9a0y3rj8svbvl27-glibc-2.21/lib/librt.so.1 (0x00007fc861180000)\r\n\tlibdl.so.2 => /nix/store/qlxp7vb63fp8kx5vk9a0y3rj8svbvl27-glibc-2.21/lib/libdl.so.2 (0x00007fc860f78000)\r\n\tlibm.so.6 => /nix/store/qlxp7vb63fp8kx5vk9a0y3rj8svbvl27-glibc-2.21/lib/libm.so.6 (0x00007fc860c70000)\r\n\tlibc.so.6 => /nix/store/qlxp7vb63fp8kx5vk9a0y3rj8svbvl27-glibc-2.21/lib/libc.so.6 (0x00007fc8608d0000)\r\n\tlibasound.so.2 => /nix/store/vjszhl1hh62qlk6rqzqdidjfpxd519n5-alsa-lib-1.0.29/lib/libasound.so.2 (0x00007fc8605a8000)\r\n\tlibpulse-simple.so.0 => /nix/store/qklab0a6cs5bhvf0iv88szg5pwbjypbg-libpulseaudio-6.0/lib/libpulse-simple.so.0 (0x00007fc8603a0000)\r\n\tlibpulse.so.0 => /nix/store/qklab0a6cs5bhvf0iv88szg5pwbjypbg-libpulseaudio-6.0/lib/libpulse.so.0 (0x00007fc860150000)\r\n\tlibpulsecommon-6.0.so => /nix/store/qklab0a6cs5bhvf0iv88szg5pwbjypbg-libpulseaudio-6.0/lib/pulseaudio/libpulsecommon-6.0.so (0x00007fc85fed0000)\r\n\tlibjson-c.so.2 => /nix/store/2jmm5hdpmfirdl80jyiakvjlilp6gldv-json-c-0.12/lib/libjson-c.so.2 (0x00007fc85fcc0000)\r\n\tlibsndfile.so.1 => /nix/store/gn43gi6d25idldfw3wyvhigf7ah7i65w-libsndfile-1.0.25/lib/libsndfile.so.1 (0x00007fc85fa58000)\r\n\tlibFLAC.so.8 => /nix/store/qqirmdsi35rz753jj33f9h61c3rzwi0n-flac-1.3.1/lib/libFLAC.so.8 (0x00007fc85f7e0000)\r\n\tlibvorbisenc.so.2 => /nix/store/g77q8cq3y21nkf9f6ndj0gvjr4x4mk9a-libvorbis-1.3.5/lib/libvorbisenc.so.2 (0x00007fc85f528000)\r\n\tlibdbus-1.so.3 => /nix/store/byb21384hrw1fsh9rzzrvkq3bmm0dlv8-dbus-libs-1.8.20/lib/libdbus-1.so.3 (0x00007fc85f2e0000)\r\n\tlibcap.so.2 => /nix/store/1yq6l4hdfrki9vxrxrciqfaf4z0cflvw-libcap-2.24/lib/libcap.so.2 (0x00007fc85f0d8000)\r\n\tlibX11.so.6 => /nix/store/9ml7lw7ajnk7jxc1mvrbywqldn0yb98s-libX11-1.6.3/lib/libX11.so.6 (0x00007fc85ed98000)\r\n\tlibXext.so.6 => /nix/store/75m6jc60b3p6ppviwbp37sf6xkvwhx72-libXext-1.3.3/lib/libXext.so.6 (0x00007fc85eb80000)\r\n\tlibXrandr.so.2 => /nix/store/1w8ms3a1lmmvrdszx3zi1056wav0jmff-libXrandr-1.5.0/lib/libXrandr.so.2 (0x00007fc85e970000)\r\n\tlibXrender.so.1 => /nix/store/hl26m6jg9hdr31lv73g7vg78174sy3wx-libXrender-0.9.9/lib/libXrender.so.1 (0x00007fc85e760000)\r\n\tlibpthread.so.0 => /nix/store/qlxp7vb63fp8kx5vk9a0y3rj8svbvl27-glibc-2.21/lib/libpthread.so.0 (0x00007fc85e540000)\r\n\t/nix/store/qlxp7vb63fp8kx5vk9a0y3rj8svbvl27-glibc-2.21/lib/ld-linux-x86-64.so.2 (0x00007fc861e80000)\r\n\tlibattr.so.1 => /nix/store/1a5pkc2sm5jd71hxxi9hj9211cc79mck-attr-2.4.47/lib/libattr.so.1 (0x00007fc85e338000)\r\n\tlibxcb.so.1 => /nix/store/pzc1cmnbn0ch6ilgi64clxvlx2v23q4p-libxcb-1.11/lib/libxcb.so.1 (0x00007fc85e118000)\r\n\tlibXau.so.6 => /nix/store/nk2gxi8kq0qanw43ssiirw7kza8qb0ia-libXau-1.0.8/lib/libXau.so.6 (0x00007fc85df10000)\r\n\tlibXdmcp.so.6 => /nix/store/fspwri6dyw5r658wr0dxxxmpf0q96vy1-libXdmcp-1.1.2/lib/libXdmcp.so.6 (0x00007fc85dd08000)\r\n```\r\n\r\n__Red Eclipse:__\r\n\r\n```\r\nsven@linux-etoq:~/projects/nixpkgs/test> LD_LIBRARY_PATH=~/libgl-shim/ /nix/store/qlxp7vb63fp8kx5vk9a0y3rj8svbvl27-glibc-2.21/bin/ldd result/lib/redeclipse/redeclipse\r\n\tlinux-vdso.so.1 (0x00007ffc856f0000)\r\n\tlibX11.so.6 => /nix/store/9ml7lw7ajnk7jxc1mvrbywqldn0yb98s-libX11-1.6.3/lib/libX11.so.6 (0x00007fc0bf7d0000)\r\n\tlibSDL-1.2.so.0 => /nix/store/9sy7rrin9rd4j83mjwmgwc179s81miqg-SDL-1.2.15/lib/libSDL-1.2.so.0 (0x00007fc0bf538000)\r\n\tlibpthread.so.0 => /nix/store/qlxp7vb63fp8kx5vk9a0y3rj8svbvl27-glibc-2.21/lib/libpthread.so.0 (0x00007fc0bf318000)\r\n\tlibSDL_image-1.2.so.0 => /nix/store/rzd2mf38xlwscky57mj5pbpgqk05viyh-SDL_image-1.2.12/lib/libSDL_image-1.2.so.0 (0x00007fc0bf0f8000)\r\n\tlibSDL_mixer-1.2.so.0 => /nix/store/j7i02c53qcwbdlzj9rhc8314j2b2ah5h-SDL_mixer-1.2.12/lib/libSDL_mixer-1.2.so.0 (0x00007fc0beea8000)\r\n\tlibz.so.1 => /nix/store/alsvwzkiw4b7ip38l4nlfjijdvg3fvzn-zlib-1.2.8/lib/libz.so.1 (0x00007fc0bec90000)\r\n\tlibGL.so.1 => /home/sven/libgl-shim/libGL.so.1 (0x00007fc0bea80000)\r\n\tlibrt.so.1 => /nix/store/qlxp7vb63fp8kx5vk9a0y3rj8svbvl27-glibc-2.21/lib/librt.so.1 (0x00007fc0be878000)\r\n\tlibstdc++.so.6 => /nix/store/kpzihgr24vi2rrxcdfv3grnfcaw7jvf4-gcc-4.9.3/lib/libstdc++.so.6 (0x00007fc0be568000)\r\n\tlibm.so.6 => /nix/store/qlxp7vb63fp8kx5vk9a0y3rj8svbvl27-glibc-2.21/lib/libm.so.6 (0x00007fc0be260000)\r\n\tlibgcc_s.so.1 => /nix/store/qlxp7vb63fp8kx5vk9a0y3rj8svbvl27-glibc-2.21/lib/libgcc_s.so.1 (0x00007fc0be048000)\r\n\tlibc.so.6 => /nix/store/qlxp7vb63fp8kx5vk9a0y3rj8svbvl27-glibc-2.21/lib/libc.so.6 (0x00007fc0bdca8000)\r\n\tlibxcb.so.1 => /nix/store/pzc1cmnbn0ch6ilgi64clxvlx2v23q4p-libxcb-1.11/lib/libxcb.so.1 (0x00007fc0bda88000)\r\n\tlibXau.so.6 => /nix/store/nk2gxi8kq0qanw43ssiirw7kza8qb0ia-libXau-1.0.8/lib/libXau.so.6 (0x00007fc0bd880000)\r\n\tlibXdmcp.so.6 => /nix/store/fspwri6dyw5r658wr0dxxxmpf0q96vy1-libXdmcp-1.1.2/lib/libXdmcp.so.6 (0x00007fc0bd678000)\r\n\tlibdl.so.2 => /nix/store/qlxp7vb63fp8kx5vk9a0y3rj8svbvl27-glibc-2.21/lib/libdl.so.2 (0x00007fc0bd470000)\r\n\tlibasound.so.2 => /nix/store/vjszhl1hh62qlk6rqzqdidjfpxd519n5-alsa-lib-1.0.29/lib/libasound.so.2 (0x00007fc0bd148000)\r\n\tlibpulse-simple.so.0 => /nix/store/6v1gd5apxh6kda9xpak54n75j3s9jrm9-libpulseaudio-6.0/lib/libpulse-simple.so.0 (0x00007fc0bcf40000)\r\n\tlibpulse.so.0 => /nix/store/6v1gd5apxh6kda9xpak54n75j3s9jrm9-libpulseaudio-6.0/lib/libpulse.so.0 (0x00007fc0bccf0000)\r\n\tlibpulsecommon-6.0.so => /nix/store/6v1gd5apxh6kda9xpak54n75j3s9jrm9-libpulseaudio-6.0/lib/pulseaudio/libpulsecommon-6.0.so (0x00007fc0bca70000)\r\n\tlibjson-c.so.2 => /nix/store/jaklgzhv2qcq9h71w95sw0c49dbrqc7r-json-c-0.12/lib/libjson-c.so.2 (0x00007fc0bc860000)\r\n\tlibsndfile.so.1 => /nix/store/gn43gi6d25idldfw3wyvhigf7ah7i65w-libsndfile-1.0.25/lib/libsndfile.so.1 (0x00007fc0bc5f8000)\r\n\tlibFLAC.so.8 => /nix/store/qqirmdsi35rz753jj33f9h61c3rzwi0n-flac-1.3.1/lib/libFLAC.so.8 (0x00007fc0bc380000)\r\n\tlibvorbisenc.so.2 => /nix/store/g77q8cq3y21nkf9f6ndj0gvjr4x4mk9a-libvorbis-1.3.5/lib/libvorbisenc.so.2 (0x00007fc0bc0c8000)\r\n\tlibvorbis.so.0 => /nix/store/g77q8cq3y21nkf9f6ndj0gvjr4x4mk9a-libvorbis-1.3.5/lib/libvorbis.so.0 (0x00007fc0bbe90000)\r\n\tlibogg.so.0 => /nix/store/f55clf16r2lkq5c18pnfarbf13d9z62p-libogg-1.3.2/lib/libogg.so.0 (0x00007fc0bbc88000)\r\n\tlibdbus-1.so.3 => /nix/store/s42mk8l35nh0p3li6qq9gmpmq37dh7qf-dbus-libs-1.8.20/lib/libdbus-1.so.3 (0x00007fc0bba40000)\r\n\tlibcap.so.2 => /nix/store/1yq6l4hdfrki9vxrxrciqfaf4z0cflvw-libcap-2.24/lib/libcap.so.2 (0x00007fc0bb838000)\r\n\tlibXext.so.6 => /nix/store/75m6jc60b3p6ppviwbp37sf6xkvwhx72-libXext-1.3.3/lib/libXext.so.6 (0x00007fc0bb620000)\r\n\tlibXrandr.so.2 => /nix/store/1w8ms3a1lmmvrdszx3zi1056wav0jmff-libXrandr-1.5.0/lib/libXrandr.so.2 (0x00007fc0bb410000)\r\n\tlibXrender.so.1 => /nix/store/hl26m6jg9hdr31lv73g7vg78174sy3wx-libXrender-0.9.9/lib/libXrender.so.1 (0x00007fc0bb200000)\r\n\t/nix/store/qlxp7vb63fp8kx5vk9a0y3rj8svbvl27-glibc-2.21/lib/ld-linux-x86-64.so.2 (0x00007fc0bfb10000)\r\n\tlibpng16.so.16 => /nix/store/kxrznj68yq3ph6m2wc1vbxh4qw6ql2f2-libpng-apng-1.6.18/lib/libpng16.so.16 (0x00007fc0bafc8000)\r\n\tlibjpeg.so.62 => /nix/store/pfgx11m6kr910i2xrs3679faz3v67plf-libjpeg-turbo-1.4.1/lib/libjpeg.so.62 (0x00007fc0bad60000)\r\n\tlibtiff.so.5 => /nix/store/pgs7icihncbf27n1jvlb30zbxwf7q5zc-libtiff-4.0.4beta/lib/libtiff.so.5 (0x00007fc0baae8000)\r\n\tlibfluidsynth.so.1 => /nix/store/sjx30jsbj84slvc6lp9riary46llqmfl-fluidsynth-1.1.6/lib/libfluidsynth.so.1 (0x00007fc0ba818000)\r\n\tlibvorbisfile.so.3 => /nix/store/g77q8cq3y21nkf9f6ndj0gvjr4x4mk9a-libvorbis-1.3.5/lib/libvorbisfile.so.3 (0x00007fc0ba608000)\r\n\tlibsmpeg-0.4.so.0 => /nix/store/1rf3z0498vinjw4jjk4rx6fvnq55ahgm-smpeg-svn390/lib/libsmpeg-0.4.so.0 (0x00007fc0ba3a8000)\r\n\tlibattr.so.1 => /nix/store/1a5pkc2sm5jd71hxxi9hj9211cc79mck-attr-2.4.47/lib/libattr.so.1 (0x00007fc0ba1a0000)\r\n\tliblzma.so.5 => /nix/store/ivp3pna40wrq4i2whp4ijksfi4b8z58k-xz-5.2.1/lib/liblzma.so.5 (0x00007fc0b9f78000)\r\n\tlibjack.so.0 => /nix/store/rhrj3y0nvxk0699jnrlfx30sh92nnxfc-libjack2-2015-06-02/lib/libjack.so.0 (0x00007fc0b9d18000)\r\n\tlibgthread-2.0.so.0 => /nix/store/26zyb2byw1sqr2afbz6ql3352ri847jd-glib-2.44.1/lib/libgthread-2.0.so.0 (0x00007fc0b9b10000)\r\n\tlibglib-2.0.so.0 => /nix/store/26zyb2byw1sqr2afbz6ql3352ri847jd-glib-2.44.1/lib/libglib-2.0.so.0 (0x00007fc0b97d8000)\r\n\tlibopus.so.0 => /nix/store/984qsrday6gg7fv7m9r7dg8dv7x2fsxs-libopus-1.1/lib/libopus.so.0 (0x00007fc0b9588000)\r\n```\r\n\r\n__bzflag:__\r\n\r\n```\r\nsven@linux-etoq:~/projects/nixpkgs/test/bzflag> LD_LIBRARY_PATH=~/libgl-shim/ /nix/store/qlxp7vb63fp8kx5vk9a0y3rj8svbvl27-glibc-2.21/bin/ldd result/bin/bzflag               \r\n\tlinux-vdso.so.1 (0x00007ffda8b58000)\r\n\tlibSDL-1.2.so.0 => /nix/store/y9mdjaxnlyqca3c27iri7nvnn7xlk1yh-SDL-1.2.15/lib/libSDL-1.2.so.0 (0x00007f4ebd8b0000)\r\n\tlibasound.so.2 => /nix/store/vjszhl1hh62qlk6rqzqdidjfpxd519n5-alsa-lib-1.0.29/lib/libasound.so.2 (0x00007f4ebd588000)\r\n\tlibpulse-simple.so.0 => /nix/store/qklab0a6cs5bhvf0iv88szg5pwbjypbg-libpulseaudio-6.0/lib/libpulse-simple.so.0 (0x00007f4ebd380000)\r\n\tlibpulse.so.0 => /nix/store/qklab0a6cs5bhvf0iv88szg5pwbjypbg-libpulseaudio-6.0/lib/libpulse.so.0 (0x00007f4ebd130000)\r\n\tlibpulsecommon-6.0.so => /nix/store/qklab0a6cs5bhvf0iv88szg5pwbjypbg-libpulseaudio-6.0/lib/pulseaudio/libpulsecommon-6.0.so (0x00007f4ebceb0000)\r\n\tlibjson-c.so.2 => /nix/store/2jmm5hdpmfirdl80jyiakvjlilp6gldv-json-c-0.12/lib/libjson-c.so.2 (0x00007f4ebcca0000)\r\n\tlibsndfile.so.1 => /nix/store/gn43gi6d25idldfw3wyvhigf7ah7i65w-libsndfile-1.0.25/lib/libsndfile.so.1 (0x00007f4ebca38000)\r\n\tlibFLAC.so.8 => /nix/store/qqirmdsi35rz753jj33f9h61c3rzwi0n-flac-1.3.1/lib/libFLAC.so.8 (0x00007f4ebc7c0000)\r\n\tlibvorbisenc.so.2 => /nix/store/g77q8cq3y21nkf9f6ndj0gvjr4x4mk9a-libvorbis-1.3.5/lib/libvorbisenc.so.2 (0x00007f4ebc508000)\r\n\tlibvorbis.so.0 => /nix/store/g77q8cq3y21nkf9f6ndj0gvjr4x4mk9a-libvorbis-1.3.5/lib/libvorbis.so.0 (0x00007f4ebc2d0000)\r\n\tlibogg.so.0 => /nix/store/f55clf16r2lkq5c18pnfarbf13d9z62p-libogg-1.3.2/lib/libogg.so.0 (0x00007f4ebc0c8000)\r\n\tlibdbus-1.so.3 => /nix/store/byb21384hrw1fsh9rzzrvkq3bmm0dlv8-dbus-libs-1.8.20/lib/libdbus-1.so.3 (0x00007f4ebbe80000)\r\n\tlibcap.so.2 => /nix/store/1yq6l4hdfrki9vxrxrciqfaf4z0cflvw-libcap-2.24/lib/libcap.so.2 (0x00007f4ebbc78000)\r\n\tlibrt.so.1 => /nix/store/qlxp7vb63fp8kx5vk9a0y3rj8svbvl27-glibc-2.21/lib/librt.so.1 (0x00007f4ebba70000)\r\n\tlibdl.so.2 => /nix/store/qlxp7vb63fp8kx5vk9a0y3rj8svbvl27-glibc-2.21/lib/libdl.so.2 (0x00007f4ebb868000)\r\n\tlibXrandr.so.2 => /nix/store/1w8ms3a1lmmvrdszx3zi1056wav0jmff-libXrandr-1.5.0/lib/libXrandr.so.2 (0x00007f4ebb658000)\r\n\tlibXrender.so.1 => /nix/store/hl26m6jg9hdr31lv73g7vg78174sy3wx-libXrender-0.9.9/lib/libXrender.so.1 (0x00007f4ebb448000)\r\n\tlibGLU.so.1 => /nix/store/ldp4bm03b9vkmymzpvgqas1p0k58icqz-mesa-10.6.5/lib/libGLU.so.1 (0x00007f4ebb1c8000)\r\n\tlibGL.so.1 => /home/sven/libgl-shim/libGL.so.1 (0x00007f4ebafb8000)\r\n\tlibXxf86vm.so.1 => /nix/store/2vi8ac37awm4jscxavg8nf1p03w6ph0v-libXxf86vm-1.1.4/lib/libXxf86vm.so.1 (0x00007f4ebadb0000)\r\n\tlibXext.so.6 => /nix/store/75m6jc60b3p6ppviwbp37sf6xkvwhx72-libXext-1.3.3/lib/libXext.so.6 (0x00007f4ebab98000)\r\n\tlibSM.so.6 => /nix/store/64azqpprhmq7k4c2m877jxq5cjgq5x9g-libSM-1.2.2/lib/libSM.so.6 (0x00007f4eba990000)\r\n\tlibICE.so.6 => /nix/store/dkajwpq9mmiznq16gf38n4mqiirysvfc-libICE-1.0.9/lib/libICE.so.6 (0x00007f4eba770000)\r\n\tlibX11.so.6 => /nix/store/9ml7lw7ajnk7jxc1mvrbywqldn0yb98s-libX11-1.6.3/lib/libX11.so.6 (0x00007f4eba430000)\r\n\tlibGLEW.so.1.11 => /nix/store/nbpis3hi1djqhc6yxrhm3l2ay2x044cj-glew-1.11.0/lib/libGLEW.so.1.11 (0x00007f4eba198000)\r\n\tlibcurl.so.4 => /nix/store/fwh3ygh58ds40kbd9jiyp4rcrvi0zw9n-curl-7.43.0/lib/libcurl.so.4 (0x00007f4eb9f28000)\r\n\tlibssh2.so.1 => /nix/store/xb60as50jw9617ikkl9jkva2x6i8jawa-libssh2-1.6.0/lib/libssh2.so.1 (0x00007f4eb9cf8000)\r\n\tlibssl.so.1.0.0 => /nix/store/myvm6vrbckar8id33iy1gfzsv7p870zi-openssl-1.0.1p/lib/libssl.so.1.0.0 (0x00007f4eb9a88000)\r\n\tlibcrypto.so.1.0.0 => /nix/store/myvm6vrbckar8id33iy1gfzsv7p870zi-openssl-1.0.1p/lib/libcrypto.so.1.0.0 (0x00007f4eb9698000)\r\n\tlibz.so.1 => /nix/store/alsvwzkiw4b7ip38l4nlfjijdvg3fvzn-zlib-1.2.8/lib/libz.so.1 (0x00007f4eb9480000)\r\n\tlibstdc++.so.6 => /nix/store/kpzihgr24vi2rrxcdfv3grnfcaw7jvf4-gcc-4.9.3/lib/../lib64/libstdc++.so.6 (0x00007f4eb9170000)\r\n\tlibpthread.so.0 => /nix/store/qlxp7vb63fp8kx5vk9a0y3rj8svbvl27-glibc-2.21/lib/libpthread.so.0 (0x00007f4eb8f50000)\r\n\tlibm.so.6 => /nix/store/qlxp7vb63fp8kx5vk9a0y3rj8svbvl27-glibc-2.21/lib/libm.so.6 (0x00007f4eb8c48000)\r\n\tlibc.so.6 => /nix/store/qlxp7vb63fp8kx5vk9a0y3rj8svbvl27-glibc-2.21/lib/libc.so.6 (0x00007f4eb88a8000)\r\n\tlibgcc_s.so.1 => /nix/store/kpzihgr24vi2rrxcdfv3grnfcaw7jvf4-gcc-4.9.3/lib/../lib64/libgcc_s.so.1 (0x00007f4eb8690000)\r\n\t/nix/store/qlxp7vb63fp8kx5vk9a0y3rj8svbvl27-glibc-2.21/lib/ld-linux-x86-64.so.2 (0x00007f4ebdb48000)\r\n\tlibattr.so.1 => /nix/store/1a5pkc2sm5jd71hxxi9hj9211cc79mck-attr-2.4.47/lib/libattr.so.1 (0x00007f4eb8488000)\r\n\tlibxcb.so.1 => /nix/store/pzc1cmnbn0ch6ilgi64clxvlx2v23q4p-libxcb-1.11/lib/libxcb.so.1 (0x00007f4eb8268000)\r\n\tlibXau.so.6 => /nix/store/nk2gxi8kq0qanw43ssiirw7kza8qb0ia-libXau-1.0.8/lib/libXau.so.6 (0x00007f4eb8060000)\r\n\tlibXdmcp.so.6 => /nix/store/fspwri6dyw5r658wr0dxxxmpf0q96vy1-libXdmcp-1.1.2/lib/libXdmcp.so.6 (0x00007f4eb7e58000)\r\n\tlibexpat.so.1 => /nix/store/6vrrwl9cp39rvp324nnb05iacbzn732z-expat-2.1.0/lib/libexpat.so.1 (0x00007f4eb7c28000)\r\n\tlibglapi.so.0 => /nix/store/dh0zljw6r71m91cq20pch4wrpffzf94v-mesa-noglu-10.6.5/lib/libglapi.so.0 (0x00007f4eb79f8000)\r\n\tlibXdamage.so.1 => /nix/store/4ms2h0yd7rw1yb9pa00f5s4zp68qay1p-libXdamage-1.1.4/lib/libXdamage.so.1 (0x00007f4eb77f0000)\r\n\tlibXfixes.so.3 => /nix/store/5n8b9dg83xrgn35wfbn9hzy9j1q56sps-libXfixes-5.0.1/lib/libXfixes.so.3 (0x00007f4eb75e8000)\r\n\tlibX11-xcb.so.1 => /nix/store/9ml7lw7ajnk7jxc1mvrbywqldn0yb98s-libX11-1.6.3/lib/libX11-xcb.so.1 (0x00007f4eb73e0000)\r\n\tlibxcb-glx.so.0 => /nix/store/pzc1cmnbn0ch6ilgi64clxvlx2v23q4p-libxcb-1.11/lib/libxcb-glx.so.0 (0x00007f4eb71c8000)\r\n\tlibxcb-dri2.so.0 => /nix/store/pzc1cmnbn0ch6ilgi64clxvlx2v23q4p-libxcb-1.11/lib/libxcb-dri2.so.0 (0x00007f4eb6fc0000)\r\n\tlibxcb-dri3.so.0 => /nix/store/pzc1cmnbn0ch6ilgi64clxvlx2v23q4p-libxcb-1.11/lib/libxcb-dri3.so.0 (0x00007f4eb6db8000)\r\n\tlibxcb-present.so.0 => /nix/store/pzc1cmnbn0ch6ilgi64clxvlx2v23q4p-libxcb-1.11/lib/libxcb-present.so.0 (0x00007f4eb6bb0000)\r\n\tlibxcb-randr.so.0 => /nix/store/pzc1cmnbn0ch6ilgi64clxvlx2v23q4p-libxcb-1.11/lib/libxcb-randr.so.0 (0x00007f4eb69a0000)\r\n\tlibxcb-xfixes.so.0 => /nix/store/pzc1cmnbn0ch6ilgi64clxvlx2v23q4p-libxcb-1.11/lib/libxcb-xfixes.so.0 (0x00007f4eb6798000)\r\n\tlibxcb-render.so.0 => /nix/store/pzc1cmnbn0ch6ilgi64clxvlx2v23q4p-libxcb-1.11/lib/libxcb-render.so.0 (0x00007f4eb6588000)\r\n\tlibxcb-shape.so.0 => /nix/store/pzc1cmnbn0ch6ilgi64clxvlx2v23q4p-libxcb-1.11/lib/libxcb-shape.so.0 (0x00007f4eb6380000)\r\n\tlibxcb-sync.so.1 => /nix/store/pzc1cmnbn0ch6ilgi64clxvlx2v23q4p-libxcb-1.11/lib/libxcb-sync.so.1 (0x00007f4eb6178000)\r\n\tlibxshmfence.so.1 => /nix/store/crcnkjlavdrvapw8wqrd6kqzwbay60xv-libxshmfence-1.2/lib/libxshmfence.so.1 (0x00007f4eb5f70000)\r\n\tlibdrm.so.2 => /nix/store/j00x1sblqvnq0vpii6kcxnj89lz2armf-libdrm-2.4.64/lib/libdrm.so.2 (0x00007f4eb5d60000)\r\n\tlibuuid.so.1 => /nix/store/nzq4igi8ls5pszvzy96jq1h23shyqdrj-util-linux-2.26.2/lib/libuuid.so.1 (0x00007f4eb5b58000)\r\n```\r\n\r\nCCing @vcunat on this, as suggested by @ttuegel."},"comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments/139896944","html_url":"https://github.com/NixOS/nixpkgs/issues/9840#issuecomment-139896944","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/9840","id":139896944,"user":{"login":"joepie91","id":1663259,"avatar_url":"https://avatars.githubusercontent.com/u/1663259?v=3","gravatar_id":"","url":"https://api.github.com/users/joepie91","html_url":"https://github.com/joepie91","followers_url":"https://api.github.com/users/joepie91/followers","following_url":"https://api.github.com/users/joepie91/following{/other_user}","gists_url":"https://api.github.com/users/joepie91/gists{/gist_id}","starred_url":"https://api.github.com/users/joepie91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joepie91/subscriptions","organizations_url":"https://api.github.com/users/joepie91/orgs","repos_url":"https://api.github.com/users/joepie91/repos","events_url":"https://api.github.com/users/joepie91/events{/privacy}","received_events_url":"https://api.github.com/users/joepie91/received_events","type":"User","site_admin":false},"created_at":"2015-09-13T17:22:13Z","updated_at":"2015-09-13T17:22:13Z","body":"```\r\nsven@linux-etoq:~/redeclipse-1.5.3> ldd ~/libgl-shim/libGL.so.1 \r\n\tlinux-vdso.so.1 (0x00007ffe833c0000)\r\n\tlibpthread.so.0 => /lib64/libpthread.so.0 (0x00007f23d95f8000)\r\n\tlibXext.so.6 => /usr/lib64/libXext.so.6 (0x00007f23d93e0000)\r\n\tlibc.so.6 => /lib64/libc.so.6 (0x00007f23d9030000)\r\n\t/lib64/ld-linux-x86-64.so.2 (0x00007f23d9a28000)\r\n\tlibX11.so.6 => /usr/lib64/libX11.so.6 (0x00007f23d8cc0000)\r\n\tlibxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007f23d8aa0000)\r\n\tlibdl.so.2 => /lib64/libdl.so.2 (0x00007f23d8898000)\r\n\tlibXau.so.6 => /usr/lib64/libXau.so.6 (0x00007f23d8690000)\r\n```\r\n\r\nAnd I just verified that the Nix `ldd` *really* still isn't finding it:\r\n\r\n```\r\nsven@linux-etoq:~/redeclipse-1.5.3> /nix/store/qlxp7vb63fp8kx5vk9a0y3rj8svbvl27-glibc-2.21/bin/ldd ~/libgl-shim/libGL.so.1 \r\n\tlinux-vdso.so.1 (0x00007ffe45df0000)\r\n\tlibpthread.so.0 => /lib64/libpthread.so.0 (0x00007f1658900000)\r\n\tlibXext.so.6 => /usr/lib64/libXext.so.6 (0x00007f16586e8000)\r\n\tlibc.so.6 => /lib64/libc.so.6 (0x00007f1658338000)\r\n\t/nix/store/qlxp7vb63fp8kx5vk9a0y3rj8svbvl27-glibc-2.21/lib64/ld-linux-x86-64.so.2 (0x00007f1658d30000)\r\n\tlibX11.so.6 => not found\r\n```"}}