Create statically linked python interpreter with depdendencies
To facilitate the running of tests on machines that run outdated versions of python (e.x. planetlab) we want a way to compile python 2.7 as statically linked binary.
I did some cursory research and testing to get this working, but have reached the point where I can build a python binary that is statically linked, but it does not include all the compiled modules required by ooniprobe.
I my machine I did so with:
CC="gcc -m32" LDFLAGS="-L/lib32 -L/usr/lib32 -L`pwd`/lib32 -Wl,-rpath,/lib32 -Wl,-rpath,/usr/lib32" ./configure LDFLAGS="-static -static-libgcc" CPPFLAGS="-static"
This is required because it's 64 bit on a 32bit machine it's probably sufficient to do
./configure LDFLAGS="-static -static-libgcc" CPPFLAGS="-static"
Here are a collection of links that may be useful.