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

7
.gitmodules vendored
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

14
Jenkinsfile vendored
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'
}
}

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'
}
}
}
}
}
}
}
}

@ -1 +1 @@
Subproject commit 0a762eef7671c21984672b866058d15af5bd261f
Subproject commit e39f01bde548b083255ad650619de441361f9200

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
}

1
build-helpers Submodule

@ -0,0 +1 @@
Subproject commit 0b83e74e2df4b084d256ea3cea0be64e01ef6da3

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

View File

@ -1 +0,0 @@
CMakeLists.txt not found in /home/wolverindev/TeaSpeak

@ -1 +1 @@
Subproject commit d44e435f1ec8b130df5f9db2868e9abf94ddf9d2
Subproject commit 31c265f9d15a38689b213fc57f861caa01c2d83b

@ -1 +1 @@
Subproject commit f357bcfad87dfb25f0bc4941d41506b17ec6d576
Subproject commit 4f199d074580a6cf591b6300024c09f4e5101326

@ -1 +1 @@
Subproject commit b4b64d5b58b5fc2e51c66aca94022e7b8d21b613
Subproject commit 6613f642a0b78bd850c5774298e5b6c24a673545

@ -1 +1 @@
Subproject commit 30e8c6f36fe246aa8974c9b1748621b19b66c552
Subproject commit ec7b852f8e25c1e7d7f9d87c19ca7a8d9063a7aa

@ -1 +1 @@
Subproject commit fdb48f98612e934eab339b4871484b1c987553e2
Subproject commit 6f3e034fe58ce3bca3c1c32be6d603a6206c89af

@ -1 +1 @@
Subproject commit 948ce04ed74397331c158c13209fd2370c2dbd5a
Subproject commit db1cda26539c711c3da7ed4d410dfe8190e89b8f

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!"

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}

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

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

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"

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

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}

@ -1 +1 @@
Subproject commit f810597c6ce050233a7c499435c351d38777ef43
Subproject commit cab68d412f5a720587bce1a6be9f092da9400baa

@ -1 +1 @@
Subproject commit c3a6fe75e1511a4c7a7a6ef0a5954b1918902933
Subproject commit b32a644302baf534eb2ff1561041eeb5b97b9fd2

@ -1 +1 @@
Subproject commit 4c548a61c89b0472b9952fcc4090eb00c2a88870
Subproject commit 4094b7c03fb5e814f6f4c85ff7e93b3228dc4d29

@ -1 +1 @@
Subproject commit 2baad4923e6d9a7e09982cfa4b1c5fd0b67ebd87
Subproject commit 2e33c218cbd53b8d016e9230c2f600411b6146b8

@ -1 +0,0 @@
Subproject commit 7abcdc88c8235f02096e21b5bcd72e8312508f61

@ -1 +1 @@
Subproject commit 38fca4a203a6759f2c90b86c84c4db087982ca81
Subproject commit ad8fe90db79b7d2a135e3dfd2ed6631b0c5662ab

@ -1 +1 @@
Subproject commit 012269756149ae99745b6dafefd415843d7420bb
Subproject commit c9a00770241b6dfd5e68df4574cf488822cfef14