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

ci: use ubuntu-20.04 for the Linux build #1983

Merged
merged 2 commits into from
Apr 13, 2023
Merged

Conversation

kittaakos
Copy link
Contributor

@kittaakos kittaakos commented Mar 29, 2023

Motivation

The Linux build does not start occasionally, and GH Actions reports a canceled build. Also, the Linux container used by the IDE2 build is deprecated:

The ubuntu-18.04 environment is deprecated, consider switching to ubuntu-20.04(ubuntu-latest), or ubuntu-22.04 instead. For more details see actions/runner-images#6002

Change description

Use ubuntu-20.04 on the CI.

Other information

Reviewer checklist

  • PR addresses a single concern.
  • The PR has no duplicates (please search among the Pull Requests before creating one)
  • PR title and description are properly filled.
  • Docs have been added / updated (for bug fixes / features)

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
@kittaakos kittaakos added type: enhancement Proposed improvement topic: infrastructure Related to project infrastructure labels Mar 29, 2023
@kittaakos kittaakos self-assigned this Mar 29, 2023
@per1234 per1234 added the os: linux Specific to Linux operating system label Mar 30, 2023
@kittaakos
Copy link
Contributor Author

kittaakos commented Apr 6, 2023

On a brand new Ubuntu 18.04, I get the following error at startup:

Error: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /home/akitta/Downloads/arduino-ide_2.0.5-snapshot-90b1f67_Linux_64bit/resources/app/node_modules/nsfw/build/Release/nsfw.node)
    at process.func [as dlopen] (node:electron/js2c/asar_bundle:5:1800)
    at Object.Module._extensions..node (node:internal/modules/cjs/loader:1170:18)
    at Object.func [as .node] (node:electron/js2c/asar_bundle:5:1800)
    at Module.load (node:internal/modules/cjs/loader:982:32)
    at Module._load (node:internal/modules/cjs/loader:823:12)
    at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
    at Module.require (node:internal/modules/cjs/loader:1006:19)
    at require (node:internal/modules/cjs/helpers:93:18)
    at Object.<anonymous> (/home/akitta/Downloads/arduino-ide_2.0.5-snapshot-90b1f67_Linux_64bit/resources/app/node_modules/nsfw/js/src/index.js:4:14)
    at Module._compile (node:internal/modules/cjs/loader:1110:14) {
  code: 'ERR_DLOPEN_FAILED'
}

It works with 2.0.4.

@kittaakos
Copy link
Contributor Author

/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /home/akitta/Downloads/arduino-ide_2.0.5-snapshot-90b1f67_Linux_64bit/resources/app/node_modules/nsfw/build/Release/nsfw.node)

Probably related: Axosoft/nsfw#175

@per1234
Copy link
Contributor

per1234 commented Apr 6, 2023

related: Axosoft/nsfw#175

That is similar, but different in that it is specific to the use of a Snapcraft package. Their distro has a modern version of GLibC installed (2.35), which is backwards compatible with the 2.33 the application is linked against, however, it seems the application is linked against a GLibC library in the Snap environment instead of the global installation in the distro.

The error you encountered when trying to start the build of Arduino IDE from this PR on a Ubuntu 18.04 machine is that it has an older version of GLibC (2.27) than the one Arduino IDE is linked against when build using the ubuntu-latest runner. The older versions of GLibC are not forwards compatible with applications that are linked against a newer version.

I didn't manage to find a way for the users to work around this problem by reconfiguring their system. So it seems we have two options:

  • Drop compatibility with Linux distros that don't provide a compatible GLibC
  • Change the build environment to link against an older version

Although unfortunate, I don't think it is completely unreasonable to drop support for Ubuntu 18.04 since its maintenance cycle is about to end. However, I see the error also occurs with 20.04. I think dropping compatibility with such relatively recent distro releases will impact a significant number of users.

.github/workflows/build.yml Outdated Show resolved Hide resolved
Co-authored-by: per1234 <accounts@perglass.com>
Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fc0cc54 restores compatibility with Ubuntu 20.04 as expected (retaining compatibility with Ubuntu 22.04 etc. due to the backwards compatibility of GLibC). However (as expected), the problem remains for Ubuntu 18.04 (and other Linux distros with an older version of GLibC):

Error: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /tmp/.mount_arduinLHEbAx/resources/app/node_modules/nsfw/build/Release/nsfw.node)
    at process.func [as dlopen] (node:electron/js2c/asar_bundle:5:1800)
    at Object.Module._extensions..node (node:internal/modules/cjs/loader:1170:18)
    at Object.func [as .node] (node:electron/js2c/asar_bundle:5:1800)
    at Module.load (node:internal/modules/cjs/loader:982:32)
    at Module._load (node:internal/modules/cjs/loader:823:12)
    at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
    at Module.require (node:internal/modules/cjs/loader:1006:19)
    at require (node:internal/modules/cjs/helpers:93:18)
    at Object.<anonymous> (/tmp/.mount_arduinLHEbAx/resources/app/node_modules/nsfw/js/src/index.js:4:14)
    at Module._compile (node:internal/modules/cjs/loader:1110:14) {
  code: 'ERR_DLOPEN_FAILED'
}

@kittaakos
Copy link
Contributor Author

We'll need to decide how to move forward. Thanks for the help!


When this PR gets merged, users won't be able to run IDE2 on Ubuntu 18.04 (or earlier).

@ubidefeo, as a follow-up, could you please create a pinned issue and describe the implication of this change?

@kittaakos kittaakos changed the title ci: use ubuntu-latest for the Linux build ci: use ubuntu-20.04 for the Linux build Apr 13, 2023
@kittaakos kittaakos requested a review from per1234 April 13, 2023 08:03
Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Akos!

I think the use of ubuntu-20.04 is the best available immediate solution.

My hypothesis is that only a small number of the beta testers will be impacted by the loss of compatibility of the tester and nightly builds with older Linux versions (e.g., Ubuntu 18.04) since that category of user is more likely to keep their system reasonably up to date.

And of course even if this change results in tester builds being temporarily unavailable to some beta testers, that is still an improvement over the current situation where tester builds aren't available to anyone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os: linux Specific to Linux operating system topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants