title: Failed to build bootloader for pyinstaller
body: <p>I tried to install pyinstaller on BBG with the latest image downloaded from beagleboard.org (Debian 9.5 2018-10-07 4GB SD IoT). After getting errors and suggested by building bootloader manually, I downloaded the pyinstaller 3.4 source and followed the instruction on the pyinstaller docs. I paste the error I extracted from config.log below. Does anyone have idea how to fixed this issue.</p>
  
  <p>I work on Raspberry Pi and BeagleBone quite often. Sometimes I can install pyinstaller simply by typing "pip install pyinstaller". Sometimes I fail and need to build the bootloader manually. I have no idea what actually cause the difference.</p>
  
  <blockquote>
    <p>Checking for library z
    ==></p>
    
    <p>int main(int argc, char **argv) {
            (void)argc; (void)argv;
            return 0;
    }</p>
    
    <p>&lt;==
    [1/2] Compiling build/.conf_check_c870da07392f02bfe0dd2ca05dee71ef/test.c</p>
    
    <p>['/usr/bin/gcc', '-O2', '-Wdeclaration-after-statement', '-Wimplicit-function-declaration', '-Werror', '-U_FORTIFY_SOURCE', '-D_REENTRANT', '-D_BSD_SOURCE', '-D_DEFAULT_SOURCE', '-D_FORTIFY_SOURCE=2', '../test.c', '-c', '-o/home/est/pyinstaller-3.4/bootloader/build/.conf_check_c870da07392f02bfe0dd2ca05dee71ef/testbuild/test.c.1.o']
    [2/2] Linking build/.conf_check_c870da07392f02bfe0dd2ca05dee71ef/testbuild/testprog</p>
    
    <p>['/usr/bin/gcc', 'test.c.1.o', '-o/home/est/pyinstaller-3.4/bootloader/build/.conf_check_c870da07392f02bfe0dd2ca05dee71ef/testbuild/testprog', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-lz']
    err: /usr/bin/ld: cannot find -lz
    collect2: error: ld returned 1 exit status</p>
    
    <p>from /home/est/pyinstaller-3.4/bootloader: Test does not build: Traceback (most recent call last):
      File "/home/est/pyinstaller-3.4/bootloader/.waf3-2.0.9-6b5f17f340ec613b295ffa3dedcecc80/waflib/Configure.py", line 324, in run_build
        bld.compile()
      File "/home/est/pyinstaller-3.4/bootloader/.waf3-2.0.9-6b5f17f340ec613b295ffa3dedcecc80/waflib/Build.py", line 176, in compile
        raise Errors.BuildError(self.producer.error)
    waflib.Errors.BuildError: Build failed
     -> task in 'testprog' failed with exit status 1 (run with -v to display more information)</p>
    
    <p>not found
    from /home/est/pyinstaller-3.4/bootloader: The configuration failed</p>
  </blockquote>