jamesadevine / pldi-artifact-evaluation

0 stars 0 forks source link

Error building docker image #5

Closed humanapp closed 8 months ago

humanapp commented 8 months ago

Following the README instructions, I get an error when attempting the build the docker image.

command: docker build -t pldi_ae_container . error: ERROR [23/24] RUN cd /jacdac-msr-modules && make drop

full docker output:

pldi-artifact-evaluation on ξ‚  main [?] via 🐳 desktop-linux on ☁️  (us-east-1) 
❯ docker build -t pldi_ae_container .
[+] Building 3.5s (27/28)                                                                                    docker:desktop-linux
 => [internal] load build definition from Dockerfile                                                                         0.0s
 => => transferring dockerfile: 1.52kB                                                                                       0.0s
 => [internal] load metadata for docker.io/library/ubuntu:22.04                                                              0.7s
 => [internal] load .dockerignore                                                                                            0.0s
 => => transferring context: 2B                                                                                              0.0s
 => [ 1/24] FROM docker.io/library/ubuntu:22.04@sha256:77906da86b60585ce12215807090eb327e7386c8fafb5402369e421f44eff17e      0.0s
 => [internal] load build context                                                                                            0.0s
 => => transferring context: 85B                                                                                             0.0s
 => CACHED [ 2/24] RUN apt update                                                                                            0.0s
 => CACHED [ 3/24] RUN ln -snf /usr/share/zoneinfo/Europe /etc/localtime && echo Europe > /etc/timezone                      0.0s
 => CACHED [ 4/24] RUN apt install -y git wget curl build-essential libdbus-glib-1-dev libgirepository1.0-dev cmake udev ne  0.0s
 => CACHED [ 5/24] ADD scripts/install-gcc-arm-none-eabi.sh /install-gcc-arm-none-eabi.sh                                    0.0s
 => CACHED [ 6/24] RUN chmod u+x /install-gcc-arm-none-eabi.sh                                                               0.0s
 => CACHED [ 7/24] RUN /install-gcc-arm-none-eabi.sh                                                                         0.0s
 => CACHED [ 8/24] RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash                       0.0s
 => CACHED [ 9/24] RUN . "/root/.nvm/nvm.sh" && nvm install 14.17.0                                                          0.0s
 => CACHED [10/24] RUN . "/root/.nvm/nvm.sh" && nvm use v14.17.0                                                             0.0s
 => CACHED [11/24] RUN . "/root/.nvm/nvm.sh" && nvm alias default v14.17.0                                                   0.0s
 => CACHED [12/24] RUN node --version                                                                                        0.0s
 => CACHED [13/24] RUN npm --version                                                                                         0.0s
 => CACHED [14/24] RUN npm install -g yarn makecode                                                                          0.0s
 => CACHED [15/24] RUN git clone https://github.com/microsoft/pxt-jacdac --branch v1.9.25 --recursive                        0.0s
 => CACHED [16/24] RUN git clone https://github.com/tballmsft/jacdacnitelite --branch pldi24 --recursive                     0.0s
 => CACHED [17/24] RUN git clone https://github.com/microsoft/jacdac-msr-modules --branch pldi24 --recursive                 0.0s
 => CACHED [18/24] RUN mkdir /artifacts                                                                                      0.0s
 => CACHED [19/24] RUN cd /pxt-jacdac/tools/microbit-jukebox && makecode build                                               0.0s
 => CACHED [20/24] RUN cp /pxt-jacdac/tools/microbit-jukebox/built/binary.hex /artifacts/microbit-jukebox.hex                0.0s
 => CACHED [21/24] RUN cd /jacdacnitelite && makecode build                                                                  0.0s
 => CACHED [22/24] RUN cp /jacdacnitelite/built/binary.hex /artifacts/nightlight.hex                                         0.0s
 => ERROR [23/24] RUN cd /jacdac-msr-modules && make drop                                                                    2.7s
------                                                                                                                            
 > [23/24] RUN cd /jacdac-msr-modules && make drop:                                                                               
