Unverified Commit 4cfd603c authored by jh-nv's avatar jh-nv Committed by GitHub
Browse files

fix: Pin GNU gcc version to 14 to build CUDA (#5145)


Signed-off-by: default avatarJie Hao <jihao@nvidia.com>
Co-authored-by: default avatarYan Ru Pei <yanrpei@gmail.com>
parent fbe6bb0a
...@@ -141,7 +141,10 @@ RUN yum groupinstall -y 'Development Tools' && \ ...@@ -141,7 +141,10 @@ RUN yum groupinstall -y 'Development Tools' && \
cmake \ cmake \
ninja-build \ ninja-build \
clang-devel \ clang-devel \
gcc-c++ \ # Install GCC toolset 14 (CUDA compatible, max version 14)
gcc-toolset-14-gcc \
gcc-toolset-14-gcc-c++ \
gcc-toolset-14-binutils \
flex \ flex \
wget \ wget \
# Kernel module build dependencies # Kernel module build dependencies
...@@ -161,6 +164,11 @@ RUN yum groupinstall -y 'Development Tools' && \ ...@@ -161,6 +164,11 @@ RUN yum groupinstall -y 'Development Tools' && \
hwloc \ hwloc \
hwloc-devel hwloc-devel
# Set GCC toolset 14 as the default compiler (CUDA requires GCC <= 14)
ENV PATH="/opt/rh/gcc-toolset-14/root/usr/bin:${PATH}" \
LD_LIBRARY_PATH="/opt/rh/gcc-toolset-14/root/usr/lib64:${LD_LIBRARY_PATH}" \
CC="/opt/rh/gcc-toolset-14/root/usr/bin/gcc" \
CXX="/opt/rh/gcc-toolset-14/root/usr/bin/g++"
# Ensure a modern protoc is available (required for --experimental_allow_proto3_optional) # Ensure a modern protoc is available (required for --experimental_allow_proto3_optional)
......
...@@ -154,7 +154,10 @@ RUN yum groupinstall -y 'Development Tools' && \ ...@@ -154,7 +154,10 @@ RUN yum groupinstall -y 'Development Tools' && \
cmake \ cmake \
ninja-build \ ninja-build \
clang-devel \ clang-devel \
gcc-c++ \ # Install GCC toolset 14 (CUDA compatible, max version 14)
gcc-toolset-14-gcc \
gcc-toolset-14-gcc-c++ \
gcc-toolset-14-binutils \
flex \ flex \
wget \ wget \
# Kernel module build dependencies # Kernel module build dependencies
...@@ -174,6 +177,12 @@ RUN yum groupinstall -y 'Development Tools' && \ ...@@ -174,6 +177,12 @@ RUN yum groupinstall -y 'Development Tools' && \
hwloc \ hwloc \
hwloc-devel hwloc-devel
# Set GCC toolset 14 as the default compiler (CUDA requires GCC <= 14)
ENV PATH="/opt/rh/gcc-toolset-14/root/usr/bin:${PATH}" \
LD_LIBRARY_PATH="/opt/rh/gcc-toolset-14/root/usr/lib64:${LD_LIBRARY_PATH}" \
CC="/opt/rh/gcc-toolset-14/root/usr/bin/gcc" \
CXX="/opt/rh/gcc-toolset-14/root/usr/bin/g++"
# Ensure a modern protoc is available (required for --experimental_allow_proto3_optional) # Ensure a modern protoc is available (required for --experimental_allow_proto3_optional)
RUN set -eux; \ RUN set -eux; \
......
...@@ -165,7 +165,10 @@ RUN yum groupinstall -y 'Development Tools' && \ ...@@ -165,7 +165,10 @@ RUN yum groupinstall -y 'Development Tools' && \
cmake \ cmake \
ninja-build \ ninja-build \
clang-devel \ clang-devel \
gcc-c++ \ # Install GCC toolset 14 (CUDA compatible, max version 14)
gcc-toolset-14-gcc \
gcc-toolset-14-gcc-c++ \
gcc-toolset-14-binutils \
flex \ flex \
wget \ wget \
# Kernel module build dependencies # Kernel module build dependencies
...@@ -185,6 +188,12 @@ RUN yum groupinstall -y 'Development Tools' && \ ...@@ -185,6 +188,12 @@ RUN yum groupinstall -y 'Development Tools' && \
hwloc \ hwloc \
hwloc-devel hwloc-devel
# Set GCC toolset 14 as the default compiler (CUDA requires GCC <= 14)
ENV PATH="/opt/rh/gcc-toolset-14/root/usr/bin:${PATH}" \
LD_LIBRARY_PATH="/opt/rh/gcc-toolset-14/root/usr/lib64:${LD_LIBRARY_PATH}" \
CC="/opt/rh/gcc-toolset-14/root/usr/bin/gcc" \
CXX="/opt/rh/gcc-toolset-14/root/usr/bin/g++"
# Ensure a modern protoc is available (required for --experimental_allow_proto3_optional) # Ensure a modern protoc is available (required for --experimental_allow_proto3_optional)
RUN set -eux; \ RUN set -eux; \
......
...@@ -168,7 +168,10 @@ RUN yum groupinstall -y 'Development Tools' && \ ...@@ -168,7 +168,10 @@ RUN yum groupinstall -y 'Development Tools' && \
cmake \ cmake \
ninja-build \ ninja-build \
clang-devel \ clang-devel \
gcc-c++ \ # Install GCC toolset 14 (CUDA compatible, max version 14)
gcc-toolset-14-gcc \
gcc-toolset-14-gcc-c++ \
gcc-toolset-14-binutils \
flex \ flex \
wget \ wget \
# Kernel module build dependencies # Kernel module build dependencies
...@@ -192,6 +195,12 @@ RUN yum groupinstall -y 'Development Tools' && \ ...@@ -192,6 +195,12 @@ RUN yum groupinstall -y 'Development Tools' && \
libuuid-devel \ libuuid-devel \
zlib-devel zlib-devel
# Set GCC toolset 14 as the default compiler (CUDA requires GCC <= 14)
ENV PATH="/opt/rh/gcc-toolset-14/root/usr/bin:${PATH}" \
LD_LIBRARY_PATH="/opt/rh/gcc-toolset-14/root/usr/lib64:${LD_LIBRARY_PATH}" \
CC="/opt/rh/gcc-toolset-14/root/usr/bin/gcc" \
CXX="/opt/rh/gcc-toolset-14/root/usr/bin/g++"
# Ensure a modern protoc is available (required for --experimental_allow_proto3_optional) # Ensure a modern protoc is available (required for --experimental_allow_proto3_optional)
RUN set -eux; \ RUN set -eux; \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment