mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-03 20:31:35 +00:00
cleanup arm build
This commit is contained in:
@@ -19,57 +19,50 @@
|
|||||||
sudo apt-get -qq --yes build-dep python3 > /dev/null
|
sudo apt-get -qq --yes build-dep python3 > /dev/null
|
||||||
sudo apt-get -qq --yes install zlib1g-dev > /dev/null
|
sudo apt-get -qq --yes install zlib1g-dev > /dev/null
|
||||||
|
|
||||||
mypath=$HOME
|
echo "My Path is $HOME"
|
||||||
echo "My Path is $mypath"
|
|
||||||
cpucount=$(nproc --all)
|
cpucount=$(nproc --all)
|
||||||
echo "This device has $cpucount CPUs for compiling..."
|
echo "This device has $cpucount CPUs for compiling..."
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=~/ssl/lib:~/python/lib
|
||||||
|
|
||||||
# Compile latest OpenSSL
|
# Compile latest OpenSSL
|
||||||
if [ ! -d openssl-$BUILD_OPENSSL_VERSION ]; then
|
SSLVER=$(~/ssl/bin/openssl version)
|
||||||
|
if [ "$?" != "0" ] || [[ "$SSLVER" != *"$BUILD_OPENSSL_VERSION"* ]]; then
|
||||||
|
echo "Downloading OpenSSL..."
|
||||||
wget --quiet https://www.openssl.org/source/openssl-$BUILD_OPENSSL_VERSION.tar.gz
|
wget --quiet https://www.openssl.org/source/openssl-$BUILD_OPENSSL_VERSION.tar.gz
|
||||||
echo "Extracting OpenSSL..."
|
echo "Extracting OpenSSL..."
|
||||||
tar xf openssl-$BUILD_OPENSSL_VERSION.tar.gz
|
tar xf openssl-$BUILD_OPENSSL_VERSION.tar.gz
|
||||||
fi
|
|
||||||
cd openssl-$BUILD_OPENSSL_VERSION
|
cd openssl-$BUILD_OPENSSL_VERSION
|
||||||
echo "Compiling OpenSSL $BUILD_OPENSSL_VERSION..."
|
echo "Compiling OpenSSL $BUILD_OPENSSL_VERSION..."
|
||||||
./config shared --prefix=$mypath/ssl
|
./config shared --prefix=~/ssl
|
||||||
echo "Running make for OpenSSL..."
|
echo "Running make for OpenSSL..."
|
||||||
make -j$cpucount -s
|
make -j$cpucount -s
|
||||||
echo "Running make install for OpenSSL..."
|
echo "Running make install for OpenSSL..."
|
||||||
make install > /dev/null
|
make install > /dev/null
|
||||||
export LD_LIBRARY_PATH=~/ssl/lib
|
|
||||||
cd ~
|
cd ~
|
||||||
|
fi
|
||||||
|
|
||||||
# Compile latest Python
|
# Compile latest Python
|
||||||
if [ ! -d Python-$BUILD_PYTHON_VERSION ]; then
|
PYVER=$(~/python/bin/python -V)
|
||||||
|
if [ "$?" != "0" ] || [[ "$PYVER" != *"$BUILD_PYTHON_VERSION"* ]]; then
|
||||||
echo "Downloading Python $BUILD_PYTHON_VERSION..."
|
echo "Downloading Python $BUILD_PYTHON_VERSION..."
|
||||||
curl -O https://www.python.org/ftp/python/$BUILD_PYTHON_VERSION/Python-$BUILD_PYTHON_VERSION.tar.xz
|
curl -O https://www.python.org/ftp/python/$BUILD_PYTHON_VERSION/Python-$BUILD_PYTHON_VERSION.tar.xz
|
||||||
echo "Extracting Python..."
|
echo "Extracting Python..."
|
||||||
tar xf Python-$BUILD_PYTHON_VERSION.tar.xz
|
tar xf Python-$BUILD_PYTHON_VERSION.tar.xz
|
||||||
fi
|
|
||||||
cd Python-$BUILD_PYTHON_VERSION
|
cd Python-$BUILD_PYTHON_VERSION
|
||||||
echo "Compiling Python $BUILD_PYTHON_VERSION..."
|
echo "Compiling Python $BUILD_PYTHON_VERSION..."
|
||||||
safe_flags="--with-openssl=$mypath/ssl --enable-shared --prefix=$mypath/python --with-ensurepip=upgrade"
|
safe_flags="--with-openssl=~/ssl --enable-shared --prefix=~/python --with-ensurepip=upgrade"
|
||||||
unsafe_flags="--enable-optimizations --with-lto"
|
unsafe_flags="--enable-optimizations --with-lto"
|
||||||
if [ ! -e Makefile ]; then
|
|
||||||
echo "running configure with safe and unsafe"
|
echo "running configure with safe and unsafe"
|
||||||
./configure $safe_flags $unsafe_flags > /dev/null
|
./configure $safe_flags $unsafe_flags > /dev/null
|
||||||
fi
|
|
||||||
make -j$cpucount PROFILE_TASK="-m test.regrtest --pgo -j$(( $cpucount * 2 ))" -s
|
make -j$cpucount PROFILE_TASK="-m test.regrtest --pgo -j$(( $cpucount * 2 ))" -s
|
||||||
RESULT=$?
|
|
||||||
echo "First make exited with $RESULT"
|
|
||||||
if [ $RESULT != 0 ]; then
|
|
||||||
echo "Trying Python compile again without unsafe flags..."
|
|
||||||
make clean
|
|
||||||
./configure $safe_flags > /dev/null
|
|
||||||
make -j$cpucount -s
|
|
||||||
echo "Sticking with safe Python for now..."
|
|
||||||
fi
|
|
||||||
echo "Installing Python..."
|
echo "Installing Python..."
|
||||||
make install > /dev/null
|
make install > /dev/null
|
||||||
cd ~
|
cd ~
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd $WHEREIBELONG
|
||||||
|
|
||||||
export LD_LIBRARY_PATH=~/ssl/lib:~/python/lib
|
|
||||||
python=~/python/bin/python3
|
python=~/python/bin/python3
|
||||||
pip=~/python/bin/pip3
|
pip=~/python/bin/pip3
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user