indygreg / python-build-standalone

Produce redistributable builds of Python
Mozilla Public License 2.0
1.99k stars 127 forks source link

Build fail: FileNotFoundError: build/gcc-10.3.0-linux64.tar #90

Closed yzouad-christ closed 2 years ago

yzouad-christ commented 3 years ago

Hello, I'm trying to build a standalone python for armv7. Build fails with FileNotFoundError. Is there a solution for that?

clang> copying /home/user/python-build-standalone/build/binutils-2.36.1-linux64.tar to container:/build/binutils-2.36.1-linux64.tar
Traceback (most recent call last):
  File "/home/user/python-build-standalone/cpython-unix/build.py", line 1193, in <module>
    sys.exit(main())
  File "/home/user/python-build-standalone/cpython-unix/build.py", line 1009, in main
    host_platform=host_platform,
  File "/home/user/python-build-standalone/cpython-unix/build.py", line 358, in build_clang
    build_env.install_toolchain(BUILD, host_platform, binutils=binutils, gcc=gcc)
  File "/home/user/python-build-standalone/pythonbuild/buildenv.py", line 77, in install_toolchain
    self.install_toolchain_archive(build_dir, "gcc", host_platform)
  File "/home/user/python-build-standalone/pythonbuild/buildenv.py", line 45, in install_toolchain_archive
    self.copy_file(p)
  File "/home/user/python-build-standalone/pythonbuild/buildenv.py", line 38, in copy_file
    copy_file_to_container(source, self.container, dest_path, dest_name)
  File "/home/user/python-build-standalone/pythonbuild/docker.py", line 97, in copy_file_to_container
    tf.add(str(path), dest_path)
  File "/usr/lib/python3.6/tarfile.py", line 1938, in add
    tarinfo = self.gettarinfo(name, arcname)
  File "/usr/lib/python3.6/tarfile.py", line 1807, in gettarinfo
    statres = os.lstat(name)
FileNotFoundError: [Errno 2] No such file or directory: '/home/user/python-build-standalone/build/gcc-10.3.0-linux64.tar'
Makefile:97: recipe for target '/home/user/python-build-standalone/build/clang-12.0.1-linux64.tar' failed
make: *** [/home/user/python-build-standalone/build/clang-12.0.1-linux64.tar] Error 1
indygreg commented 3 years ago

This bug implies a missing dependency in the Makefile. How did you reproduce this?

yzouad-christ commented 3 years ago

I have cloned the repository and executed the command from the documentation: ./build-linux.py --target armv7-unknown-linux-gnueabihf I'm using Ubuntu 18.04 as host system

yzouad-christ commented 2 years ago

@indygreg how can I fix this? I have tried on a different system and got the same error.

yzouad-christ commented 2 years ago

Manual download of clang and gcc into the build/ directory solved the problem. I also ran into timeout errors while downloading via ftp -> I have changed the urls in download.py like #96 and then it worked.