Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I found this (mainly concerning static compilation of Python modules):</p> <ul> <li><a href="http://bytes.com/groups/python/23235-build-static-python-executable-linux" rel="noreferrer">http://bytes.com/groups/python/23235-build-static-python-executable-linux</a></li> </ul> <p>Which describes a file used for configuration located here: </p> <pre><code>&lt;Python_Source&gt;/Modules/Setup </code></pre> <p>If this file isn't present, it can be created by copying:</p> <pre><code>&lt;Python_Source&gt;/Modules/Setup.dist </code></pre> <p>The <code>Setup</code> file has tons of documentation in it and the <code>README</code> included with the source offers lots of good compilation information as well.</p> <p>I haven't tried compiling yet, but I think with these resources, I should be successful when I try. I will post my results as a comment here.</p> <h2>Update</h2> <p>To get a pure-static python executable, you must also configure as follows:</p> <pre><code>./configure LDFLAGS="-static -static-libgcc" CPPFLAGS="-static" </code></pre> <p>Once you build with these flags enabled, you will likely get lots of warnings about "renaming because library isn't present". This means that you have not configured <code>Modules/Setup</code> correctly and need to:</p> <p>a) add a single line (near the top) like this:</p> <pre><code>*static* </code></pre> <p>(that's asterisk/star the word "static" and asterisk with no spaces)</p> <p>b) uncomment all modules that you want to be available statically (such as math, array, etc...)</p> <p>You may also need to add specific linker flags (as mentioned in the link I posted above). My experience so far has been that the libraries are working without modification.</p> <p>It may also be helpful to run make with as follows:</p> <pre><code>make 2&gt;&amp;1 | grep 'renaming' </code></pre> <p>This will show all modules that are failing to compile due to being statically linked.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload