rshariffdeen / FixMorph

FixMorph is a morphing tool for C source codes which supports automated code-transfer
https://fixmorph.github.io
MIT License
31 stars 9 forks source link

Issue with Dockerfile #10

Closed RobotSail closed 9 months ago

RobotSail commented 10 months ago

Hi all,

It seems like there is a problem with the default Dockerfile where Ubuntu cannot find the python3.7 package:

$  docker build -f Dockerfile .
[+] Building 3.6s (9/32)                                                                  docker:default
 => [internal] load build definition from Dockerfile                                                0.0s
 => => transferring dockerfile: 3.08kB                                                              0.0s
 => [internal] load .dockerignore                                                                   0.0s
 => => transferring context: 179B                                                                   0.0s
 => [internal] load metadata for docker.io/library/ubuntu:16.04                                     0.3s
 => [ 1/29] FROM docker.io/library/ubuntu:16.04@sha256:1f1a2d56de1d604801a9671f301190704c25d604a41  0.0s
 => CACHED [ 2/29] RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y     aut  0.0s
 => CACHED [ 3/29] RUN add-apt-repository -y ppa:deadsnakes/ppa                                     0.0s
 => CACHED [ 4/29] RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key| apt-key add -          0.0s
 => CACHED [ 5/29] RUN apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-9  0.0s
 => ERROR [ 6/29] RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y  --no-in  3.2s
------                                                                                                   
 > [ 6/29] RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y  --no-install-recommends --force-yes     clang-9     python3.7     python3-pip     python3-setuptools:                         
0.274 Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease                                            
0.274 Hit:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease                                    
0.274 Hit:3 http://archive.ubuntu.com/ubuntu xenial-backports InRelease                                  
0.274 Hit:4 http://security.ubuntu.com/ubuntu xenial-security InRelease
0.387 Get:5 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial InRelease [18.1 kB]
1.266 Get:6 https://apt.llvm.org/xenial llvm-toolchain-xenial-9 InRelease [4234 B]
1.506 Get:7 https://apt.llvm.org/xenial llvm-toolchain-xenial-9/main amd64 Packages [8828 B]
1.528 Fetched 31.1 kB in 1s (23.2 kB/s)
1.528 Reading package lists...
2.283 Reading package lists...
2.995 Building dependency tree...
3.114 Reading state information...
3.158 E: Unable to locate package python3.7
3.158 E: Couldn't find any package by glob 'python3.7'
3.158 E: Couldn't find any package by regex 'python3.7'
------
Dockerfile:32
--------------------
  31 |     RUN apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main"
  32 | >>> RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y  --no-install-recommends --force-yes \
  33 | >>>     clang-9 \
  34 | >>>     python3.7 \
  35 | >>>     python3-pip \
  36 | >>>     python3-setuptools
  37 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y  --no-install-recommends --force-yes     clang-9     python3.7     python3-pip     python3-setuptools" did not complete successfully: exit code: 100
rshariffdeen commented 10 months ago

Hi @RobotSail Thanks for reporting the issue! It seems python3.7 is not installable via apt in ubuntu16, I will update the Dockerfile to build the python instead. In the meantime you can use the Dockerfile based on Ubuntu-20 to build the container

docker build -t fixmorph -f Dockerfile.20.04 .
rshariffdeen commented 9 months ago

Updated Dockerfile to use latest versions of llvm/clang/python/bear etc in commit d4fe1889416f54db54b775c754810e39b637a800