Code Monkey home page Code Monkey logo

Comments (4)

kevinboone avatar kevinboone commented on September 28, 2024 2

from source.

k9spud avatar k9spud commented on September 28, 2024

I tried setting LD_LIBRARY_PATH to include /usr/gcc-4.9-pie/lib, but it seems to have no effect:

$ echo $LD_LIBRARY_PATH
/data/data/com.k9spud.CppEditor/kbox4/lib:/data/data/com.k9spud.CppEditor/kbox4/usr/lib
$ export LD_LIBRARY_PATH='/data/data/com.k9spud.CppEditor/kbox4/usr/gcc-4.9-pie/lib:/data/data/com.k9spud.CppEditor/kbox4/lib:/data/data/com.k9spud.CppEditor/kbox4/usr/lib'
$ ./test
CANNOT LINK EXECUTABLE DEPENDENCIES: library "libstdc++.so.6" not found

Then I tried symlinking the libraries as you suggested:

$ cd /usr/lib
$ ln -s ../gcc-4.9-pie/lib/libstdc++.so.6.0.20 libstdc++.so.6
$ ln -s ../gcc-4.9-pie/lib/libgcc_s.so.1 libgcc_s.so.1
$ ~/test
Hello world!
$

Lo and behold, it works! Thank you so much!

How come setting LD_LIBRARY_PATH doesn't seem to do anything? I can even clear it out completely (removing all the paths) and everything still runs just the same. How does it know to look in /usr/lib when I'm running under the kbox_shell? Is /usr/lib something hard coded into the libfakechroot.so thingy?

from source.

kevinboone avatar kevinboone commented on September 28, 2024

from source.

k9spud avatar k9spud commented on September 28, 2024

FYI, I did a little more testing, this time trying to set LD_LIBRARY_PATH to point at the kbox "virtual" path of "/usr/gcc-4.9-pie/lib" instead of the underlying Android filesystem path. Still no go -- LD_LIBRARY_PATH seems to be completely ignored as far as I can tell.

Anyway, since the symlinking in /usr/lib to /usr/gcc-4.9-pie/lib/* works, I'm quite satisfied for the moment.

Thank you so much for making kbox! I managed to easily compile SLiRP on my Android and can now use PPP over ADB to achieve USB tethering for free. Yay!

Next I've been attempting to compile Qt's command line build tools (qmake, uic, moc, etc) for my Android and gotten pretty far, but not quite sure how to get resultant Android self-hosted compiled Qt apps to execute. Qt apps on Android seem to compile C++ code down to a .SO library instead of a direct executable and then some Java loader that the Qt people wrote does the actual loading and execution of the Qt C++ application code inside the .SO. Hence my interest in understanding how the system figures out how and where to load .SO files...

from source.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.