0.136 make TARGET=lora-e5-88-4.0                                                                                                  
0.136 make[1]: Entering directory '/jacdac-msr-modules'
2.692 echo 'const char app_fw_version[] = "v0.20.3-26-g7f2a104";' > built/lora-e5-88-4.0/version-tmp.c
2.694 refresh version
2.695 make -j8 build
2.695 make[2]: Entering directory '/jacdac-msr-modules'
2.710 CC targets/lora-e5-88-4.0/profile/base.c
2.711 CC jacdac-c/source/jd_bqueue.c
2.711 CC jacdac-c/source/jd_control.c
2.711 /bin/sh: 1: arm-none-eabi-gcc: not found
2.711 make[2]: *** [jacdac-stm32x0/build.mk:281: built/lora-e5-88-4.0/app/jd/prof-base.o] Error 127
2.711 make[2]: *** Waiting for unfinished jobs....
2.711 /bin/sh: 1: arm-none-eabi-gcc: not found
2.711 make[2]: *** [jacdac-stm32x0/build.mk:235: built/lora-e5-88-4.0/app/jacdac-c/source/jd_bqueue.o] Error 127
2.712 /bin/sh: 1: arm-none-eabi-gcc: not found
2.712 make[2]: *** [jacdac-stm32x0/build.mk:235: built/lora-e5-88-4.0/app/jacdac-c/source/jd_control.o] Error 127
2.712 make[2]: Leaving directory '/jacdac-msr-modules'
2.712 make[1]: *** [jacdac-stm32x0/build.mk:163: all] Error 2
2.712 make[1]: Leaving directory '/jacdac-msr-modules'
2.712 make: *** [jacdac-stm32x0/build.mk:350: nobl-targ-lora-e5-88-4.0] Error 2
------
Dockerfile:30
--------------------
  28 |     RUN cd /jacdacnitelite && makecode build
  29 |     RUN cp /jacdacnitelite/built/binary.hex /artifacts/nightlight.hex
  30 | >>> RUN cd /jacdac-msr-modules && make drop
  31 |     RUN cd /jacdac-msr-modules && ./pldi24.sh >> /artifacts/firmware-sizes.txt
  32 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c cd /jacdac-msr-modules && make drop" did not complete successfully: exit code: 2

View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/l1ou7tebwmqv5mok5fxyjndf4

Device: MacBook Pro OS: macOS Sonoma 14.1.2 Shell: zsh Docker: 4.27.1

humanapp commented 8 months ago

(This is @eanders-ms from alt acct).

humanapp commented 8 months ago

Attempt to run the cd /jacdac-msr-modules && make drop command inside the container yields:

root@93571f0f9681:/# cd /jacdac-msr-modules && make drop
make TARGET=lora-e5-88-4.0
make[1]: Entering directory '/jacdac-msr-modules'
echo 'const char app_fw_version[] = "v0.20.3-26-g7f2a104";' > built/lora-e5-88-4.0/version-tmp.c
make -j8 build
make[2]: Entering directory '/jacdac-msr-modules'
CC targets/lora-e5-88-4.0/profile/base.c
CC jacdac-c/source/jd_bqueue.c
/bin/sh: 1: arm-none-eabi-gcc: not found
CC jacdac-c/source/jd_control.c
make[2]: *** [jacdac-stm32x0/build.mk:281: built/lora-e5-88-4.0/app/jd/prof-base.o] Error 127
make[2]: *** Waiting for unfinished jobs....
/bin/sh: 1: arm-none-eabi-gcc: not found
CC jacdac-c/source/jd_io.c
make[2]: *** [jacdac-stm32x0/build.mk:235: built/lora-e5-88-4.0/app/jacdac-c/source/jd_bqueue.o] Error 127
/bin/sh: 1: arm-none-eabi-gcc: not found
/bin/sh: 1: arm-none-eabi-gcc: not found
make[2]: *** [jacdac-stm32x0/build.mk:235: built/lora-e5-88-4.0/app/jacdac-c/source/jd_control.o] Error 127
make[2]: *** [jacdac-stm32x0/build.mk:235: built/lora-e5-88-4.0/app/jacdac-c/source/jd_io.o] Error 127
make[2]: Leaving directory '/jacdac-msr-modules'
make[1]: *** [jacdac-stm32x0/build.mk:163: all] Error 2
make[1]: Leaving directory '/jacdac-msr-modules'
make: *** [jacdac-stm32x0/build.mk:350: nobl-targ-lora-e5-88-4.0] Error 2
root@93571f0f9681:/jacdac-msr-modules# 
jamesadevine commented 8 months ago

It’s weird - I got this precisely once, later runs worked fine. Building without the cache, I am also unable to repro this

Sent from Outlook for iOShttps://aka.ms/o0ukef


