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

[bug] Docker image GCC 11 requires binutils 2.36 #367

Closed
uilianries opened this issue Feb 1, 2022 · 8 comments · Fixed by #370
Closed

[bug] Docker image GCC 11 requires binutils 2.36 #367

uilianries opened this issue Feb 1, 2022 · 8 comments · Fixed by #370

Comments

@uilianries
Copy link
Member

uilianries commented Feb 1, 2022

Description of Problem, Request, or Question

Related to conan-io/conan-center-index#9164

@SSE4 found that we need to update binutils. Unfortunately, it's possible to update from official apt repository, so we will need to find an external PPA or, as last option, build from sources.

Environment Details

  • Conan Docker Tools image: conanio/gcc7:1.13.1
  • Operating System: Linux
  • Operation System Version: Ubuntu 16.04
  • Python version (If you are building some image): python 3.7.0

Steps to reproduce (Include if Applicable)

Build logs (Include if Available)

@SSE4
Copy link
Contributor

SSE4 commented Feb 1, 2022

the right link is conan-io/conan-center-index#9164

@uilianries
Copy link
Member Author

the right link is conan-io/conan-center-index#9164

fixed

@uilianries
Copy link
Member Author

The situation is not good. Binutils 2.36 is from 1 year ago (2021) and is not available on official Ubuntu repository.

Searching on Launchpad, I didn't find an updated version compatible to Ubuntu Focal (20.04). You can take a look here: https://launchpad.net/ubuntu/+ppas?name_filter=binutils

We have few options:

  • We can build from sources, during the Image construction
    • Takes more time to build the image every time
    • We already build from source other projects due compatibility
    • It will replace the original Binutils package, causing a fragile situation with APT, the package manager won't know about.
  • Or, we can build from source, package it as .deb, and upload to Artifactory. Then, when creating the image, install from there.
    • Requires extra development
    • It will keep a faster image build time
    • APT will know about the version installed, avoiding any override

@SSE4
Copy link
Contributor

SSE4 commented Feb 1, 2022

okay, I think before further research on how to install it, we need to check if it helps, so let's build it once from source and try to build tbb. then, if issue disappears after binutils upgrade, we can decide to create .deb or use build from source.

@jgsogo
Copy link
Contributor

jgsogo commented Feb 2, 2022

conan-io/conan-center-index#8958 Maybe this helps for the POC

@uilianries
Copy link
Member Author

@jgsogo good catch! Thank you!

@jgsogo
Copy link
Contributor

jgsogo commented Feb 2, 2022

So, upgrading binutils fixes the issue? Is it a solution we might consider?

And some more general questions:

  • I suppose we should use this same version in all dockers, right? gcc, clang,... modern ones
  • Why binutils/2.36?
  • What is the policy to keep this application updated? Is there a binutils version that matches the compiler version?

@uilianries
Copy link
Member Author

So, upgrading binutils fixes the issue?

Yes.

Is it a solution we might consider?

Yes. As we are running conanio/gcc11-ubuntu16.04, the binutils is older (2.26.1), the update is a good move.

I suppose we should use this same version in all dockers, right? gcc, clang,... modern ones

Right, that PR that I'm doing, it installs binutils/2.37 (latest) from Conan on Base image

Why binutils/2.36?

The important thing is supporting tpause, but the latest 2.37 is better. Also, reading linux from scratch website, they simplified 2.37 build steps a lot, compared to older versions.

What is the policy to keep this application updated? Is there a binutils version that matches the compiler version?

Good question, binutils is GNU project, but they don't release together. However, GCC manual shows some features which require binutils at some minimal version. https://gcc.gnu.org/onlinedocs/gcc-10.3.0/gcc.pdf. However, they don't ask for latest version.

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

Successfully merging a pull request may close this issue.

3 participants