Workaround #26279 by publishing manylinux_2_24 wheels instead of manylinux2014 on aarch64 (#26430)

* workaround #26279 at the expense of binary compatibility

* correctly tag aarch64 wheels as manylinux_2_24
pull/26435/head
Jan Tattermusch 4 years ago committed by GitHub
parent b3b036ca17
commit 4fb0ccecf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      tools/dockerfile/grpc_artifact_python_manylinux_2_24_aarch64/Dockerfile
  2. 23
      tools/run_tests/artifacts/artifact_targets.py

@ -15,10 +15,16 @@
# The aarch64 wheels are being crosscompiled to allow running the build # The aarch64 wheels are being crosscompiled to allow running the build
# on x64 machine. The dockcross/manylinux2014-aarch64 image is a x86_64 # on x64 machine. The dockcross/manylinux2014-aarch64 image is a x86_64
# image with crosscompilation toolchain installed. # image with crosscompilation toolchain installed.
# Use an older version of dockcross image that has gcc4.9.4 because it was built # We use an older version of dockcross image that has gcc4.9.4 because it was built
# before https://github.com/dockcross/dockcross/pull/449 # before https://github.com/dockcross/dockcross/pull/449
# Thanks to that, wheel build with this image aren't actually
# compliant with manylinux2014, but only with manylinux_2_24
FROM dockcross/manylinux2014-aarch64:20200929-608e6ac FROM dockcross/manylinux2014-aarch64:20200929-608e6ac
# Make the grpc wheels correctly tagged with manylinux_2_24
# instead of the incorrect manylinux2014 (see the note above).
ENV AUDITWHEEL_PLAT manylinux_2_24_$AUDITWHEEL_ARCH
################################### ###################################
# Install Python build requirements # Install Python build requirements
RUN /opt/python/cp35-cp35m/bin/pip install --upgrade cython RUN /opt/python/cp35-cp35m/bin/pip install --upgrade cython

@ -126,7 +126,11 @@ class PythonArtifact:
# This is needed because C core won't build with GCC 4.8 that's # This is needed because C core won't build with GCC 4.8 that's
# included in the default dockcross toolchain and we needed # included in the default dockcross toolchain and we needed
# to opt into using a slighly newer version of GCC. # to opt into using a slighly newer version of GCC.
environ['GRPC_PYTHON_BUILD_WITH_STATIC_LIBSTDCXX'] = 'TRUE' # TODO(jtattermusch): Due to https://github.com/grpc/grpc/issues/26279
# we can't enable static linking libstdc++. Because of that,
# the resulting wheel will be compatible with fewer platforms
# but at least it will work.
# environ['GRPC_PYTHON_BUILD_WITH_STATIC_LIBSTDCXX'] = 'TRUE'
return create_docker_jobspec( return create_docker_jobspec(
self.name, self.name,
@ -152,8 +156,11 @@ class PythonArtifact:
# This is needed because C core won't build with GCC 4.8 that's # This is needed because C core won't build with GCC 4.8 that's
# included in the default dockcross toolchain and we needed # included in the default dockcross toolchain and we needed
# to opt into using a slighly newer version of GCC. # to opt into using a slighly newer version of GCC.
environ['GRPC_PYTHON_BUILD_WITH_STATIC_LIBSTDCXX'] = 'TRUE' # TODO(jtattermusch): Due to https://github.com/grpc/grpc/issues/26279
# we can't enable static linking libstdc++. Because of that,
# the resulting wheel will be compatible with fewer platforms
# but at least it will work.
# environ['GRPC_PYTHON_BUILD_WITH_STATIC_LIBSTDCXX'] = 'TRUE'
else: else:
# only run auditwheel if we're not crosscompiling # only run auditwheel if we're not crosscompiling
environ['GRPC_RUN_AUDITWHEEL_REPAIR'] = 'TRUE' environ['GRPC_RUN_AUDITWHEEL_REPAIR'] = 'TRUE'
@ -263,7 +270,7 @@ class CSharpExtArtifact:
if self.arch == 'aarch64': if self.arch == 'aarch64':
# for aarch64, use a dockcross manylinux image that will # for aarch64, use a dockcross manylinux image that will
# give us both ready to use crosscompiler and sufficient backward compatibility # give us both ready to use crosscompiler and sufficient backward compatibility
dockerfile_dir = 'tools/dockerfile/grpc_artifact_python_manylinux2014_aarch64' dockerfile_dir = 'tools/dockerfile/grpc_artifact_python_manylinux_2_24_aarch64'
return create_docker_jobspec( return create_docker_jobspec(
self.name, dockerfile_dir, self.name, dockerfile_dir,
'tools/run_tests/artifacts/build_artifact_csharp.sh') 'tools/run_tests/artifacts/build_artifact_csharp.sh')
@ -388,10 +395,10 @@ def targets():
PythonArtifact('manylinux2010', 'x86', 'cp37-cp37m'), PythonArtifact('manylinux2010', 'x86', 'cp37-cp37m'),
PythonArtifact('manylinux2010', 'x86', 'cp38-cp38'), PythonArtifact('manylinux2010', 'x86', 'cp38-cp38'),
PythonArtifact('manylinux2010', 'x86', 'cp39-cp39'), PythonArtifact('manylinux2010', 'x86', 'cp39-cp39'),
PythonArtifact('manylinux2014', 'aarch64', 'cp36-cp36m'), PythonArtifact('manylinux_2_24', 'aarch64', 'cp36-cp36m'),
PythonArtifact('manylinux2014', 'aarch64', 'cp37-cp37m'), PythonArtifact('manylinux_2_24', 'aarch64', 'cp37-cp37m'),
PythonArtifact('manylinux2014', 'aarch64', 'cp38-cp38'), PythonArtifact('manylinux_2_24', 'aarch64', 'cp38-cp38'),
PythonArtifact('manylinux2014', 'aarch64', 'cp39-cp39'), PythonArtifact('manylinux_2_24', 'aarch64', 'cp39-cp39'),
PythonArtifact('linux_extra', 'armv7', 'cp36-cp36m'), PythonArtifact('linux_extra', 'armv7', 'cp36-cp36m'),
PythonArtifact('linux_extra', 'armv7', 'cp37-cp37m'), PythonArtifact('linux_extra', 'armv7', 'cp37-cp37m'),
PythonArtifact('linux_extra', 'armv7', 'cp38-cp38'), PythonArtifact('linux_extra', 'armv7', 'cp38-cp38'),

Loading…
Cancel
Save