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