Opened 7 years ago

Closed 16 months ago

#7557 closed enhancement (wontfix)

Create statically linked python interpreter with depdendencies

Reported by: hellais Owned by: hellais
Priority: Medium Milestone:
Component: Archived/Ooni Version:
Severity: Normal Keywords: ooni_build_system, ooni_wishlist, archived-closed-2018-07-04
Cc: aagbsn Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

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.

http://stackoverflow.com/questions/1150373/compile-the-python-interpreter-statically

https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/667470

http://sourceware.org/bugzilla/show_bug.cgi?id=13490

http://stackoverflow.com/questions/9541609/using-linux-c-shared-and-static-libraries-in-a-same-program

http://www.airs.com/blog/archives/category/programming/page/23

http://askubuntu.com/questions/63711/building-a-static-version-of-python

https://bugzilla.redhat.com/show_bug.cgi?id=606830

http://stackoverflow.com/questions/47953/what-are-the-advantages-of-packaging-your-python-library-application-as-an-egg

Child Tickets

Change History (5)

comment:3 Changed 7 years ago by hellais

Keywords: ooni_wishlist added

comment:4 Changed 23 months ago by teor

Severity: Normal

Set all open tickets without a severity to "Normal"

comment:5 Changed 16 months ago by teor

Keywords: archived-closed-2018-07-04 added
Resolution: wontfix
Status: newclosed

Close all tickets in archived components

Note: See TracTickets for help on using tickets.