From: Eric Anderson @.> Sent: Sunday, March 10, 2024 5:27:09 AM To: jamesadevine/pldi-artifact-evaluation @.> Cc: Subscribed @.***> Subject: Re: [jamesadevine/pldi-artifact-evaluation] Error building docker image (Issue #5)

Attempt to run the cd /jacdac-msr-modules && make drop command inside the container yields:

@.:/# cd /jacdac-msr-modules && make drop make TARGET=lora-e5-88-4.0 make[1]: Entering directory '/jacdac-msr-modules' echo 'const char app_fw_version[] = "v0.20.3-26-g7f2a104";' > built/lora-e5-88-4.0/version-tmp.c make -j8 build make[2]: Entering directory '/jacdac-msr-modules' CC targets/lora-e5-88-4.0/profile/base.c CC jacdac-c/source/jd_bqueue.c /bin/sh: 1: arm-none-eabi-gcc: not found CC jacdac-c/source/jd_control.c make[2]: [jacdac-stm32x0/build.mk:281: built/lora-e5-88-4.0/app/jd/prof-base.o] Error 127 make[2]: Waiting for unfinished jobs.... /bin/sh: 1: arm-none-eabi-gcc: not found CC jacdac-c/source/jd_io.c make[2]: [jacdac-stm32x0/build.mk:235: built/lora-e5-88-4.0/app/jacdac-c/source/jd_bqueue.o] Error 127 /bin/sh: 1: arm-none-eabi-gcc: not found /bin/sh: 1: arm-none-eabi-gcc: not found make[2]: [jacdac-stm32x0/build.mk:235: built/lora-e5-88-4.0/app/jacdac-c/source/jd_control.o] Error 127 make[2]: [jacdac-stm32x0/build.mk:235: built/lora-e5-88-4.0/app/jacdac-c/source/jd_io.o] Error 127 make[2]: Leaving directory '/jacdac-msr-modules' make[1]: [jacdac-stm32x0/build.mk:163: all] Error 2 make[1]: Leaving directory '/jacdac-msr-modules' make: [jacdac-stm32x0/build.mk:350: nobl-targ-lora-e5-88-4.0] Error 2 @.***:/jacdac-msr-modules#

β€” Reply to this email directly, view it on GitHubhttps://github.com/jamesadevine/pldi-artifact-evaluation/issues/5#issuecomment-1987096227 or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABEF4KJLDRAHJ5WTYQUTRTLYXPVK5BFKMF2HI4TJMJ2XIZLTSOBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDUOJ2WLJDOMFWWLLTXMF2GG2C7MFRXI2LWNF2HTAVFOZQWY5LFUVUXG43VMWSG4YLNMWVXI2DSMVQWIX3UPFYGLLDTOVRGUZLDORPXI6LQMWWES43TOVSUG33NNVSW45FGORXXA2LDOOJIFJDUPFYGLKTSMVYG643JORXXE6NFOZQWY5LFVE3TMOBXGQ3TIMBSQKSHI6LQMWSWS43TOVS2K5TBNR2WLKRSGE3TONBYGY3DSNVHORZGSZ3HMVZKMY3SMVQXIZI. You are receiving this email because you are subscribed to this thread.

Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

jamesadevine commented 8 months ago

@humanapp I have adjusted the build steps and added an action that verifies the build works.

tballmsft commented 8 months ago

What did you change @jamesadevine?

jamesadevine commented 8 months ago

Use dpkg instead of apt https://github.com/jamesadevine/pldi-artifact-evaluation/commit/254d7612fac835e919bd4098435aa16db5cc6ad2

doubt it makes a difference really...

jamesadevine commented 8 months ago

The CI uploads the docker image as an artifact now - you can use docker load once downloaded and un-gzipped.

humanapp commented 8 months ago

Still unable to build the docker image. It is failing on an earlier step now. Full output below.

pldi-artifact-evaluation on ξ‚  main via 🐳 desktop-linux on ☁️  (us-east-1) 
❯ docker build --no-cache -t pldi_ae_container .
[+] Building 501.2s (9/30)                                                                                   docker:desktop-linux
 => [internal] load build definition from Dockerfile                                                                         0.0s
 => => transferring dockerfile: 2.32kB                                                                                       0.0s
 => [internal] load metadata for docker.io/library/ubuntu:22.04                                                              0.5s
 => [internal] load .dockerignore                                                                                            0.0s
 => => transferring context: 2B                                                                                              0.0s
 => CACHED [ 1/26] FROM docker.io/library/ubuntu:22.04@sha256:77906da86b60585ce12215807090eb327e7386c8fafb5402369e421f44eff  0.0s
 => [internal] load build context                                                                                            0.0s
 => => transferring context: 85B                                                                                             0.0s
 => [ 2/26] RUN apt update                                                                                                 127.3s
 => [ 3/26] RUN ln -snf /usr/share/zoneinfo/Europe /etc/localtime && echo Europe > /etc/timezone                             0.2s
 => [ 4/26] RUN apt install -y git wget curl build-essential libdbus-glib-1-dev libgirepository1.0-dev cmake udev net-too  367.6s 
 => ERROR [ 5/26] RUN apt-get update && apt-get install gnupg wget -y &&   wget --quiet --output-document=- https://dl-ssl.  5.6s 
------                                                                                                                            
 > [ 5/26] RUN apt-get update && apt-get install gnupg wget -y &&   wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg &&   sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' &&   apt-get update &&   apt-get install google-chrome-stable -y --no-install-recommends &&   rm -rf /var/lib/apt/lists/*:                                                        
0.477 Hit:1 http://ports.ubuntu.com/ubuntu-ports jammy InRelease                                                                  
0.635 Hit:2 http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease
0.794 Hit:3 http://ports.ubuntu.com/ubuntu-ports jammy-backports InRelease
0.949 Hit:4 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease
0.996 Reading package lists...
1.477 Reading package lists...
1.907 Building dependency tree...
2.009 Reading state information...
2.123 wget is already the newest version (1.21.2-2ubuntu1).
2.123 gnupg is already the newest version (2.2.27-3ubuntu2.1).
2.123 gnupg set to manually installed.
2.123 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
3.940 Get:1 http://dl.google.com/linux/chrome/deb stable InRelease [1825 B]
4.025 Get:2 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1078 B]
4.114 Hit:3 http://ports.ubuntu.com/ubuntu-ports jammy InRelease
4.260 Hit:4 http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease
4.408 Hit:5 http://ports.ubuntu.com/ubuntu-ports jammy-backports InRelease
4.557 Hit:6 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease
4.607 Fetched 2903 B in 1s (3634 B/s)
4.607 Reading package lists...
5.066 Reading package lists...
5.485 Building dependency tree...
5.583 Reading state information...
5.587 E: Unable to locate package google-chrome-stable
------
Dockerfile:10
--------------------
   9 |     # Note: this installs the necessary libs to make the browser work with Puppeteer.
  10 | >>> RUN apt-get update && apt-get install gnupg wget -y && \
  11 | >>>   wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg && \
  12 | >>>   sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \
  13 | >>>   apt-get update && \
  14 | >>>   apt-get install google-chrome-stable -y --no-install-recommends && \
  15 | >>>   rm -rf /var/lib/apt/lists/*
  16 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get update && apt-get install gnupg wget -y &&   wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg &&   sh -c 'echo \"deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main\" >> /etc/apt/sources.list.d/google.list' &&   apt-get update &&   apt-get install google-chrome-stable -y --no-install-recommends &&   rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 100

View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/v6e7wdms5k1803dgdbbnsm0j6

pldi-artifact-evaluation on ξ‚  main via 🐳 desktop-linux on ☁️  (us-east-1) took 8m21s 
❯ 
jamesadevine commented 8 months ago

try again - i removed that step in latest commit

jamesadevine commented 8 months ago

This cross platform reproducible build technology is absolutely flawless!!!

humanapp commented 8 months ago

Here is the next error. Appears my system is defaulting to arm64 architecture. I will see if I can switch it.

pldi-artifact-evaluation on ξ‚  main via 🐳 desktop-linux on ☁️  (us-east-1) 
❯ docker build -t pldi_ae_container .
[+] Building 374.3s (11/29)                                                                                  docker:desktop-linux
 => [internal] load build definition from Dockerfile                                                                         0.0s
 => => transferring dockerfile: 1.73kB                                                                                       0.0s
 => [internal] load metadata for docker.io/library/ubuntu:22.04                                                              0.7s
 => [internal] load .dockerignore                                                                                            0.0s
 => => transferring context: 2B                                                                                              0.0s
 => [ 1/25] FROM docker.io/library/ubuntu:22.04@sha256:77906da86b60585ce12215807090eb327e7386c8fafb5402369e421f44eff17e      0.0s
 => [internal] load build context                                                                                            0.0s
 => => transferring context: 85B                                                                                             0.0s
 => CACHED [ 2/25] RUN apt update                                                                                            0.0s
 => CACHED [ 3/25] RUN ln -snf /usr/share/zoneinfo/Europe /etc/localtime && echo Europe > /etc/timezone                      0.0s
 => CACHED [ 4/25] RUN apt install -y git wget curl build-essential libdbus-glib-1-dev libgirepository1.0-dev cmake udev ne  0.0s
 => [ 5/25] ADD scripts/install-gcc-arm-none-eabi.sh /install-gcc-arm-none-eabi.sh                                           0.0s
 => [ 6/25] RUN chmod u+x /install-gcc-arm-none-eabi.sh                                                                      0.2s
 => ERROR [ 7/25] RUN /install-gcc-arm-none-eabi.sh                                                                        701.3s
------                                                                                                                            
 > [ 7/25] RUN /install-gcc-arm-none-eabi.sh:                                                                                     
0.303 + set -e                                                                                                                    
0.303 + VER=15:10.3-2021.10-9                                                                                                     
0.303 + URL=https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2                                                                                                                               
0.303 + echo Creating gcc-arm-none-eabi package version 15:10.3-2021.10-9
0.303 + echo Entering temporary directory...
0.303 + cd /tmp
0.304 Creating gcc-arm-none-eabi package version 15:10.3-2021.10-9
0.304 Entering temporary directory...
0.304 + echo Downloading...
0.304 + curl -fSL -A Mozilla/4.0 -o gcc-arm-none-eabi.tar https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2
0.304 Downloading...
0.327   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
0.327                                  Dload  Upload   Total   Spent    Left  Speed
100   252  100   252    0     0    180      0  0:00:01  0:00:01 --:--:--   180
100  149M  100  149M    0     0   832k      0  0:03:04  0:03:04 --:--:--  845k
512.5 + echo Extracting...
512.5 + tar -xf gcc-arm-none-eabi.tar
512.5 Extracting...
527.0 + rm gcc-arm-none-eabi.tar
527.1 + echo Generating package...
527.1 + mkdir gcc-arm-none-eabi
527.1 Generating package...
527.1 + mkdir gcc-arm-none-eabi/DEBIAN
527.1 + mkdir gcc-arm-none-eabi/usr
527.1 + echo Package: gcc-arm-none-eabi
527.1 + echo Version: 15:10.3-2021.10-9
527.1 + echo Architecture: amd64
527.1 + echo Maintainer: maintainer
527.1 + echo Description: Arm Embedded toolchain
527.1 + mv gcc-arm-none-eabi-10.3-2021.10/arm-none-eabi gcc-arm-none-eabi-10.3-2021.10/bin gcc-arm-none-eabi-10.3-2021.10/lib gcc-arm-none-eabi-10.3-2021.10/share gcc-arm-none-eabi/usr/
527.1 + dpkg-deb --build --root-owner-group gcc-arm-none-eabi
527.1 dpkg-deb: building package 'gcc-arm-none-eabi' in 'gcc-arm-none-eabi.deb'.
701.2 + echo Installing...
701.2 + dpkg -i ./gcc-arm-none-eabi.deb
701.2 Installing...
701.2 dpkg: error processing archive ./gcc-arm-none-eabi.deb (--install):
701.2  package architecture (amd64) does not match system (arm64)
701.3 Errors were encountered while processing:
701.3  ./gcc-arm-none-eabi.deb
------
Dockerfile:11
--------------------
   9 |     ADD scripts/install-gcc-arm-none-eabi.sh /install-gcc-arm-none-eabi.sh
  10 |     RUN chmod u+x /install-gcc-arm-none-eabi.sh
  11 | >>> RUN /install-gcc-arm-none-eabi.sh
  12 |     RUN arm-none-eabi-gcc --version
  13 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c /install-gcc-arm-none-eabi.sh" did not complete successfully: exit code: 1
humanapp commented 8 months ago

I was able to build the image after changing Dockerfile line 1 to this:

FROM --platform=linux/amd64 ubuntu:22.04
humanapp commented 8 months ago

Or, maybe specifying platform on the command line is preferred. Even though platform was indicated in the Dockerfile, I still get a warning if I don't specify platform when running it. Here are the modified commands that don't emit platform warnings:

docker build --platform linux/amd64 -t pldi_ae_container .

docker run --platform linux/amd64 -id --name=pldi-ae -t pldi_ae_container:latest
tballmsft commented 8 months ago

Thanks @humanapp - are you able to build image now?

eanders-ms commented 8 months ago

Yes, by specifying the platform I was able to build the image.