月度归档:2018年01月

编译static的Python及自带的相关module

非 static 编译

不指定额外参数直接编译 Python:

$ ./configure
$ make

查看所依赖的共享库:

$ ldd python
    linux-vdso.so.1 =>  (0x00007fffcd95a000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fab5c350000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fab5c140000)
    libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007fab5bf20000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fab5bc10000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fab5b840000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fab5c600000)

static 编译