From 05dcd457415f8428f5dd3d27b9d3c820af08be9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20=C5=A0?= Date: Wed, 28 Jun 2023 10:26:43 +0200 Subject: [PATCH 1/3] Add Cinder 3.10 --- .../share/python-build/cinder-3.10-dev | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 plugins/python-build/share/python-build/cinder-3.10-dev diff --git a/plugins/python-build/share/python-build/cinder-3.10-dev b/plugins/python-build/share/python-build/cinder-3.10-dev new file mode 100644 index 00000000..f41ee2b7 --- /dev/null +++ b/plugins/python-build/share/python-build/cinder-3.10-dev @@ -0,0 +1,31 @@ +require_distro Fedora 32 &>/dev/null || \ +{ echo + colorize 1 "WARNING" + cat >&2 </dev/null) == 10 ]] || \ +{ command -v "gcc-10" >/dev/null && \ + export CC="gcc-10" && \ + echo "python-build: setting the compiler to \`gcc-10'"; } || \ +{ + echo + colorize 1 WARNING + cat >&2 < Date: Wed, 28 Jun 2023 10:57:13 +0200 Subject: [PATCH 2/3] Add Cinder configure patches --- .../Cinder-3.10-dev/001-disable-werror.patch | 30 +++++++++++++++++++ .../Cinder-3.8-dev/001-disable-werror.patch | 30 +++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 plugins/python-build/share/python-build/patches/cinder-3.10-dev/Cinder-3.10-dev/001-disable-werror.patch create mode 100644 plugins/python-build/share/python-build/patches/cinder-3.8-dev/Cinder-3.8-dev/001-disable-werror.patch diff --git a/plugins/python-build/share/python-build/patches/cinder-3.10-dev/Cinder-3.10-dev/001-disable-werror.patch b/plugins/python-build/share/python-build/patches/cinder-3.10-dev/Cinder-3.10-dev/001-disable-werror.patch new file mode 100644 index 00000000..3014b812 --- /dev/null +++ b/plugins/python-build/share/python-build/patches/cinder-3.10-dev/Cinder-3.10-dev/001-disable-werror.patch @@ -0,0 +1,30 @@ +diff --git a/configure b/configure +index 5c74f00a..8bb51f40 100755 +--- a/configure ++++ b/configure +@@ -7057,8 +7057,8 @@ $as_echo "$ac_cv_extra_warnings" >&6; } + + if test $ac_cv_extra_warnings = yes + then +- CFLAGS_NODIST="$CFLAGS_NODIST -Wextra -Werror" +- CXXFLAGS_NODIST="$CXXFLAGS_NODIST -Wextra -Werror -Wno-implicit-fallthrough" ++ CFLAGS_NODIST="$CFLAGS_NODIST -Wextra" ++ CXXFLAGS_NODIST="$CXXFLAGS_NODIST -Wextra -Wno-implicit-fallthrough" + fi + + # Python doesn't violate C99 aliasing rules, but older versions of +diff --git a/configure.ac b/configure.ac +index c06b992d..6dee6632 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1622,8 +1622,8 @@ yes) + + if test $ac_cv_extra_warnings = yes + then +- CFLAGS_NODIST="$CFLAGS_NODIST -Wextra -Werror" +- CXXFLAGS_NODIST="$CXXFLAGS_NODIST -Wextra -Werror -Wno-implicit-fallthrough" ++ CFLAGS_NODIST="$CFLAGS_NODIST -Wextra" ++ CXXFLAGS_NODIST="$CXXFLAGS_NODIST -Wextra -Wno-implicit-fallthrough" + fi + + # Python doesn't violate C99 aliasing rules, but older versions of diff --git a/plugins/python-build/share/python-build/patches/cinder-3.8-dev/Cinder-3.8-dev/001-disable-werror.patch b/plugins/python-build/share/python-build/patches/cinder-3.8-dev/Cinder-3.8-dev/001-disable-werror.patch new file mode 100644 index 00000000..bbcd9a15 --- /dev/null +++ b/plugins/python-build/share/python-build/patches/cinder-3.8-dev/Cinder-3.8-dev/001-disable-werror.patch @@ -0,0 +1,30 @@ +diff --git a/configure b/configure +index 0df332f7..df8143cf 100755 +--- a/configure ++++ b/configure +@@ -6952,8 +6952,8 @@ $as_echo "$ac_cv_extra_warnings" >&6; } + + if test $ac_cv_extra_warnings = yes + then +- CFLAGS_NODIST="$CFLAGS_NODIST -Wextra -Werror" +- CXXFLAGS_NODIST="$CXXFLAGS_NODIST -Wextra -Werror -Wno-implicit-fallthrough" ++ CFLAGS_NODIST="$CFLAGS_NODIST -Wextra" ++ CXXFLAGS_NODIST="$CXXFLAGS_NODIST -Wextra -Wno-implicit-fallthrough" + fi + + # Python doesn't violate C99 aliasing rules, but older versions of +diff --git a/configure.ac b/configure.ac +index f6718e36..0a651e7d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1579,8 +1579,8 @@ yes) + + if test $ac_cv_extra_warnings = yes + then +- CFLAGS_NODIST="$CFLAGS_NODIST -Wextra -Werror" +- CXXFLAGS_NODIST="$CXXFLAGS_NODIST -Wextra -Werror -Wno-implicit-fallthrough" ++ CFLAGS_NODIST="$CFLAGS_NODIST -Wextra" ++ CXXFLAGS_NODIST="$CXXFLAGS_NODIST -Wextra -Wno-implicit-fallthrough" + fi + + # Python doesn't violate C99 aliasing rules, but older versions of From 1874f95a0eba3479dcd51faf7e8cd44b12446b6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20=C5=A0?= Date: Sat, 1 Jul 2023 19:10:17 +0200 Subject: [PATCH 3/3] Update Cinder errors and warnings --- .../share/python-build/cinder-3.10-dev | 60 +++++++++++-------- .../share/python-build/cinder-3.8-dev | 60 +++++++++++-------- 2 files changed, 72 insertions(+), 48 deletions(-) diff --git a/plugins/python-build/share/python-build/cinder-3.10-dev b/plugins/python-build/share/python-build/cinder-3.10-dev index f41ee2b7..7d83cd65 100644 --- a/plugins/python-build/share/python-build/cinder-3.10-dev +++ b/plugins/python-build/share/python-build/cinder-3.10-dev @@ -1,28 +1,40 @@ -require_distro Fedora 32 &>/dev/null || \ -{ echo - colorize 1 "WARNING" - cat >&2 <&2 +fi -[[ $(${CC:-gcc} -dumpversion 2>/dev/null) == 10 ]] || \ -{ command -v "gcc-10" >/dev/null && \ - export CC="gcc-10" && \ - echo "python-build: setting the compiler to \`gcc-10'"; } || \ -{ - echo - colorize 1 WARNING - cat >&2 </dev/null) != 10 ]] && + (command -v "gcc-10" >/dev/null) && + (command -v "g++-10" >/dev/null); then + echo "python-build: setting the compiler to GCC 10" + export CC="gcc-10" + export CXX="g++-10" +fi + +if [[ $(awk -F. '{print $1}' <<< "$(${CC:-gcc} -dumpversion)") -lt 10 ]]; then + { + echo + colorize 1 "ERROR" + echo ": Cinder requires at least GCC 10." + echo + return 1 + } >&2 +fi + +require_distro Fedora 32 &> /dev/null || + { + echo + colorize 1 "WARNING" + echo ": Cinder officially only supports Facebook's Docker" + echo "images which are based on Fedora 32. It may fail to build" + echo "on a system with a different GCC and/or Glibc version." + echo + } >&2 prefer_openssl11 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 diff --git a/plugins/python-build/share/python-build/cinder-3.8-dev b/plugins/python-build/share/python-build/cinder-3.8-dev index 5a3c8a82..4d8a8a7a 100644 --- a/plugins/python-build/share/python-build/cinder-3.8-dev +++ b/plugins/python-build/share/python-build/cinder-3.8-dev @@ -1,28 +1,40 @@ -require_distro Fedora 32 &>/dev/null || \ -{ echo - colorize 1 "WARNING" - cat >&2 <&2 +fi -[[ $(${CC:-gcc} -dumpversion 2>/dev/null) == 10 ]] || \ -{ command -v "gcc-10" >/dev/null && \ - export CC="gcc-10" && \ - echo "python-build: setting the compiler to \`gcc-10'"; } || \ -{ - echo - colorize 1 WARNING - cat >&2 </dev/null) != 10 ]] && + (command -v "gcc-10" >/dev/null) && + (command -v "g++-10" >/dev/null); then + echo "python-build: setting the compiler to GCC 10" + export CC="gcc-10" + export CXX="g++-10" +fi + +if [[ $(awk -F. '{print $1}' <<< "$(${CC:-gcc} -dumpversion)") -lt 10 ]]; then + { + echo + colorize 1 "ERROR" + echo ": Cinder requires at least GCC 10." + echo + return 1 + } >&2 +fi + +require_distro Fedora 32 &> /dev/null || + { + echo + colorize 1 "WARNING" + echo ": Cinder officially only supports Facebook's Docker" + echo "images which are based on Fedora 32. It may fail to build" + echo "on a system with a different GCC and/or Glibc version." + echo + } >&2 prefer_openssl11 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1