ort icon indicating copy to clipboard operation
ort copied to clipboard

"TLS/SSL connection has been closed" during Docker build on Apple M1

Open lucasgonze opened this issue 3 years ago • 6 comments

Summary: scripts/docker_build.sh throws this error:

#9 50.63 Reading state information...
#9 50.68 E: Unable to locate package lib32stdc++6
#9 50.68 E: Couldn't find any package by regex 'lib32stdc++6'
#9 50.68 E: Unable to locate package sbt
------
executor failed running [/bin/sh -c apt-get update &&     apt-get install -y --no-install-recommends ca-certificates gnupg software-properties-common &&     echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | tee -a /etc/apt/sources.list.d/sbt.list &&     curl -ksS "https://keyserver.ubuntu.com/pks/lookup?op=get&options=mr&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | apt-key adv --import - &&     curl -sL https://deb.nodesource.com/setup_16.x | bash - &&     add-apt-repository -y ppa:git-core/ppa &&     apt-get update &&     apt-get install -y --no-install-recommends         lib32stdc++6         libffi-dev         libgmp-dev         libxext6         libxi6         libxrender1         libxtst6         make         netbase         openssh-client         unzip         xz-utils         zlib1g-dev         cvs         git         mercurial         subversion         cargo=$CARGO_VERSION         composer=$COMPOSER_VERSION         nodejs         python-is-python3         python-setuptools         python2-dev         python3-dev         python3-pip         python3-setuptools         ruby-dev         sbt=$SBT_VERSION     &&     rm -rf /var/lib/apt/lists/*]: exit code: 100

Platform:

  • MacOS 11.6
  • M1 2020

Requirements status: requirements-log.txt

Runtime log: ort-log.txt

lucasgonze avatar Sep 20 '22 23:09 lucasgonze

Probably related to https://github.com/oss-review-toolkit/ort/issues/5411 which was (hopefully) addressed by https://github.com/oss-review-toolkit/ort/pull/5832 that was just merged 10 hours ago. Have you tried a version of ORT with that PR included?

sschuberth avatar Sep 21 '22 06:09 sschuberth

Thanks for this suggestion. fetch and rebase made the earlier issue go away. There is now a different failure in the build process. Log: log2.txt

Highlight of the log:

#0 153.5 ## Run `sudo apt-get install -y nodejs` to install Node.js 16.x and npm
#0 153.5 ## You may also need development tools to build native addons:
#0 153.5      sudo apt-get install gcc g++ make
#0 153.5 ## To install the Yarn package manager, run:
#0 153.5      curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
#0 153.5      echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
#0 153.5      sudo apt-get update && sudo apt-get install yarn

Notes:

  • Just before running the above command I did nvm use 16
  • yarn is already installed

lucasgonze avatar Sep 21 '22 21:09 lucasgonze

Highlight of the log:

I believe that's not the crucial part, but

#0 172.3 Traceback (most recent call last):
#0 172.3   File "/usr/bin/add-apt-repository", line 364, in <module>
#0 172.3     sys.exit(0 if addaptrepo.main() else 1)
...
#0 172.3 ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:997)

So maybe just network flakyness? Anyway, hard to debug without an M1. For the fun of it you could try to omit the line add-apt-repository -y ppa:git-core/ppa.

sschuberth avatar Sep 22 '22 06:09 sschuberth

Anyway, hard to debug without an M1.

Maybe @MarcelBochtler can help here.

sschuberth avatar Sep 22 '22 06:09 sschuberth

@MarcelBochtler @lucasgonze can you help to find out the current status of building the Docker image on Apple Mx?

sschuberth avatar Feb 15 '24 16:02 sschuberth

I got similar failure today on multiarch local build in a Mac M1. Honestly something is playing very weirdly since 15.0.0 and I don't t think is direct ort issue, but some transient dependency. I will keep running some tests tomorrow, but my current guess is that the fault is on docker side I have both M1 and M2 around to test.

heliocastro avatar Feb 15 '24 20:02 heliocastro

There was no feedback for this issue in a while, and @lancedikson confirmed on Slack that it's working for him, so I'm closing this. Feel free to reopen if the issue persists.

sschuberth avatar May 15 '24 11:05 sschuberth