Skip to content

[WIP] Manylinux2010 #279

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

Merged
merged 39 commits into from
Apr 10, 2019
Merged

[WIP] Manylinux2010 #279

merged 39 commits into from
Apr 10, 2019

Conversation

mayeut
Copy link
Member

@mayeut mayeut commented Mar 19, 2019

A new Manylinux 2010 PR based on #182 with master merged c.f. #179 (comment)

Remaining items:

  • Thorough review (already began in Manylinux2010 #182)
  • Merge [WIP] Reduce image size #210 in master (or at least the commit allowing to get rid of yum workaround) then rebase. This requires some review. This leads to yum workaround avoided, proper isolation of curl & openssl and a reduced image (faster docker pull). This could be done in a second step but this is the occasion to get this merged in.
  • drop 32bit image, update to devtoolset-8

dolang and others added 28 commits April 13, 2018 06:16
…ster

- The dockerfiles build successfully.
- Compared to current master, there's a new intermediate image for
  glibc.  As the x86_64 build depends on it, this must have a predefined
  name.  In the PR the "naming prefix" is 'markrwilliams/manylinux2',
  therefore it's assumed for all images.
- There's a problem with libcurl which has been (temporarily) resolved
  with script which redirects yum.  See docker/build_scripts/build.sh for
  details.

The following script is proven to work:

  pushd docker/glibc/
  docker build -t markrwilliams/manylinux2:centos-6.9-no-vsyscall
  popd
  docker/build_scripts/prefetch.sh curl openssl
  docker build -t markrwilliams/manylinux2:x86_64 \
    -f docker/Dockerfile-x86_64 docker/
  docker build -t markrwilliams/manylinux2:i686 \
    -f docker/Dockerfile-i686 docker/
- docker/build_scripts/build.sh:
  - removed libncurses.devel; not part of PEP 571
  - removed gpg as dependency, because yum already requires it
  - removed some /dev/null redirections, because they hinder debugging

- docker/build_scripts/manylinux1-check.py
  - renamed to manylinux-check.py
  - changed names/comments to new version
  - the check now targets glibc 2.12 instead of 2.5

- .travis.yml
  - only changed the image name
  - TODO: x86_64 still needs a script for the no-vsyscall image dependency

- docker/deploy.sh
  - changed image name

- note: .rst files have not been touched
- The freshly released version of pip breaks build_utils.sh which tries
  to get the latest and greatest.  Added a condition to instead use the
  latest version below v10.
- Incorporated the lastest changes from the official repository.
  - That cleanup removed two packages from 'yum erase ...' which looks
    like an oversight. Readded.
- Removed the hack which fixed the broken build when the new pip was
  released.  This has been fixed upstream, see here:
  pypa/get-pip#19
- Add platform-dependent clause
- Assign the same prefix to the the no-vsyscall image (quay.io/pypa/...)
- The dependent docker/Dockerfile-x86_64 needs this prefix in FROM ...
- Increase in `travis_wait` time
- Shunting build output off into a log file which can be inspected
  on failure.
is merge is necessary,
- Similar to gpg the libffi-devel package can't be removed after the
  build, but it looks like this is because it was improperly packaged.
- Moved libffi to the "Development tools and libraries" section.
Like with CentOS 5 there's a CentOS 6 Docker image which is more up to
date (tag :6) than the latest release (tag :6.9).
See: pypa#206
Previously, vault.centos.org was missing some repository information,
which prevented moving to 6.10.  This is now available on CentOS 6.10
and it includes a glibc v1.212 (up from 1.209).  All changes made are
only to bump this version number.
@@ -0,0 +1,401 @@
diff --git a/BUILD/glibc-2.12-2-gc4ccff1/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S b/BUILD/glibc-2.12-2-gc4ccff1/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
Copy link

Choose a reason for hiding this comment

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

Who wrote this patch?

I found this commit... is it from here? markrwilliams@e9493d5#diff-3eda4130bdba562657f3ec7c1b3f5720

I'm not sure who wrote it, if they need credit, or if it needs review.

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess @markrwilliams wrote it ? in #152

Choose a reason for hiding this comment

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

I did, largely backporting vsyscall-less code from newer glibcs.

mayeut added 3 commits April 5, 2019 22:41
Prevent stdout timeout. The global travis timeout is the only one to apply now.
glibc patch is unlikely to change very often, use travis-ci cache mechanism in order not to rebuild it every time.

also, use build stages so that when it does change, glibc build is run as a pre-step, it will probably help not reaching the time limit, or at least, glibc build will be cached for job restart.
@takluyver
Copy link
Member

I had to restart a timed-out job before, so I guess it was right on the cusp of the 50 minute timeout. If splitting it into two stages gives us 50 minutes for each stage, that should make it much more reliable.

@takluyver
Copy link
Member

@mayeut what level of confidence would you have in images built by this branch as it stands? There don't seem to be a lot of people stepping up to do review. Would you be happy if it were merged, so the images are posted to quay.io and people start using them, and we try to fix problems as they come up? Or do you think we should keep it on hold for further review?

@JonasVautherin
Copy link

I cannot review this, but I am building stuff with manylinux1 and I could definitely try with manylinux2010 and report issues.

@trishankatdatadog trishankatdatadog merged commit 749d394 into pypa:master Apr 10, 2019
@mayeut mayeut deleted the manylinux2010 branch April 10, 2019 21:00
grzanka pushed a commit to grzanka/manylinux that referenced this pull request May 20, 2020
* Minimal usable merge of markrwilliams:manylinux2 into current pypa:master

- The dockerfiles build successfully.
- Compared to current master, there's a new intermediate image for
  glibc.  As the x86_64 build depends on it, this must have a predefined
  name.  In the PR the "naming prefix" is 'markrwilliams/manylinux2',
  therefore it's assumed for all images.
- There's a problem with libcurl which has been (temporarily) resolved
  with script which redirects yum.  See docker/build_scripts/build.sh for
  details.

The following script is proven to work:

  pushd docker/glibc/
  docker build -t markrwilliams/manylinux2:centos-6.9-no-vsyscall
  popd
  docker/build_scripts/prefetch.sh curl openssl
  docker build -t markrwilliams/manylinux2:x86_64 \
    -f docker/Dockerfile-x86_64 docker/
  docker build -t markrwilliams/manylinux2:i686 \
    -f docker/Dockerfile-i686 docker/

* Clean-up and adjustments for manylinux2010

- docker/build_scripts/build.sh:
  - removed libncurses.devel; not part of PEP 571
  - removed gpg as dependency, because yum already requires it
  - removed some /dev/null redirections, because they hinder debugging

- docker/build_scripts/manylinux1-check.py
  - renamed to manylinux-check.py
  - changed names/comments to new version
  - the check now targets glibc 2.12 instead of 2.5

- .travis.yml
  - only changed the image name
  - TODO: x86_64 still needs a script for the no-vsyscall image dependency

- docker/deploy.sh
  - changed image name

- note: .rst files have not been touched

* Fix for new release of pip (v10.0.0) breaking the build script

- The freshly released version of pip breaks build_utils.sh which tries
  to get the latest and greatest.  Added a condition to instead use the
  latest version below v10.

* Merge upstream changes (4a20e4b); remove get-pip hack

- Incorporated the lastest changes from the official repository.
  - That cleanup removed two packages from 'yum erase ...' which looks
    like an oversight. Readded.
- Removed the hack which fixed the broken build when the new pip was
  released.  This has been fixed upstream, see here:
  pypa/get-pip#19

* Re-add the two /dev/null redirections in build.sh

* Merge upstream changes (6f3bc0b)

* Merge upstream changes (3dd4551)

* Merge upstream changes (4132165)

* Adapt build.sh for the x86_64 two-stage build

- Add platform-dependent clause
- Assign the same prefix to the the no-vsyscall image (quay.io/pypa/...)
- The dependent docker/Dockerfile-x86_64 needs this prefix in FROM ...

* Getting Travis to play along

- Increase in `travis_wait` time
- Shunting build output off into a log file which can be inspected
  on failure.

* Drop 32-bit support and upgrade to devtoolset-7

* Update README.rst

manylinux2 -> manylinux2010

* Add comment regarding MANYLINUX2010_DEPS

* Add comment for Software collection & EPEL usage

* Move expat-devel to PYTHON_COMPILE_DEPS

* Use local gpgkey for RPM-GPG-KEY-CentOS-6

* Update to devtoolset-8

* Replace travis wait by custom command

Prevent stdout timeout. The global travis timeout is the only one to apply now.

* Use travis-ci build stages and cache glibc build

glibc patch is unlikely to change very often, use travis-ci cache mechanism in order not to rebuild it every time.

also, use build stages so that when it does change, glibc build is run as a pre-step, it will probably help not reaching the time limit, or at least, glibc build will be cached for job restart.
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.

7 participants