Cleaned up libraries

This commit is contained in:
WolverinDEV
2019-10-13 18:52:17 +02:00
parent 78837254c8
commit ead7000e87
28 changed files with 89 additions and 314 deletions
+3 -4
View File
@@ -44,10 +44,6 @@
[submodule "libraries/breakpad"]
path = libraries/breakpad
url = https://chromium.googlesource.com/breakpad/breakpad
[submodule "libraries/mysqlconnector"]
path = libraries/mysqlconnector
url = https://github.com/mysql/mysql-connector-cpp.git
checkout = 8.0.12
[submodule "libraries/boringssl"]
path = libraries/boringssl
url = https://boringssl.googlesource.com/boringssl
@@ -65,3 +61,6 @@
[submodule "Web-Client"]
path = Web-Client
url = https://github.com/TeaSpeak/TeaWeb.git
[submodule "build-helpers"]
path = build-helpers
url = https://github.com/WolverinDEV/build-helpers.git
Vendored
+10 -4
View File
@@ -32,13 +32,16 @@ pipeline {
when {
expression { params.target == "x64_debug" || params.target == "x64_release" || params.target == "x64_stable" }
}
environment {
build_os_type="linux"
build_os_type="x64"
}
stages {
/* first of all we have to update our libraries */
stage ('libraries::update') {
steps {
sh 'git reset --hard origin/master;'
sh 'git submodule update --merge'
sh './attach_modules.sh'
}
}
@@ -161,13 +164,16 @@ pipeline {
when {
expression { params.target == "x86_debug" || params.target == "x86_release" || params.target == "x86_stable" }
}
environment {
build_os_type="linux"
build_os_type="x86"
}
stages {
/* first of all we have to update our libraries */
stage ('libraries::update') {
steps {
sh 'git reset --hard origin/master;'
sh 'git submodule update --merge'
sh './attach_modules.sh'
}
}
-209
View File
@@ -1,209 +0,0 @@
`pipeline {
agent any
parameters {
booleanParam(defaultValue: false, description: 'Enabled/disables the building of an optimized build', name: 'build_optimized')
booleanParam(defaultValue: true, description: 'Build the libraries as well', name: 'build_libraries')
booleanParam(defaultValue: true, description: 'Deploy this build', name: 'deploy_build')
choice(choices: ['all', 'x86_debug', 'x64_debug', 'x64_release'], description: 'Which target do you want to build?', name: 'target')
}
environment {
//General flags
CXX_FLAGS = ''
C_FLAGS = ''
//CMake specific flags
CMAKE_OPTIONS = ''
CMAKE_MAKE_OPTIONS = '-j 12'
//Make specific flags
MAKE_OPTIONS = '-j 12'
}
stages {
stage ('build') {
parallel {
stage ('build::x86::debug') {
agent {
label 'linux && x84 && teaspeak'
}
when {
expression { params.target == "" || params.target == "all" || params.target == "x86_debug" }
}
stages {
stage ('build::x86::debug::libraries') {
stages {
stage ('build::x86::debug::libraries::update') {
steps {
sh 'git reset --hard origin/master; git submodule update --init --remote --recursive --force'
sh 'git submodule update --merge'
sh './attach_modules.sh'
}
}
stage ('build::x86::debug::libraries::build') {
when {
expression { params.build_libraries }
}
environment {
CMAKE_BUILD_TYPE="Debug"
}
steps {
sh 'cd libraries; ./build.sh'
}
}
}
}
stage ('build::x86::debug') {
environment {
TEASPEAK_BUILD_TYPE="Debug"
}
environment {
CMAKE_BUILD_TYPE="Debug"
}
stages {
stage ('build::x86::debug::build') {
steps {
sh './build_teaspeak.sh'
}
}
stage ('build::x86::debug::deploy') {
when {
expression { params.deploy_build }
}
steps {
sh 'cd TeaSpeak/server/repro/; chmod 400 build_private_key; ./build.sh linux/x86'
}
}
}
}
}
}
stage ('build::amd64::debug') {
agent {
label 'linux && amd64 && teaspeak'
}
when {
expression { params.target == "" || params.target == "all" || params.target == "x64_debug" }
}
stages {
stage ('build::amd64::debug::libraries') {
stages {
stage ('build::amd64::debug::libraries::update') {
steps {
sh 'git reset --hard origin/master; git submodule update --init --remote --recursive --force'
sh 'git submodule update --merge'
sh './attach_modules.sh'
}
}
stage ('build::amd64::debug::libraries::build') {
when {
expression { params.build_libraries }
}
environment {
CMAKE_BUILD_TYPE="Debug"
}
steps {
sh 'cd libraries; ./build.sh'
}
}
}
}
stage ('build::amd64::debug::build') {
environment {
TEASPEAK_BUILD_TYPE="Debug"
CMAKE_BUILD_TYPE="Debug"
}
steps {
sh './build_teaspeak.sh'
}
}
stage ('build::amd64::debug::deploy') {
when {
expression { params.deploy_build }
}
steps {
sh 'cd TeaSpeak/server/repro/; chmod 400 build_private_key; ./build.sh linux/amd64'
}
}
}
}
stage ('build::amd64::release::deploy') {
when {
expression { params.target == "all" || params.target == "x64_release" || params.build_optimized }
}
agent {
label 'linux && amd64 && teaspeak'
}
stages {
stage ('build::amd64::release::libraries') {
stages {
stage ('build::amd64::release::libraries::update') {
steps {
sh 'git reset --hard origin/master; git submodule update --init --remote --recursive --force'
sh 'git submodule update --merge'
sh './attach_modules.sh'
}
}
stage ('build::amd64::release::libraries::build') {
when {
expression { params.build_libraries }
}
environment {
CMAKE_BUILD_TYPE="RelWithDebInfo"
}
steps {
sh 'cd libraries; ./build.sh'
}
}
}
}
stage ('build::amd64::release::build') {
environment {
TEASPEAK_BUILD_TYPE="Release"
CMAKE_BUILD_TYPE="RelWithDebInfo"
}
steps {
sh './build_teaspeak.sh'
}
}
stage ('build::amd64::release::deploy') {
when {
expression { params.deploy_build }
}
steps {
sh 'cd TeaSpeak/server/repro/; chmod 400 build_private_key; ./build.sh linux/amd64_optimized'
}
}
}
}
}
}
}
}
+10 -17
View File
@@ -2,24 +2,17 @@
#General modules should be set to their versions
git reset --hard
git submodule foreach -q --recursive 'git reset --hard'
git submodule update --init --recursive --force
#git submodule foreach -q --recursive 'git reset --hard'
#git submodule update --init --recursive --force
#git submodule update --init --remote --recursive --force TeaSpeak
#The libs have no need to be attach to the master :)
cd TeaSpeak
echo "Resetting TeaSpeak submodule"
git reset --hard origin/head
git pull origin master
echo "Building TeaSpeak at version $(git rev-parse HEAD)"
cd ..
git submodule update --init --remote --recursive --force
git submodule foreach -q --recursive '
echo "Updating $name";
BRANCH=$(git config -f $toplevel/.gitmodules submodule.$name.branch || echo master)
if [ -z ${BRANCH} ]; then
BRANCH="master"
fi
git checkout ${BRANCH};
echo "git pull origin ${BRANCH}"
git pull origin ${BRANCH}'
echo "uPDATING submodules"
git submodule update --init --recursive
[[ $? -ne 0 ]] && {
echo "Failed to update submodules. Aborting"
exit 1
}
Submodule
+1
Submodule build-helpers added at 0b83e74e2d
-20
View File
@@ -1,20 +0,0 @@
Improved (Fixed):
Tomcrypt
Tommath
Boringssl
DataPipes:
-DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}"
Libraries:
-DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:-Release}"
StringVariables:
ThreadPool
-DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}"
ED255:
EVENT:
JSONCPP:
MYSQLCONNECTOR:
PROTOBUF:
-DCMAKE_BUILD_TYPE=RelWithDebInfo
@@ -1 +0,0 @@
CMakeLists.txt not found in /home/wolverindev/TeaSpeak
+10 -4
View File
@@ -5,14 +5,20 @@ if [ ! -d lib ]; then
ln -s ../build/crypto/libcrypto.so .
cd ..
fi
cat include/openssl/opensslv.h | grep "OPENSSL_VERSION_NUMBER" &> /dev/null
cat include/openssl/opensslv.h | grep "OPENSSL_VERSION_TEXT" &> /dev/null
if [ $? -ne 0 ]; then
echo "#if false
echo '#if false
# define OPENSSL_VERSION_NUMBER 0x1010008fL
#endif" > include/openssl/opensslv.h
#define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1a 20 Nov 2018"
#endif' > include/openssl/opensslv.h
fi
cd build
sudo apt-get install golang-go
dpkg -s golang-go &>/dev/null
if [[ $? -ne 0 ]]; then
echo "Installing golang"
sudo apt-get install golang-go
fi
if [ "x86" == "${BUILD_ARCH_TARGET}" ]; then
echo "Build boring SSL in 32 bit mode!"
+10 -1
View File
@@ -1,5 +1,14 @@
cd breakpad/
git clone https://chromium.googlesource.com/linux-syscall-support src/third_party/lss
if [[ ! -d src/third_party/lss ]]; then
echo "Closing LSS into breakpad"
git clone https://chromium.googlesource.com/linux-syscall-support src/third_party/lss
[[ $? -ne 0 ]] && {
echo "Failed to close LSS. Abort"
exit 1
}
fi
cd build
../configure
make CXXFLAGS="-std=c++11 -I../../boringssl/include/ ${CXX_FLAGS}" CFLAGS="${C_FLAGS}" ${MAKE_OPTIONS}
+3 -4
View File
@@ -1,6 +1,5 @@
cd CXXTerminal/libraries/
./build_event.sh #TODO test status!
cd ../build/
cmake .. -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" -DCMAKE_C_FLAGS="${C_FLAGS}" -DCMAKE_BUILD_TYPE=RelWithDebInfo ${CMAKE_OPTIONS}
cd CXXTerminal/build/
event_path=$(realpath ../../event/build)
cmake .. -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" -DCMAKE_C_FLAGS="${C_FLAGS}" -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DNO_EMBETTED_LIBEVENT=1 -DLibevent_DIR=${event_path} ${CMAKE_OPTIONS}
make ${CMAKE_MAKE_OPTIONS}
sudo make install
+1 -1
View File
@@ -1,4 +1,4 @@
cd event/build/
cmake .. -DCMAKE_C_FLAGS="-fPIC -I../../boringssl/include/ ${C_FLAGS}" -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_OPENSSL=ON -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" -DCMAKE_BUILD_TYPE=RelWithDebInfo ${CMAKE_OPTIONS}
cmake .. -DCMAKE_C_FLAGS="-fPIC -I../../boringssl/include/ ${C_FLAGS}" -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_OPENSSL=ON -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" -DCMAKE_BUILD_TYPE=RelWithDebInfo ${CMAKE_OPTIONS}
make ${CMAKE_MAKE_OPTIONS}
sudo make install
+27 -18
View File
@@ -1,25 +1,37 @@
#!/bin/bash
cd jemalloc/
source ../build-helpers/build_helper.sh || { echo "Failed to include build helper script. Abort"; exit 1; }
library_path=jemalloc
requires_rebuild ${library_path}
[[ $? -eq 0 ]] && exit 0
# Generate the configure file
cd jemalloc
if ! [ -f configure ]; then
autoconf
if [ $? -ne 0 ]; then
echo "Failed to create configure file"
exit 1
fi
check_err_exit ${library_path} "Failed to create configure file"
if ! [ -f configure ]; then
echo "Failed to create configure file"
err_exit ${library_path} "Failed to create configure file"
exit 1
fi
fi
cd ..
cd build
../configure
if [ $? -ne 0 ]; then
echo "Failed to create makefile"
exit 1
# Generate the build environment
generate_build_path "${library_path}"
if [[ -d ${build_path} ]]; then
echo "Removing old build directory"
rm -rf ${build_path}
fi
mkdir -p ${build_path}
check_err_exit ${library_path} "Failed to create build directory"
cd ${build_path}
check_err_exit ${library_path} "Failed to enter build directory"
# Building jemalloc
../../configure
check_err_exit ${library_path} "Failed to create makefile"
(cat Makefile | sed 's/.*$(CC) $(DSO_LDFLAGS) $(call RPATH,$(RPATH_EXTRA)) $(LDTARGET) $+ $(LDFLAGS) $(LIBS) $(EXTRA_LDFLAGS).*/ $(CXX) $(DSO_LDFLAGS) $(call RPATH,$(RPATH_EXTRA)) $(LDTARGET) $+ $(LDFLAGS) $(LIBS) $(EXTRA_LDFLAGS)/') > tmp
rm Makefile
@@ -27,17 +39,14 @@ mv tmp Makefile
make build_lib_shared -j 12 LIBS="-pthread -static-libgcc -static-libstdc++ -fPIC" CFLAGS="-static-libgcc -static-libstdc++ -fPIC" CXXFLAGS="-static-libgcc -static-libstdc++ -fPIC"
#make -j 12 LIBS="-pthread -static-libgcc -static-libstdc++" CFLAGS="-fPIC" CXXFLAGS="-fPIC"
#make -j 12 LIBS="-pthread -lm -l/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a" ${MAKE_OPTIONS} CFLAGS="-shared -static-libstdc++ -static-libgcc -fPIC" CXXFLAGS="-static-libstdc++ -static-libgcc -shared -fPIC"
if [ $? -ne 0 ]; then
echo "Failed to build jemalloc"
exit 1
fi
check_err_exit ${library_path} "Failed to build jemalloc"
sudo make install &>/dev/null
if [ $? -ne 0 ]; then #Workaround because the install fails
exit 0
fi
#
cd ../../../
set_build_successful ${library_path}
#make -j 12 LIBS="-pthread -static-libgcc -static-libstdc++" CFLAGS="-fPIC" CXXFLAGS="-fPIC"
-16
View File
@@ -1,16 +0,0 @@
cd mysqlconnector
HEADER=$(cat cdk/foundation/connection_openssl.cc)
if ! [ "${HEADER:0:34}" == "#if !defined(SSL_ERROR_WANT_ASYNC)" ]; then
echo "Creating new one!"
echo "#if !defined(SSL_ERROR_WANT_ASYNC)
#define SSL_ERROR_WANT_ASYNC 0xFFEEDDCC
#endif
#if !defined(SSL_ERROR_WANT_ASYNC_JOB)
#define SSL_ERROR_WANT_ASYNC_JOB 0xFFEECCDD
#endif
`cat cdk/foundation/connection_openssl.cc`" > cdk/foundation/connection_openssl.cc
fi
cd build
cmake .. -DCMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++ -I../../boringssl/include/ ${CXX_FLAGS}" -DWITH_JDBC=ON -DWITH_SSL="`pwd`/../../boringssl/" -DOPENSSL_ROOT_DIR="`pwd`/../../boringssl/" -DCMAKE_C_FLAGS="${C_FLAGS}" -DCMAKE_BUILD_TYPE=RelWithDebInfo ${CMAKE_OPTIONS}
make ${CMAKE_MAKE_OPTIONS}
sudo make install
+1 -1
View File
@@ -1,5 +1,5 @@
cd protobuf
git checkout 3.5.1.1
# git checkout 3.5.1.1
cd build
cmake ../cmake/ -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_CXX_FLAGS="-std=c++11 -fPIC ${CXX_FLAGS}" -DCMAKE_C_FLAGS="${C_FLAGS}" -DCMAKE_BUILD_TYPE=RelWithDebInfo ${CMAKE_OPTIONS}
make ${CMAKE_MAKE_OPTIONS}