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

Fixes for ARM 32/64 #49

Merged
merged 22 commits into from
Jun 17, 2020
Merged

Fixes for ARM 32/64 #49

merged 22 commits into from
Jun 17, 2020

Conversation

julien-lebot
Copy link
Contributor

This PR introduces a couple of fixes for ARM32/64:

  • Conditionally set GIMME_ARCH so that go builds don't fail on 64 bit ARM builds
  • Update entrypoint.sh to use GIMME_ARCH for ARM builds so that eval "$(gimme)" finds the correct go binary folder
  • Use fakearmv7l LD_PRELOAD library to patch uname at runtime to return architecture armv7l for RPM 32 bit build

Copy link
Member

@mx-psi mx-psi left a comment

Choose a reason for hiding this comment

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

LGTM, just a typo

rpm-arm/Dockerfile Outdated Show resolved Hide resolved
@julien-lebot julien-lebot force-pushed the julien.lebot/fix_arm64 branch from a852151 to ff9a575 Compare June 16, 2020 09:31
Copy link
Member

@mx-psi mx-psi left a comment

Choose a reason for hiding this comment

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

LGTM, left a couple of nits but feel free to ignore them

rpm-arm/Dockerfile Outdated Show resolved Hide resolved
BASE_IMAGE: arm64v8/centos:7
BASE_IMAGE: amazonlinux:2.0.20181114
Copy link
Member

Choose a reason for hiding this comment

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

Why did we change the base image? (just for future reference)

Copy link
Contributor Author

@julien-lebot julien-lebot Jun 17, 2020

Choose a reason for hiding this comment

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

Initially it was amazonlinux, see #21. Amazon Linux however, doesn't provide 32 bit versions of their image, so we switched to CentOS 7 (which is what Amazon Linux is supposed to be based on I think). However, CentOS 7 is quite old and ships with GCC 4.8.5 - which causes issues when trying to build rtloader.
Hence we had two options:

  • Install a newer GCC on CentOS 7
  • Revert to the Amazon Linux image for 64 bit builds

We chose the latter because we don't build rtloader for 32 bit ARM, so it's simpler to revert to the 'known to work' image.

Comment on lines +35 to +36
RUN curl "https://bootstrap.pypa.io/get-pip.py" | python2.7 - pip==${DD_PIP_VERSION} setuptools==${DD_SETUPTOOLS_VERSION}
RUN pip install invoke distro==1.4.0 awscli==1.16.240
Copy link
Member

Choose a reason for hiding this comment

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

Could we use Python 3 here? Base image doesn't have it so it needs to be installed. Not a blocker but it would useful if we ever need a Python 3 only package.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, I think we could have python 3 in this image, but I think this should be addressed as a separate PR

Co-authored-by: Pablo Baeyens <[email protected]>
@julien-lebot julien-lebot merged commit 1129f60 into master Jun 17, 2020
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 this pull request may close these issues.

2 participants