Build script
# =============================================================
# CodeTyphon Studio
# Copyright (c) PilotLogic Software House.
# All rights reserved.
# =============================================================
dothejob()
{
echo " "
echo "=============================================================="
echo " Build FreePascal $vBits for $vHostOSRealName"
echo "=============================================================="
echo " "
if [ ! -f $vFpcSrcDir/Makefile.fpc ] ;
then
echo "[INFO]: FPC$vBits Source files not exists, extracting..."
./ln_FPC0_Extract_Source_From_ZipFile.sh
fi
if [ ! -f $vFpcExeDir/$vFpcExeFile ] ;
then
echo "[INFO]: FPC$vBits Binary files not exists, extracting..."
./ln_FPC0_Install_Bin_Files.sh 64
fi
if [ -d $vFpcDir/newfpc ] ;
then
echo "[INFO]: Remove OLD FreePascal temporary build folder..."
sudo rm -rf $vFpcDir/newfpc
fi
cd $vCTDir/fpcsrc
echo "------------------------------------------------"
echo " Clean FreePascal $vBits"
echo "------------------------------------------------"
sudo $vMake clean PP=$vFpcExeDir/$vFpcExeFile
echo "------------------------------------------------"
echo " Build FreePascal $vBits"
echo "------------------------------------------------"
#sleep 100
echo 'пути '$vFpcExeDir/$vFpcExeFile
case $vOSName in
solaris)
sudo $vMake all OPT="-Xn" PP=$vFpcExeDir/$vFpcExeFile PPUMOVE=/usr/lib/codetyphon/fpcsrc/compiler/utils/ppumove
;;
linux)
sudo $vMake all PP=$vFpcExeDir/$vFpcExeFile PPUMOVE=/usr/lib/codetyphon/fpcsrc/compiler/utils/ppumove
;;
freebsd)
sudo $vMake all OPT="-Fl/usr/local/lib" PP=$vFpcExeDir/$vFpcExeFile PPUMOVE=/usr/lib/codetyphon/fpcsrc/compiler/utils/ppumove
;;
openbsd)
sudo $vMake all OPT="-Fl/usr/local/lib" PP=$vFpcExeDir/$vFpcExeFile PPUMOVE=/usr/lib/codetyphon/fpcsrc/compiler/utils/ppumove
;;
netbsd)
sudo $vMake all OPT="-Fl/usr/local/lib" PP=$vFpcExeDir/$vFpcExeFile PPUMOVE=/usr/lib/codetyphon/fpcsrc/compiler/utils/ppumove
;;
dragonfly)
sudo $vMake all OPT="-Fl/usr/local/lib" PP=$vFpcExeDir/$vFpcExeFile PPUMOVE=/usr/lib/codetyphon/fpcsrc/compiler/utils/ppumove
;;
darwin)
sudo $vMake all PP=$vFpcExeDir/$vFpcExeFile PPUMOVE=/usr/lib/codetyphon/fpcsrc/compiler/utils/ppumove
;;
*)
sudo $vMake all PP=$vFpcExeDir/$vFpcExeFile PPUMOVE=/usr/lib/codetyphon/fpcsrc/compiler/utils/ppumove
;;
esac
# =======================================================
if [ -f $vCTDir/Settings/CT_FPC_Stop_Before_Install.ctsw ] ;
then
echo " "
echo "[INFO]: Switch, FPC Stop Before Install Procedure, is ON."
echo " FPC Build procedure STOP.."
echo " "
exit
fi
# =====================================================
echo " "
echo "------------------------------------------------"
echo " Install FreePascal $vBits"
echo "------------------------------------------------"
sudo $vMake install PP=$vFpcExeDir/$vFpcExeFile INSTALL_PREFIX=/usr/lib/codetyphon/fpc/newfpc
echo " "
echo "------------------------------------------------"
echo " Clean FreePascal $vBits"
echo "------------------------------------------------"
sudo $vMake clean PP=$vFpcExeDir/$vFpcExeFile
# =====================================================
echo " "
echo "------------------------------------------------"
echo " Copy FreePascal $vBits"
echo "------------------------------------------------"
if [ ! -d $vFpcBitsDir/ ] ;
then
sudo mkdir $vFpcBitsDir
fi
sudo chmod -R 777 $vFpcDir/
sudo cp -f $vFpcDir/newfpc/bin/* $vFpcExeDir/
sudo cp -fr $vFpcDir/newfpc/share/* $vFpcBitsDir/
sudo cp -fr $vFpcDir/newfpc/lib/fpc/$vFpcVer/* $vFpcBitsDir/
sudo rm -fr $vFpcDir/newfpc/lib/fpc/$vFpcVer
sudo cp -fr $vFpcDir/newfpc/lib/fpc/* $vFpcBitsDir/
sudo rm -fr $vFpcDir/newfpc
sudo mv -f $vFpcBitsDir/$vFpcExeFile $vFpcExeDir/
sudo chmod -R 777 $vFpcBinDir
sudo chmod -R 777 $vFpcDir
#=========================================
sudo rm -f $vOSBinDir/$vFpcExeFile
sudo rm -f $vOSBinDir/fpc$vBits
sudo ln -f -s $vFpcExeDir/$vFpcExeFile $vOSBinDir/$vFpcExeFile
sudo ln -f -s $vFpcExeDir/$vFpcExeFile $vOSBinDir/fpc$vBits
#=========================================
echo " "
echo "[FINAL INFO]: FreePascal $vBits Building, finish..."
echo "====================================================================="
}
# =================== MAIN =============================
. $PWD/ln_All_Functions.sh
getvalues
if [ $vBits = 64 ] ;
then
dothejob
fi
Log
/bin/mkdir -p x86_64/units/x86_64-linux
/usr/lib/codetyphon/fpc/fpc64/bin/x86_64-linux/ppcx64 -Ur -Xs -O2 -n -Fux86_64 -Fusystems -Fu/usr/lib/codetyphon/fpcsrc/rtl/units/x86_64-linux -Fix86_64 -FE. -FUx86_64/units/x86_64-linux -Cg -dRELEASE -fPIC -dx86_64 -dGDB -dBROWSERLOG -Fux86 -Sew pp.pas
/bin/ld: warning: ./link.res contains output sections; did you forget -T?
/usr/lib/codetyphon/fpcsrc/rtl/units/x86_64-linux/sysutils.o: In function `SYSUTILS_$$_EXPANDFILENAMECASE$RAWBYTESTRING$TFILENAMECASEMATCH$$RAWBYTESTRING':
sysutils.pp:(.text.n_sysutils_$$_expandfilenamecase$rawbytestring$tfilenamecasematch$$rawbytestring+0x22b): relocation truncated to fit: R_X86_64_PLT32 against symbol `fpc_ansistr_assign' defined in .text.n_fpc_ansistr_assign section in /usr/lib/codetyphon/fpcsrc/rtl/units/x86_64-linux/system.o
pp.pas(247,1) Error: Error while linking
pp.pas(247,1) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Makefile:3925: ошибка Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñ€ÐµÑ†ÐµÐ¿Ñ‚Ð° Ð´Ð»Ñ Ñ†ÐµÐ»Ð¸ «ppcx64»
make[5]: *** [ppcx64] Ошибка 1
make[5]: выход из каталога «/usr/lib/codetyphon/fpcsrc/compiler»
Makefile:3967: ошибка Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñ€ÐµÑ†ÐµÐ¿Ñ‚Ð° Ð´Ð»Ñ Ñ†ÐµÐ»Ð¸ «next»
make[4]: *** [next] Ошибка 2
make[4]: выход из каталога «/usr/lib/codetyphon/fpcsrc/compiler»
Makefile:3972: ошибка Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñ€ÐµÑ†ÐµÐ¿Ñ‚Ð° Ð´Ð»Ñ Ñ†ÐµÐ»Ð¸ «ppc1»
make[3]: *** [ppc1] Ошибка 2
make[3]: выход из каталога «/usr/lib/codetyphon/fpcsrc/compiler»
Makefile:3984: ошибка Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñ€ÐµÑ†ÐµÐ¿Ñ‚Ð° Ð´Ð»Ñ Ñ†ÐµÐ»Ð¸ «cycle»
make[2]: *** [cycle] Ошибка 2
make[2]: выход из каталога «/usr/lib/codetyphon/fpcsrc/compiler»
Makefile:2779: ошибка Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñ€ÐµÑ†ÐµÐ¿Ñ‚Ð° Ð´Ð»Ñ Ñ†ÐµÐ»Ð¸ «compiler_cycle»
make[1]: *** [compiler_cycle] Ошибка 2
make[1]: выход из каталога «/usr/lib/codetyphon/fpcsrc»
Makefile:2804: ошибка Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñ€ÐµÑ†ÐµÐ¿Ñ‚Ð° Ð´Ð»Ñ Ñ†ÐµÐ»Ð¸ «build-stamp.x86_64-linux»
make: *** [build-stamp.x86_64-linux] Ошибка 2
[INFO]: Switch, FPC Stop Before Install Procedure, is ON.
FPC Build procedure STOP..
_______________________________________________________________
Terminate Action at 6-3-15 12:09:07
Total time: 00:00:19.331
ExitCode : 0