Update Cinder errors and warnings

This commit is contained in:
Filip Š 2023-07-01 19:10:17 +02:00
parent 1a882c6053
commit 1874f95a0e
2 changed files with 72 additions and 48 deletions

View file

@ -1,28 +1,40 @@
require_distro Fedora 32 &>/dev/null || \ if [ "$(expr substr "$(uname -s)" 1 5)" != "Linux" ]; then
{ echo {
colorize 1 "WARNING" echo
cat >&2 <<! colorize 1 "ERROR"
: The Cinder compiler only officially supports echo ": Cinder currently only supports Linux."
Facebook's Docker images which are Fedora 32 - based. echo
It may fail to build on a system return 1
with a different GCC and/or Glibc version. } >&2
! fi
echo
}
[[ $(${CC:-gcc} -dumpversion 2>/dev/null) == 10 ]] || \ if [[ $(${CC:-gcc} -dumpversion 2>/dev/null) != 10 ]] &&
{ command -v "gcc-10" >/dev/null && \ (command -v "gcc-10" >/dev/null) &&
export CC="gcc-10" && \ (command -v "g++-10" >/dev/null); then
echo "python-build: setting the compiler to \`gcc-10'"; } || \ echo "python-build: setting the compiler to GCC 10"
{ export CC="gcc-10"
echo export CXX="g++-10"
colorize 1 WARNING fi
cat >&2 <<!
: GCC 10 is not found on PATH. if [[ $(awk -F. '{print $1}' <<< "$(${CC:-gcc} -dumpversion)") -lt 10 ]]; then
The build may fail. {
! echo
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 prefer_openssl11
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1

View file

@ -1,28 +1,40 @@
require_distro Fedora 32 &>/dev/null || \ if [ "$(expr substr "$(uname -s)" 1 5)" != "Linux" ]; then
{ echo {
colorize 1 "WARNING" echo
cat >&2 <<! colorize 1 "ERROR"
: The Cinder compiler only officially supports echo ": Cinder currently only supports Linux."
Facebook's Docker images which are Fedora 32 - based. echo
It may fail to build on a system return 1
with a different GCC and/or Glibc version. } >&2
! fi
echo
}
[[ $(${CC:-gcc} -dumpversion 2>/dev/null) == 10 ]] || \ if [[ $(${CC:-gcc} -dumpversion 2>/dev/null) != 10 ]] &&
{ command -v "gcc-10" >/dev/null && \ (command -v "gcc-10" >/dev/null) &&
export CC="gcc-10" && \ (command -v "g++-10" >/dev/null); then
echo "python-build: setting the compiler to \`gcc-10'"; } || \ echo "python-build: setting the compiler to GCC 10"
{ export CC="gcc-10"
echo export CXX="g++-10"
colorize 1 WARNING fi
cat >&2 <<!
: GCC 10 is not found on PATH. if [[ $(awk -F. '{print $1}' <<< "$(${CC:-gcc} -dumpversion)") -lt 10 ]]; then
The build may fail. {
! echo
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 prefer_openssl11
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1