1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

[MCOL-69] - improve build process

Add .gitignore file to omit autoconf artificats
Modify bootstrap to:
  No longer copy binaries into export
  Create export/mysql directory properly
  Check for errors when generating version header
  Run configure
  Check for errors when running configure
Modify genVersion.h to:
  Place versionnumber.h into dbcon/mysql, the only place it appears to be used
  It was being generated in the install prefix, thus when using a non-user
    path like /usr/local/PREFIX it would fail to generate the version number
    header, because the user compiling the software does not have write
    permission.  This necessitated building as root, this will resolve that.
Remove config.log, an autotools artifact
Add autoconf templates for mcsadmin
This commit is contained in:
Justin Swanhart
2016-05-27 09:47:39 -04:00
parent 873111ce3f
commit a812a76e8d
7 changed files with 719 additions and 5101 deletions

View File

@ -6,19 +6,31 @@
# following a git checkout. It copies static files and shared include
# files to the export tree prior to building the software.
mkdir -p export/{include,lib,etc,share,bin,sbin,post}
mkdir -p export/{include,lib,etc,share,bin,sbin,post,mysql}
if [ ! $$ ]; then
exit 1
fi
cp build/gdb export/bin
cp build/libgcc_s.so.1 export/lib
cp build/libstdc++.so.6.0.14 export/lib
#TODO: these prebuilt binaries may need to be fetched
#and built as dependencies
cp build/files.lst $HOME/mariadb-columnstore-server/export/mysql/.
cp dbcon/mysql/install_calpont_mysql.sh $HOME/mariadb-columnstore-server/export/mysql/.
cp dbcon/mysql/my.cnf $HOME/mariadb-columnstore-server/export/mysql/.
cp dbcon/mysql/mysql-Columnstore $HOME/mariadb-columnstore-server/export/mysql/.
#cp build/gdb export/bin
#cp build/libgcc_s.so.1 export/lib
#cp build/libstdc++.so.6.0.14 export/lib
#FIXME rename this
cp dbcon/mysql/install_calpont_mysql.sh export/mysql/
#TODO: see if this my.cnf is necessary
cp dbcon/mysql/my.cnf export/mysql/.
#TODO: the init.d service file should not be mixed case
#TODO: the init.d service file should not contain calpont
cp dbcon/mysql/mysql-Columnstore export/mysql/ && \
cp build/files.lst export/mysql/ && \
cp dbcon/mysql/install_calpont_mysql.sh export/mysql/ && \
cp dbcon/mysql/my.cnf export/mysql/ && \
cp dbcon/mysql/mysql-Columnstore export/mysql/
if [ ! $$ ]; then
exit 1
@ -26,29 +38,45 @@ fi
cp -p -r utils/net-snmp export/include
if [ `uname -m` == "x86_64" ]; then
cp -p utils/net-snmp-built-libs/lib64/* export/lib
cp -p utils/net-snmp-built-libs/bin64/* export/sbin
else
egrep -qs Constantine /etc/redhat-release
if [ $? -eq 0 ]; then
cp -p utils/net-snmp-built-libs/fc12lib/libnetsnmp*.so.* export/lib
cp -p utils/net-snmp-built-libs/fc12bin/* export/sbin
else
cp -p utils/net-snmp-built-libs/fc6lib/libnetsnmp*.so.* export/lib
cp -p utils/net-snmp-built-libs/fc6bin/* export/sbin
fi
fi
#FIXME:
# This has to be terribly broken, especially for 32 bit
# platforms. There should be no PRE-BUILT tools in someting
# that is being built. If we need a custom compilation of
# net-snmp for some reason then we will have to BUILD IT
# as part of the bootstrap process.
# I am commenting this out to see exactly what breaks in the build
# process.
## if [ `uname -m` == "x86_64" ]; then
## cp -p utils/net-snmp-built-libs/lib64/* export/lib
## cp -p utils/net-snmp-built-libs/bin64/* export/sbin
## else
## egrep -qs Constantine /etc/redhat-release
## if [ $? -eq 0 ]; then
## cp -p utils/net-snmp-built-libs/fc12lib/libnetsnmp*.so.* export/lib
## cp -p utils/net-snmp-built-libs/fc12bin/* export/sbin
## else
## cp -p utils/net-snmp-built-libs/fc6lib/libnetsnmp*.so.* export/lib
## cp -p utils/net-snmp-built-libs/fc6bin/* export/sbin
## fi
## fi
pushd export/lib >/dev/null
for lib in libnetsnmpagent.so libnetsnmphelpers.so libnetsnmpmibs.so libnetsnmp.so libnetsnmptrapd.so; do
rm -f ${lib} ${lib}.5
ln -s ${lib}.5.2.1 ${lib}.5
ln -s ${lib}.5.2.1 ${lib}
done
popd >/dev/null
## pushd export/lib >/dev/null
## for lib in libnetsnmpagent.so libnetsnmphelpers.so libnetsnmpmibs.so libnetsnmp.so libnetsnmptrapd.so; do
## rm -f ${lib} ${lib}.5
## ln -s ${lib}.5.2.1 ${lib}.5
## ln -s ${lib}.5.2.1 ${lib}
## done
## popd >/dev/null
./build/genVersion.sh
if [ ! $$ ]; then
exit 1
fi
./configure
if [ ! $$ ]; then
exit 1
fi
for x in \
$(find . -name '[mM]akefile' \

View File

@ -38,12 +38,12 @@ echo "
const std::string idb_version(\"$version\");
const std::string idb_release(\"$release\");
#endif
" > ${prefix}/include/versionnumber.h.tmp
" > dbcon/mysql/versionnumber.h.tmp
diff -bBq ${prefix}/include/versionnumber.h.tmp ${prefix}/include/versionnumber.h >/dev/null 2>&1
diff -bBq dbcon/mysql/versionnumber.h.tmp dbcon/mysql/versionnumber.h >/dev/null 2>&1
if [ $? -ne 0 ]; then
cp ${prefix}/include/versionnumber.h.tmp ${prefix}/include/versionnumber.h
cp dbcon/mysql/versionnumber.h.tmp dbcon/mysql/versionnumber.h
fi
rm -f ${prefix}/include/versionnumber.h.tmp
rm -f dbcon/mysql/versionnumber.h.tmp