← Back to context

Comment by svenklemm

8 years ago

Does nuitka build a static executable or do you still need to supply shared libraries with the executable?

It builds a static executable if you pass it the --standalone option.

  • No, it doesn't.

      $ echo 'print "Hello world"' > hello.py
      $ nuitka --standalone hello.py 
      $ ldd hello.dist/hello.exe
      	linux-gate.so.1 (0xf7f94000)
      	libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf7895000)
      	libpython2.7.so.1.0 => /home/jwilk/hello.dist/libpython2.7.so.1.0 (0xf7508000)
      	libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf732f000)
      	/lib/ld-linux.so.2 (0xf7f96000)
      	libz.so.1 => /home/jwilk/hello.dist/libz.so.1 (0xf7310000)
      	libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf72f1000)
      	libutil.so.1 => /home/jwilk/hello.dist/libutil.so.1 (0xf72ed000)
      	libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf71eb000)

    • Ok, it buids a static executable against the python runtime and extensions, including the c ones. It doesn't against libc, lubutil, etc. But aren't those almost always installed ?

      If it's a real problem on your machines, it's PR time !