phhusson / Superuser

Keeping koush's Superuser fresh
GNU General Public License v3.0
424 stars 50 forks source link

Don't set LD_LIBRARY_PATH #8

Closed lbdroid closed 8 years ago

lbdroid commented 8 years ago

I was getting this kind of error running a 32 bit binary on a 64 bit Nexus 9:

CANNOT LINK EXECUTABLE: "/system/lib64/libstdc++.so" is 64-bit instead of 32-bit
page record for 0xf733503c was not found (block_size=16)

Bionic's linker already has the proper paths built in, LD_LIBRARY_PATH should only be used for overriding the default paths, the variable SHOULD be unset.

phhusson commented 8 years ago

Hum, I have some memories of that, this was actually needed. I merge, but could you search in bionic since when this is needed, so we'll reenable it for older Android? Thanks,

lbdroid commented 8 years ago

Seems to be present all the way back to donut-release.

https://android.googlesource.com/platform/bionic/+/donut-release/linker/linker.c#489

Although it has been adjusted a bit since then.

phhusson commented 8 years ago

And the commit from koush doing this is "initial commit" :/ I'll leave it as is until someone complains then. Thanks

lbdroid commented 8 years ago

Hey FYI: https://github.com/CyanogenMod/android_system_extras_su/commit/785aaf8eb61cfc4ebeca904342822544ea36f1fa

Apparently, they had the same problem.