Oliver
Oliver

Reputation: 65

Failed to build bootloader for pyinstaller

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.

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.

Checking for library z ==>

int main(int argc, char **argv) { (void)argc; (void)argv; return 0; }

<== [1/2] Compiling build/.conf_check_c870da07392f02bfe0dd2ca05dee71ef/test.c

['/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

['/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

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)

not found from /home/est/pyinstaller-3.4/bootloader: The configuration failed

Upvotes: 0

Views: 2082

Answers (1)

Oliver
Oliver

Reputation: 65

I think I fixed it. For some reasons I missed "library z" in my system. Reinstall it and then I can reinstall pyinstaller normally. Sorry for wasting your time reading this question.

sudo apt-get install zlib1g-dev
pip3 install pyinstaller

Upvotes: 1

Related Questions