653
Copyright Notice.doc
Normal file
653
Copyright Notice.doc
Normal file
File diff suppressed because one or more lines are too long
@ -981,7 +981,7 @@ necessary. Here is a sample; alter the names:
|
|||||||
That's all there is to it!
|
That's all there is to it!
|
||||||
|
|
||||||
|
|
||||||
Software: unixODBC 2.3.6
|
Software: unixODBC 2.3.9
|
||||||
Copyright notice��copyright (c) 1999 Nick Gorham
|
Copyright notice��copyright (c) 1999 Nick Gorham
|
||||||
Copyright Patrick Powell 1995
|
Copyright Patrick Powell 1995
|
||||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||||
|
320
build.sh
320
build.sh
@ -1,9 +1,82 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# description: the script that make install PSQLODBC
|
#######################################################################
|
||||||
|
# Copyright (c): 2020-2025, Huawei Tech. Co., Ltd.
|
||||||
|
# descript: Compile and pack MPPDB
|
||||||
|
# Return 0 means OK.
|
||||||
|
# Return 1 means failed.
|
||||||
|
# version: 2.0
|
||||||
|
# date: 2020-08-09
|
||||||
|
#######################################################################
|
||||||
|
declare install_package_format='tar'
|
||||||
|
declare serverlib_dir='None'
|
||||||
|
|
||||||
|
#detect platform information.
|
||||||
|
PLATFORM=32
|
||||||
|
bit=$(getconf LONG_BIT)
|
||||||
|
if [ "$bit" -eq 64 ]; then
|
||||||
|
PLATFORM=64
|
||||||
|
fi
|
||||||
|
|
||||||
|
#get OS distributed version.
|
||||||
|
kernel=""
|
||||||
|
version=""
|
||||||
|
if [ -f "/etc/euleros-release" ]; then
|
||||||
|
kernel=$(cat /etc/euleros-release | awk -F ' ' '{print $1}' | tr A-Z a-z)
|
||||||
|
version=$(cat /etc/euleros-release | awk -F '(' '{print $2}'| awk -F ')' '{print $1}' | tr A-Z a-z)
|
||||||
|
elif [ -f "/etc/openEuler-release" ]; then
|
||||||
|
kernel=$(cat /etc/openEuler-release | awk -F ' ' '{print $1}' | tr A-Z a-z)
|
||||||
|
version=$(cat /etc/openEuler-release | awk -F '(' '{print $2}'| awk -F ')' '{print $1}' | tr A-Z a-z)
|
||||||
|
elif [ -f "/etc/centos-release" ]; then
|
||||||
|
kernel=$(cat /etc/centos-release | awk -F ' ' '{print $1}' | tr A-Z a-z)
|
||||||
|
version=$(cat /etc/centos-release | awk -F '(' '{print $2}'| awk -F ')' '{print $1}' | tr A-Z a-z)
|
||||||
|
else
|
||||||
|
kernel=$(lsb_release -d | awk -F ' ' '{print $2}'| tr A-Z a-z)
|
||||||
|
version=$(lsb_release -r | awk -F ' ' '{print $2}')
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ X"$kernel" == X"euleros" ]; then
|
||||||
|
dist_version="EULER"
|
||||||
|
elif [ X"$kernel" == X"centos" ]; then
|
||||||
|
dist_version="CENTOS"
|
||||||
|
elif [ X"$kernel" == X"openeuler" ]; then
|
||||||
|
dist_version="OPENEULER"
|
||||||
|
else
|
||||||
|
echo "We only support EulerOS, OPENEULER(aarch64) and CentOS platform."
|
||||||
|
echo "Kernel is $kernel"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
NOTICE_FILE='Copyright Notice.doc'
|
||||||
|
|
||||||
|
plat=$(uname -p)
|
||||||
|
if [ x$kernel$version$plat != x"eulerossp5x86_64" ] && [ x$kernel$version$plat != x"eulerossp8aarch64" ] && [ x$kernel$version$plat != x"eulerossp2x86_64" ]
|
||||||
|
then
|
||||||
|
echo "Only support to build unixODBC on EulerOS_SP5_x86_64 and EulerOS_SP8_aarch64"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
##default install version storage path
|
||||||
|
declare mppdb_version='GaussDB Kernel'
|
||||||
|
declare mppdb_name_for_package="$(echo ${mppdb_version} | sed 's/ /-/g')"
|
||||||
|
declare version_number='V500R001C20'
|
||||||
|
#######################################################################
|
||||||
|
## print help information
|
||||||
|
#######################################################################
|
||||||
|
function print_help()
|
||||||
|
{
|
||||||
|
echo "Usage: $0 [OPTION]
|
||||||
|
-h|--help show help information.
|
||||||
|
-bd|--serverlib_dir the directory of sever binarylibs.
|
||||||
|
"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ $# = 0 ] ; then
|
||||||
|
echo "missing option"
|
||||||
|
print_help
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
######################################################################
|
|
||||||
# Parameter setting
|
|
||||||
######################################################################
|
|
||||||
LOCAL_PATH=${0}
|
LOCAL_PATH=${0}
|
||||||
FIRST_CHAR=$(expr substr "$LOCAL_PATH" 1 1)
|
FIRST_CHAR=$(expr substr "$LOCAL_PATH" 1 1)
|
||||||
if [ "$FIRST_CHAR" = "/" ]; then
|
if [ "$FIRST_CHAR" = "/" ]; then
|
||||||
@ -13,30 +86,54 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
LOCAL_DIR=$(dirname "${LOCAL_PATH}")
|
LOCAL_DIR=$(dirname "${LOCAL_PATH}")
|
||||||
BUILD_OPTION=
|
#########################################################################
|
||||||
TAR_FILE_NAME=unixODBC-2.3.6.tar.gz
|
##read command line paramenters
|
||||||
SOURCE_CODE_PATH=unixODBC-2.3.6
|
#######################################################################
|
||||||
LOG_FILE=${LOCAL_DIR}/build_PSQLODBC.log
|
while [ $# -gt 0 ]; do
|
||||||
BUILD_FAILED=1
|
case "$1" in
|
||||||
|
-h|--help)
|
||||||
|
print_help
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
-bd|--serverlib_dir)
|
||||||
|
if [ "$2"X = X ]; then
|
||||||
|
echo "no given binarylib directory values"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
serverlib_dir=$2
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Internal Error: option processing error: $1" 1>&2
|
||||||
|
echo "please input right paramtenter, the following command may help you"
|
||||||
|
echo "./mpp_package.sh --help or ./mpp_package.sh -h"
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
## print help information
|
## declare all package name
|
||||||
#######################################################################
|
#######################################################################
|
||||||
function print_help()
|
declare version_string="${mppdb_name_for_package}-${version_number}"
|
||||||
{
|
declare package_pre_name="${version_string}-${dist_version}-${PLATFORM}bit"
|
||||||
echo "Usage: $0 [OPTION]
|
declare odbc_package_name="${package_pre_name}-Odbc.${install_package_format}.gz"
|
||||||
-h|--help show help information
|
declare windows_odbc_package_name="${version_string}-Windows-Odbc.tar.gz"
|
||||||
-m|--build_option provode the path of GAUSSHOME
|
|
||||||
"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
echo "[makeodbc] $(date +%y-%m-%d' '%T): script dir : ${LOCAL_DIR}"
|
||||||
|
declare LOG_FILE="${LOCAL_DIR}/build.log"
|
||||||
|
declare BUILD_DIR="${LOCAL_DIR}/tmp_odbc"
|
||||||
|
declare ODBC_INSTALL_DIR="${BUILD_DIR}/odbc"
|
||||||
|
declare ERR_MKGS_FAILED=1
|
||||||
|
declare MKGS_OK=0
|
||||||
|
|
||||||
if [ $# = 0 ] ; then
|
SERVERLIBS_PATH="${serverlib_dir}"
|
||||||
log "missing option"
|
|
||||||
print_help
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
###################################
|
||||||
|
# build parameter about enable-llt
|
||||||
|
##################################
|
||||||
|
COMPLIE_TYPE="comm"
|
||||||
|
echo "[makeodbc] $(date +%y-%m-%d' '%T): Work root dir : ${LOCAL_DIR}"
|
||||||
|
UNIX_ODBC="${LOCAL_DIR}/third_party/unixodbc/install_comm/unixODBC-2.3.9"
|
||||||
#######################################################################
|
#######################################################################
|
||||||
# Print log.
|
# Print log.
|
||||||
#######################################################################
|
#######################################################################
|
||||||
@ -53,89 +150,146 @@ die()
|
|||||||
{
|
{
|
||||||
log "$@"
|
log "$@"
|
||||||
echo "$@"
|
echo "$@"
|
||||||
exit $BUILD_FAILED
|
exit $ERR_MKGS_FAILED
|
||||||
|
}
|
||||||
|
|
||||||
|
function clean_environment()
|
||||||
|
{
|
||||||
|
if [ -d "$BUILD_DIR" ]; then
|
||||||
|
rm -rf "$BUILD_DIR"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$LOG_FILE" ]; then
|
||||||
|
rm -rf "$LOG_FILE"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "clean completely"
|
||||||
}
|
}
|
||||||
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
# build and install component
|
##install odbc
|
||||||
#######################################################################
|
#######################################################################
|
||||||
function build_component()
|
function install_odbc()
|
||||||
{
|
{
|
||||||
|
echo "Begin make odbc..." >> "$LOG_FILE" 2>&1
|
||||||
|
|
||||||
cd ${LOCAL_DIR}/third_party/unixodbc/
|
cd ${LOCAL_DIR}/third_party/unixodbc/
|
||||||
sh ./build_unixodbc.sh -m build >> "$LOG_FILE" 2>&1
|
sh ./build_unixodbc.sh -m build >> "$LOG_FILE" 2>&1
|
||||||
cd ${LOCAL_DIR}
|
cd ${LOCAL_DIR}
|
||||||
|
|
||||||
export GAUSSHOME=$BUILD_OPTION
|
export GAUSSHOME=$SERVERLIBS_PATH
|
||||||
export LD_LIBRARY_PATH=$BUILD_OPTION/lib:$LD_LIBRARY_PATH
|
export LD_LIBRARY_PATH=$SERVERLIBS_PATH/lib:$LD_LIBRARY_PATH
|
||||||
|
|
||||||
log "[Notice] PSQLODBC configure string: ./configure CFLAGS='-fstack-protector-all -Wl,-z,relro,-z,now -Wl,-z,noexecstack -fPIC' --prefix=`pwd`/install --with-libpq=$BUILD_OPTION --with-unixodbc=./third_party/unixodbc/install_comm/unixODBC-2.3.6/"
|
if [ "$version_mode"x == "memcheck"x ]; then
|
||||||
./configure CFLAGS='-fstack-protector-all -Wl,-z,relro,-z,now -Wl,-z,noexecstack -fPIC' --prefix=`pwd`/install --with-libpq=$BUILD_OPTION --with-unixodbc=./third_party/unixodbc/install_comm/unixODBC-2.3.6/ >> "$LOG_FILE" 2>&1
|
export LIBS="-lrt -ldl -lm -lpthread -lasan"
|
||||||
|
fi
|
||||||
|
|
||||||
|
./configure CFLAGS='-fstack-protector-all -Wl,-z,relro,-z,now -Wl,-z,noexecstack -fPIC' --prefix=${ODBC_INSTALL_DIR} --with-libpq=${SERVERLIBS_PATH} --with-unixodbc=${UNIX_ODBC} >> "$LOG_FILE" 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
die "configure odbc failed."
|
||||||
|
fi
|
||||||
|
|
||||||
log "[Notice] PSQLODBC Begin make"
|
|
||||||
make -sj >> "$LOG_FILE" 2>&1
|
make -sj >> "$LOG_FILE" 2>&1
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
die "PSQLODBC make failed."
|
die "make odbc failed."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
log "[Notice] PSQLODBC Begin make install"
|
|
||||||
make install -sj >> "$LOG_FILE" 2>&1
|
make install -sj >> "$LOG_FILE" 2>&1
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
die "[Error] PSQLODBC make install failed."
|
die "make install odbc failed."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
make clean >> "$LOG_FILE" 2>&1
|
echo "End make odbc" >> "$LOG_FILE" 2>&1
|
||||||
|
|
||||||
log "[Notice] PSQLODBC Begin make package"
|
|
||||||
mv ${LOCAL_DIR}/install ${LOCAL_DIR}/odbc
|
|
||||||
rm -rf ${LOCAL_DIR}/lib
|
|
||||||
mkdir ${LOCAL_DIR}/lib
|
|
||||||
|
|
||||||
#copy libraries into lib
|
|
||||||
cp $BUILD_OPTION/lib/libpq* ${LOCAL_DIR}/lib
|
|
||||||
cp $BUILD_OPTION/lib/libssl* ${LOCAL_DIR}/lib
|
|
||||||
cp $BUILD_OPTION/lib/libcrypto* ${LOCAL_DIR}/lib
|
|
||||||
cp $BUILD_OPTION/lib/libgssapi_krb5_gauss* ${LOCAL_DIR}/lib
|
|
||||||
cp $BUILD_OPTION/lib/libgssrpc_gauss* ${LOCAL_DIR}/lib
|
|
||||||
cp $BUILD_OPTION/lib/libkrb5_gauss* ${LOCAL_DIR}/lib
|
|
||||||
cp $BUILD_OPTION/lib/libkrb5support_gauss* ${LOCAL_DIR}/lib
|
|
||||||
cp $BUILD_OPTION/lib/libk5crypto_gauss* ${LOCAL_DIR}/lib
|
|
||||||
cp $BUILD_OPTION/lib/libconfig* ${LOCAL_DIR}/lib
|
|
||||||
cp $BUILD_OPTION/lib/libpgport_tool* ${LOCAL_DIR}/lib
|
|
||||||
cp $BUILD_OPTION/lib/libcom_err_gauss* ${LOCAL_DIR}/lib
|
|
||||||
|
|
||||||
cp ./third_party/unixodbc/install_comm/unixODBC-2.3.6/lib/libodbcinst* ${LOCAL_DIR}/lib
|
|
||||||
|
|
||||||
tar -czvf openGauss-1.0.0-ODBC.tar.gz ./lib ./odbc
|
|
||||||
|
|
||||||
rm -rf ${LOCAL_DIR}/lib
|
|
||||||
|
|
||||||
log "[Notice] PSQLODBC has been finished"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
##########################################################################
|
declare package_command
|
||||||
#read command line paramenters
|
#######################################################################
|
||||||
##########################################################################
|
##select package command accroding to install_package_format
|
||||||
while [ $# -gt 0 ]; do
|
#######################################################################
|
||||||
case "$1" in
|
function select_package_command()
|
||||||
-h|--help)
|
{
|
||||||
print_help
|
case "$install_package_format" in
|
||||||
exit 1
|
tar)
|
||||||
;;
|
tar='tar'
|
||||||
-m|--build_option)
|
option=' -zcvf'
|
||||||
if [ "$2"X = X ];then
|
package_command="$tar$option"
|
||||||
die "no given path of GAUSSHOME"
|
;;
|
||||||
fi
|
rpm)
|
||||||
BUILD_OPTION=$2
|
rpm='rpm'
|
||||||
shift 2
|
option=' -i'
|
||||||
;;
|
package_command="$rpm$option"
|
||||||
*)
|
;;
|
||||||
log "Internal Error: option processing error: $1" 1>&2
|
|
||||||
log "please input right paramtenter, the following command may help you"
|
|
||||||
log "./build.sh --help or ./build.sh -h"
|
|
||||||
exit 1
|
|
||||||
esac
|
esac
|
||||||
done
|
}
|
||||||
|
|
||||||
build_component
|
###############################################################
|
||||||
|
## copy the target to set path
|
||||||
|
###############################################################
|
||||||
|
function target_file_copy()
|
||||||
|
{
|
||||||
|
rm -rf ${BUILD_DIR}/lib
|
||||||
|
mkdir ${BUILD_DIR}/lib
|
||||||
|
|
||||||
|
#copy libraries into lib
|
||||||
|
cp $SERVERLIBS_PATH/lib/libpq* ${BUILD_DIR}/lib
|
||||||
|
cp $SERVERLIBS_PATH/lib/libssl* ${BUILD_DIR}/lib
|
||||||
|
cp $SERVERLIBS_PATH/lib/libcrypto* ${BUILD_DIR}/lib
|
||||||
|
cp $SERVERLIBS_PATH/lib/libgssapi_krb5_gauss* ${BUILD_DIR}/lib
|
||||||
|
cp $SERVERLIBS_PATH/lib/libgssrpc_gauss* ${BUILD_DIR}/lib
|
||||||
|
cp $SERVERLIBS_PATH/lib/libkrb5_gauss* ${BUILD_DIR}/lib
|
||||||
|
cp $SERVERLIBS_PATH/lib/libkrb5support_gauss* ${BUILD_DIR}/lib
|
||||||
|
cp $SERVERLIBS_PATH/lib/libk5crypto_gauss* ${BUILD_DIR}/lib
|
||||||
|
cp $SERVERLIBS_PATH/lib/libconfig* ${BUILD_DIR}/lib
|
||||||
|
cp $SERVERLIBS_PATH/lib/libpgport_tool* ${BUILD_DIR}/lib
|
||||||
|
cp $SERVERLIBS_PATH/lib/libcom_err_gauss* ${BUILD_DIR}/lib
|
||||||
|
|
||||||
|
cp $LOCAL_DIR/third_party/unixodbc/install_comm/unixODBC-2.3.9/lib/libodbcinst* ${BUILD_DIR}/lib
|
||||||
|
}
|
||||||
|
|
||||||
|
#######################################################################
|
||||||
|
##function make_package have tree actions
|
||||||
|
##1.copy target file into a newly created temporary directory temp
|
||||||
|
##2.package all file in the temp directory and renome to destination package_path
|
||||||
|
#######################################################################
|
||||||
|
function make_package()
|
||||||
|
{
|
||||||
|
cd ${BUILD_DIR}
|
||||||
|
|
||||||
|
target_file_copy
|
||||||
|
select_package_command
|
||||||
|
cp ${LOCAL_DIR}/"${NOTICE_FILE}" ./
|
||||||
|
|
||||||
|
echo "packaging odbc..."
|
||||||
|
$package_command "${odbc_package_name}" ./lib ./odbc "${NOTICE_FILE}" >>"$LOG_FILE" 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
die "$package_command ${odbc_package_name} failed"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mv ${odbc_package_name} ${BUILD_DIR}/
|
||||||
|
|
||||||
|
echo "install odbc tools is ${odbc_package_name} of ${BUILD_DIR} directory " >> "$LOG_FILE" 2>&1
|
||||||
|
echo "success!"
|
||||||
|
}
|
||||||
|
|
||||||
|
#############################################################
|
||||||
|
# main function
|
||||||
|
#############################################################
|
||||||
|
|
||||||
|
# 1. build odbc
|
||||||
|
install_odbc
|
||||||
|
|
||||||
|
# 2. make odbc package
|
||||||
|
make_package
|
||||||
|
|
||||||
|
# 3. cp odbc package to output
|
||||||
|
mkdir ${LOCAL_DIR}/output
|
||||||
|
mv ${BUILD_DIR}/*.tar.gz ${LOCAL_DIR}/output/
|
||||||
|
|
||||||
|
# 4. clean environment
|
||||||
|
echo "clean enviroment"
|
||||||
|
echo "[makemppdb] $(date +%y-%m-%d' '%T): remove ${BUILD_DIR}" >>"$LOG_FILE" 2>&1
|
||||||
|
clean_environment
|
||||||
|
|
||||||
|
echo "now, odbc package has finished!"
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
44
third_party/unixodbc/build_unixodbc.sh
vendored
44
third_party/unixodbc/build_unixodbc.sh
vendored
@ -1,5 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# description: the script that make install unixODBC
|
#######################################################################
|
||||||
|
# Copyright (c): 2020-2025, Huawei Tech. Co., Ltd.
|
||||||
|
# descript: Compile and pack MPPDB
|
||||||
|
# Return 0 means OK.
|
||||||
|
# Return 1 means failed.
|
||||||
|
# version: 2.0
|
||||||
|
# date: 2020-08-09
|
||||||
|
#######################################################################
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# Parameter setting
|
# Parameter setting
|
||||||
@ -15,8 +22,8 @@ fi
|
|||||||
LOCAL_DIR=$(dirname "${LOCAL_PATH}")
|
LOCAL_DIR=$(dirname "${LOCAL_PATH}")
|
||||||
CONFIG_FILE_NAME=config.ini
|
CONFIG_FILE_NAME=config.ini
|
||||||
BUILD_OPTION=release
|
BUILD_OPTION=release
|
||||||
TAR_FILE_NAME=unixODBC-2.3.6.tar.gz
|
TAR_FILE_NAME=unixODBC-2.3.9.tar.gz
|
||||||
SOURCE_CODE_PATH=unixODBC-2.3.6
|
SOURCE_CODE_PATH=unixODBC-2.3.9
|
||||||
LOG_FILE=${LOCAL_DIR}/build_unixODBC.log
|
LOG_FILE=${LOCAL_DIR}/build_unixODBC.log
|
||||||
BUILD_FAILED=1
|
BUILD_FAILED=1
|
||||||
|
|
||||||
@ -78,13 +85,21 @@ INSTALL_COMPOENT_PATH_NAME="${ROOT_DIR}/${COMPONENT_TYPE}/${COMPONENT_NAME}"
|
|||||||
function build_component()
|
function build_component()
|
||||||
{
|
{
|
||||||
cd ${LOCAL_DIR}
|
cd ${LOCAL_DIR}
|
||||||
|
rm -rf ${TAR_FILE_NAME%.tar.gz}
|
||||||
|
rm -rf ${TAR_FILE_NAME}
|
||||||
|
cp ${TAR_FILE_NAME%.tar.gz}.file ${TAR_FILE_NAME}
|
||||||
tar -xvf ${TAR_FILE_NAME}
|
tar -xvf ${TAR_FILE_NAME}
|
||||||
|
|
||||||
cd ${LOCAL_DIR}/${SOURCE_CODE_PATH}
|
cd ${LOCAL_DIR}/${SOURCE_CODE_PATH}
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
die "[Error] change dir to $SRC_DIR failed."
|
die "[Error] change dir to $SRC_DIR failed."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
log "[Notice] start autoreconf."
|
||||||
|
autoreconf -fi
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
die "[Error] autoreconf failed, please install libtool and libtool-ltdl-devel."
|
||||||
|
fi
|
||||||
chmod +x configure
|
chmod +x configure
|
||||||
for COMPILE_TYPE in ${COMPLIE_TYPE_LIST}
|
for COMPILE_TYPE in ${COMPLIE_TYPE_LIST}
|
||||||
do
|
do
|
||||||
@ -96,9 +111,9 @@ function build_component()
|
|||||||
die "[Error] unixODBC not supported build type."
|
die "[Error] unixODBC not supported build type."
|
||||||
;;
|
;;
|
||||||
comm)
|
comm)
|
||||||
mkdir -p ${LOCAL_DIR}/install_comm/unixODBC-2.3.6
|
mkdir -p ${LOCAL_DIR}/install_comm/unixODBC-2.3.9
|
||||||
log "[Notice] unixODBC configure string: ./configure CFLAGS='-fstack-protector-all -Wl,-z,relro,-z,now -Wl,-z,noexecstack -fPIC' --enable-gui=no --prefix=${LOCAL_DIR}/install_comm"
|
log "[Notice] unixODBC configure string: ./configure CFLAGS='-fstack-protector-all -Wl,-z,relro,-z,now -Wl,-z,noexecstack -fPIC -fPIE -pie' --enable-gui=no --prefix=${LOCAL_DIR}/install_comm"
|
||||||
./configure CFLAGS='-fstack-protector-all -Wl,-z,relro,-z,now -Wl,-z,noexecstack -fPIC' --enable-gui=no --prefix=${LOCAL_DIR}/install_comm/unixODBC-2.3.6
|
./configure CFLAGS='-fstack-protector-all -Wl,-z,relro,-z,now -Wl,-z,noexecstack -fPIC -fPIE -pie' --enable-gui=no --prefix=${LOCAL_DIR}/install_comm/unixODBC-2.3.9
|
||||||
;;
|
;;
|
||||||
release_llt)
|
release_llt)
|
||||||
die "[Error] unixODBC not supported build type."
|
die "[Error] unixODBC not supported build type."
|
||||||
@ -119,8 +134,21 @@ function build_component()
|
|||||||
die "[Error] unixODBC configure failed."
|
die "[Error] unixODBC configure failed."
|
||||||
fi
|
fi
|
||||||
log "[Notice] unixODBC End configure"
|
log "[Notice] unixODBC End configure"
|
||||||
|
|
||||||
|
log "[Notice] disable rpath"
|
||||||
|
|
||||||
log "[Notice] unixODBC using \"${COMPILE_TYPE}\" Begin make"
|
sed -i 's/runpath_var=LD_RUN_PATH/runpath_var=""/g' ./libtool
|
||||||
|
sed -i 's/hardcode_libdir_flag_spec="\\\${wl}-rpath \\\${wl}\\\$libdir"/hardcode_libdir_flag_spec=""/g' ./libtool
|
||||||
|
|
||||||
|
PLAT_FORM_STR=`uname -p`
|
||||||
|
|
||||||
|
if [ "${PLAT_FORM_STR}"X = "aarch64"X ]
|
||||||
|
then
|
||||||
|
sed -i "250c runpath_var=" libtool
|
||||||
|
sed -i "385c hardcode_libdir_flag_spec=" libtool
|
||||||
|
fi
|
||||||
|
|
||||||
|
log "[Notice] unixODBC using \"${COMPILE_TYPE}\" Begin make"
|
||||||
make -sj
|
make -sj
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
die "unixODBC make failed."
|
die "unixODBC make failed."
|
||||||
|
BIN
third_party/unixodbc/unixODBC-2.3.6.tar.gz
vendored
BIN
third_party/unixodbc/unixODBC-2.3.6.tar.gz
vendored
Binary file not shown.
BIN
third_party/unixodbc/unixODBC-2.3.9.tar.gz
vendored
Normal file
BIN
third_party/unixodbc/unixODBC-2.3.9.tar.gz
vendored
Normal file
Binary file not shown.
Reference in New Issue
Block a user