From 6bdde6ec5a2cd57be0d041cbd54323c2cc9fd5e3 Mon Sep 17 00:00:00 2001 From: Madhur Karampudi <142544288+vkarampudi@users.noreply.github.com> Date: Fri, 26 Dec 2025 16:06:51 -0800 Subject: [PATCH 1/3] Update .bazelversion --- ml_metadata/.bazelversion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ml_metadata/.bazelversion b/ml_metadata/.bazelversion index 44f2af0f6..f92706dd9 100644 --- a/ml_metadata/.bazelversion +++ b/ml_metadata/.bazelversion @@ -11,4 +11,4 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -6.1.0 +6.5.0 From d399acf995d9c159a0004f848fbcc4b14413cbd6 Mon Sep 17 00:00:00 2001 From: Madhur Karampudi <142544288+vkarampudi@users.noreply.github.com> Date: Fri, 26 Dec 2025 16:07:26 -0800 Subject: [PATCH 2/3] Update WORKSPACE --- WORKSPACE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WORKSPACE b/WORKSPACE index 246515185..313a86c3e 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -282,4 +282,4 @@ ml_metadata_workspace() # Specify the minimum required bazel version. load("@bazel_skylib//lib:versions.bzl", "versions") -versions.check("6.1.0") +versions.check("6.5.0") From 58bf9a03c24fade10c8b2ac215d10106d300be80 Mon Sep 17 00:00:00 2001 From: Venkata Sai Madhur Karampudi Date: Mon, 29 Dec 2025 22:31:08 +0000 Subject: [PATCH 3/3] Fix: Update Docker build environment for manylinux The manylinux build was failing due to an outdated Docker environment. - The base image had an old GCC, Bazel, and CMake. - The dependency was not using the correct compiler. This change updates the Dockerfile to use a modern base image with GCC 10 and explicitly installs the required versions of Bazel and CMake. It also configures the build to use the correct toolchain. This resolves the build failures for and . --- ml_metadata/libmysqlclient.BUILD | 2 +- .../docker_build/Dockerfile.manylinux2010 | 22 ++++++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/ml_metadata/libmysqlclient.BUILD b/ml_metadata/libmysqlclient.BUILD index 6b2b00d8c..daa6303a9 100644 --- a/ml_metadata/libmysqlclient.BUILD +++ b/ml_metadata/libmysqlclient.BUILD @@ -26,7 +26,7 @@ genrule( "cd $$TMP_DIR", "mkdir build", "cd build", - "cmake .. -DCMAKE_BUILD_TYPE=Release $${CMAKE_ICONV_FLAG-}", + "cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/opt/rh/devtoolset-10/root/usr/bin/gcc -DCMAKE_CXX_COMPILER=/opt/rh/devtoolset-10/root/usr/bin/g++ -DCMAKE_POLICY_VERSION_MINIMUM=3.5 $${CMAKE_ICONV_FLAG-}", "cd ..", "cp -R ./build/* $$INSTALL_DIR", "rm -rf $$TMP_DIR", diff --git a/ml_metadata/tools/docker_build/Dockerfile.manylinux2010 b/ml_metadata/tools/docker_build/Dockerfile.manylinux2010 index 77a5174cb..1be88526b 100644 --- a/ml_metadata/tools/docker_build/Dockerfile.manylinux2010 +++ b/ml_metadata/tools/docker_build/Dockerfile.manylinux2010 @@ -13,8 +13,24 @@ # limitations under the License. # Dockerfile for building a manylinux2010 MLMD wheel. +# We use manylinux2014 as it has a modern GCC. +FROM quay.io/pypa/manylinux2014_x86_64 + +# Install Bazel 6.5.0 +RUN curl -sSL -o /usr/local/bin/bazel https://github.com/bazelbuild/bazel/releases/download/6.5.0/bazel-6.5.0-linux-x86_64 && \ + chmod +x /usr/local/bin/bazel + +# Install a recent version of cmake +RUN yum install -y cmake3 && \ + ln -s /usr/bin/cmake3 /usr/bin/cmake + +# Set up the environment +ENV BAZEL_VERSION=6.5.0 +ENV BAZEL_OPTS="--host_jvm_args=-Xms2g --host_jvm_args=-Xmx2g" +# devtoolset-10 is pre-installed on the image, we just need to enable it. +ENV PATH="/opt/rh/devtoolset-10/root/usr/bin:${PATH}" +ENV LD_LIBRARY_PATH="/opt/rh/devtoolset-10/root/usr/lib64:/opt/rh/devtoolset-10/root/usr/lib:${LD_LIBRARY_PATH}" + -# This docker image is essentially pypa/manylinux2010 + bazel. -FROM gcr.io/tfx-oss-public/manylinux2014-bazel:bazel-6.1.0 WORKDIR /build -CMD ["ml_metadata/tools/docker_build/build_manylinux.sh"] +CMD ["ml_metadata/tools/docker_build/build_manylinux.sh"] \ No newline at end of file