I have two options to compile, Option1: Cross-compile using a x86_x64 ubuntu or debian system for armhf package compilation, Option2 Image of ubuntu or debian armhf in Qemu.
The problem I have is that when using cross compilation, the compilation fails because the source packages have been compiled using gcc4.8 and the version that i have installed for cross compilation is gcc4.9.
For this reason I opted to build directly from a ubuntu or debian armhf image in qemu.
Now, the final problem and the reason why I am asking the question here is the following:
I have seen and tested that some people has been build python, modules and executable binaries for android, I currently have python2 and python3 installed, I have root access on my tablet, I can run commands like
python -c 'print("hello world!")'
I can also run python files just fine like
python myscript.py
They used the following flags to compile python:
./configure --build=arm --prefix="$PWD"/out LDFLAGS="-static -static-libgcc -Wl,--unresolved-symbols=ignore-all -Wl,--export-dynamic" CPPFLAGS=-static CXXFLAGS=-static CFLAGS="-Os -static" LDFLAGS=-static LD=ld.gold
Unfortunately I have not been successful, I tried to compile the debian "zip" package with the following commands and it did not work.
apt-get build-dep zip
apt-get source zip
cd zip-3.0
export CFLAGS=-static
export LDFLAGS=-static
export CPPFLAGS=-static
dpkg-buildpackage -rfakeroot -uc -b
After compiling the package, a deb package is generated, in which I extract all the binaries and executables to later install them manually on my tablet, preserving the directories correctly, granting the appropriate permissions using chmod and chown and creating the symbolic links so that they have a connection with their corresponding libraries, since android uses a slightly different directory structure.
But It Doesn't Work, Everything is compiled and the package is generated, then when I do the installation process mentioned above, I restart the tablet and run the command in this case "zip" to see if it is already working, the result is no, since I get an error saying "No such file or directory" and when I use the command "command -v zip" the file exist, it is correctly installed and the permissions are correct, Minimally I should get an error, for example "error: somelib .so not found" if it had at least been compiled correctly, since some dependencies has not been compiled yet, but not.
uname -m
Gives me armv7l
Any solution?