Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails on arm64 due to httptools pip package #23

Open
ghost opened this issue Nov 15, 2020 · 0 comments
Open

Build fails on arm64 due to httptools pip package #23

ghost opened this issue Nov 15, 2020 · 0 comments

Comments

@ghost
Copy link

ghost commented Nov 15, 2020

x64:

$ docker run --rm busybox uname -a
Linux 21232f7f703d 5.4.39-linuxkit #1 SMP TIMESTAMP x86_64 GNU/Linux
$ docker build --tag witnessme https://github.com/byt3bl33d3r/WitnessMe.git
[+] Building TIMEDURATION (13/13) FINISHED 

arm64:

$ docker run --rm busybox uname -a
Linux 790f4ba88c53 5.4.0-1022-raspi #25-Ubuntu SMP PREEMPT TIMESTAMP aarch64 GNU/Linux
$ docker build --tag witnessme https://github.com/byt3bl33d3r/WitnessMe.git
Building wheel for httptools (setup.py): started                                                      
  Building wheel for httptools (setup.py): finished with status 'error'                                 
  ERROR: Command errored out with exit status 1:                                                        
   command: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-i
nstall-tabquj4g/httptools/setup.py'"'"'; __file__='"'"'/tmp/pip-install-tabquj4g/httptools/setup.py'"'"'
;f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"')
;f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-ijz37d6j        
       cwd: /tmp/pip-install-tabquj4g/httptools/                                                        
  Complete output (30 lines):                     
....etc....
The command '/bin/sh -c pip3 install -r requirements.txt' returned a non-zero code: 1

Most probable cause is tagging a binary blob for a specific architecture. In this case, it appears there is a problem with your upstream httptools pip package not having a prebuilt wheel for this architecture, and your base docker image does not have the required build tools.

x64:

$ docker run -it --rm python:3.8-slim bash
pip3 install httptools==0.1.1
Collecting httptools==0.1.1
  Downloading httptools-0.1.1-cp38-cp38-manylinux1_x86_64.whl (227 kB)
     |████████████████████████████████| 227 kB 3.3 MB/s 
Installing collected packages: httptools
Successfully installed httptools-0.1.1

arm64:

$ docker run -it --rm python:3.8-slim bash
pip3 install httptools==0.1.1                                                      
Collecting httptools==0.1.1                                                                             
  Downloading httptools-0.1.1.tar.gz (106 kB)                                                           
     |████████████████████████████████| 106 kB 1.6 MB/s                                                 
Building wheels for collected packages: httptools                                                       
  Building wheel for httptools (setup.py) ... error 
  ERROR: Command errored out with exit status 1:  

This pip package installs correctly using the full-size base image instead of slim:

arm64:

docker run -it --rm python:3.8 bash
pip3 install httptools==0.1.1  
Collecting httptools==0.1.1
  Downloading httptools-0.1.1.tar.gz (106 kB)
     |████████████████████████████████| 106 kB 2.1 MB/s 
Building wheels for collected packages: httptools
  Building wheel for httptools (setup.py) ... done
  Created wheel for httptools: filename=httptools-0.1.1-cp38-cp38-linux_aarch64.whl size=278614 sha256=c9035d9d96782c9b8e55aa09decf4c30bb7d57497717deb2a5d78ae0087adff0
  Stored in directory: /root/.cache/pip/wheels/16/d9/1d/1cc7690d9e6ef93fcaed984a4f46cedd1d55e8ba03c1ccc48f
Successfully built httptools
Installing collected packages: httptools
Successfully installed httptools-0.1.1

Forking the repo and only changing the docker base image to be python:3.8 instead of python:3.8-slim: master...kairzha:master

arm64:

docker build --tag witnessmek https://github.com/kairzha/WitnessMe.git
Successfully tagged witnessmek:latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants