proot
proot copied to clipboard
QEMU 2.0.0 optionally requires libstdc++, which isn't always in the usual locations
Reported-by: @chewi Ref.: https://groups.google.com/forum/#!topic/proot_me/OLbYgciCrPc
I'm on Gentoo but suspect this will affect other distributions too. Starting from 2.0.0, QEMU optionally requires libstdc++. If it detects a C++ compiler when building, it'll enable optional C++ code and the resulting QEMU binaries will be linked against that library. The trouble is that, at least on Gentoo, libstdc++ isn't under the usual locations such as /lib or /usr/lib but actually /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2 in my case. When proot tries to invoke QEMU, it bails out with...
libstdc++.so.6: cannot open shared object file: No such file or directory
The library is normally found at this path because of /etc/ld.so.conf.d/05gcc-x86_64-pc-linux-gnu.conf (which is referenced by /etc/ld.so.conf). Evidently proot does not use ld.so.conf and relies on hardcoded paths instead. If I set LD_LIBRARY_PATH to this location before starting proot then it works but this is obviously not ideal. Could proot somehow use the host root's /etc/ld.so.conf?