diff --git a/TeaSpeak b/TeaSpeak index 25dda4c..5a740e1 160000 --- a/TeaSpeak +++ b/TeaSpeak @@ -1 +1 @@ -Subproject commit 25dda4cb4cca9a569f6eb3c1d86eb45838d2dc7f +Subproject commit 5a740e1853417c12f1ded473e6fada6df9734903 diff --git a/build_nice.md b/build_nice.md index 783b986..48f43f6 100644 --- a/build_nice.md +++ b/build_nice.md @@ -75,7 +75,7 @@ cp -r glib/out/lib/ $prebuild_path ``` # Building libnice -Building boringssl +Building boringssl (not needed anymore!) ```shell script git clone https://boringssl.googlesource.com/boringssl && cd boringssl && \ git checkout 1cc95ac0 # This version does TeaSpeak use @@ -86,6 +86,30 @@ cmake . -DCMAKE_INSTALL_PREFIX=`pwd`/out -DOPENSSL_NO_ASM=ON -DCMAKE_CXX_FLAGS=" make -j`nproc --all` ``` +Building openssl +```shell script +[[ -z "${build_os_type}" ]] && export build_os_type=linux +[[ -z "${build_os_type}" ]] && export build_os_arch=amd64 + +git clone git://git.openssl.org/openssl.git && cd openssl && \ +git checkout OpenSSL_1_1_1-stable && \ +mkdir build && cd build && \ +../Configure --prefix=`pwd`/../out linux-x86_64 && \ +make -j32 && \ +make install && \ +cd .. + +# Update prebuild biraries +[[ ! -d openssl-prebuild ]] && git clone https://git.did.science/WolverinDEV/openssl-prebuild.git +cd openssl-prebuild && \ +if [[ ! -d "${build_os_type}_${build_os_arch}" ]]; then + mkdir "${build_os_type}_${build_os_arch}" || { echo "failed to create directory"; } +fi +cd "${build_os_type}_${build_os_arch}" && \ +rm -r * && \ +cp -r ../../openssl/out/* . +``` + Build libnice ```shell script [[ -z "${build_os_type}" ]] && export build_os_type=linux @@ -96,18 +120,20 @@ Build libnice export glib20_dir="`pwd`/../glibc-prebuild/${build_os_type}_${build_os_arch}/" export glib20_lib_path=$(realpath "$glib20_dir/lib/"*"/") export boringssl_path="`pwd`/../boringssl/" +export openssl_path="`pwd`/../openssl/out/" #pkg-config --static --cflags glib-2.0 := -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include #pkg-config --static --libs glib-2.0 gio-2.0 gobject-2.0 := -pthread -lgio-2.0 -lz -lresolv -lselinux -lgmodule-2.0 -ldl -lgobject-2.0 -lffi -lglib-2.0 -lpcre export GLIB_CFLAGS="-I$glib20_dir/include/glib-2.0 -I`echo "$glib20_dir/lib/"*"/glib-2.0/include"`" #export GLIB_LIBS="$glib20_lib_path/libgio-2.0.a -lz -lresolv $glib20_lib_path/libgmodule-2.0.a -ldl $glib20_lib_path/libgobject-2.0.a $glib20_lib_path/libffi.a $glib20_lib_path/libglib-2.0.a -lpcre -pthread" # Static export GLIB_LIBS="-lgio-2.0 -lz -lresolv -lgmodule-2.0 -ldl -lgobject-2.0 -lffi -lglib-2.0 -lpcre -pthread" # Shared -export LDFLAGS="-L$boringssl_path/crypto/ -L$boringssl_path/ssl/ -L$glib20_lib_path" +# For BoringSSL: export LDFLAGS="-L$boringssl_path/crypto/ -L$boringssl_path/ssl/ -L$glib20_lib_path" +export LDFLAGS="-L$openssl_path/lib -L$glib20_lib_path" # sed -i 's/gtkdocize/#gtkdocize/g' autogen.sh # Fix for ARM sed -i 's/aclocal --install/aclocal --install -I`pwd`/g' autogen.sh # Fix for automake 1.11 sed -i 's/AM_INIT_AUTOMAKE(\[1.12/AM_INIT_AUTOMAKE(\[1.11/g' configure.ac # Reduce min AC version for ubuntu12.04 -CFLAGS="-Wno-error=cast-align" ./autogen.sh --prefix=`pwd`/out --with-pic --with-crypto-library=openssl --without-gstreamer --disable-assert --disable-gtk-doc --enable-static=no --enable-shared=yes && \ +CFLAGS="-Wno-error=cast-align -I$openssl_path/include/" ./autogen.sh --prefix=`pwd`/out --with-pic --with-crypto-library=openssl --without-gstreamer --disable-assert --disable-gtk-doc --enable-static=no --enable-shared=yes && \ make && \ make install @@ -129,4 +155,4 @@ cp -r libnice/out/lib/ $prebuild_path # Troubleshooting ## GLIB2.0 hangs on meson -Ninja may be too sold. It should work with 1.9.0. \ No newline at end of file +Ninja may be too old. It should work with 1.9.0. \ No newline at end of file diff --git a/downloads b/downloads new file mode 120000 index 0000000..53552e7 --- /dev/null +++ b/downloads @@ -0,0 +1 @@ +/mnt/d/Users/WolverinDEV/Downloads/ \ No newline at end of file diff --git a/libraries/build_boringssl.sh b/libraries/build_boringssl.sh deleted file mode 100755 index f2c1238..0000000 --- a/libraries/build_boringssl.sh +++ /dev/null @@ -1,30 +0,0 @@ -cd boringssl/ -if [ ! -d lib ]; then - mkdir lib && cd lib - ln -s ../build/ssl/libssl.so . - ln -s ../build/crypto/libcrypto.so . - cd .. -fi -cat include/openssl/opensslv.h | grep "OPENSSL_VERSION_TEXT" &> /dev/null -if [ $? -ne 0 ]; then - echo '#if false -# define OPENSSL_VERSION_NUMBER 0x1010008fL -#define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1a 20 Nov 2018" -#endif' > include/openssl/opensslv.h -fi -cd build - -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!" - T32="-DCMAKE_TOOLCHAIN_FILE=../util/32-bit-toolchain.cmake" -fi - -cmake .. -D -DOPENSSL_NO_ASM=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" -DCMAKE_C_FLAGS="${C_FLAGS}" -DCMAKE_BUILD_TYPE=Release ${CMAKE_OPTIONS} -DCMAKE_VERBOSE_MAKEFILE=1 ${T32} -make ${CMAKE_MAKE_OPTIONS} -#sudo make install diff --git a/setup_amd64.md b/setup_amd64.md index 269e77c..59a3161 100644 --- a/setup_amd64.md +++ b/setup_amd64.md @@ -77,6 +77,20 @@ make -j`nproc --all` && \ make install ``` +## MySQL (libmaria.so) +```shell script +apt-get install -y libncurses5-dev && \ +git clone https://github.com/mysql/mysql-server.git && cd mysql-server \ +mkdir build_ && cd build_ && \ +cmake .. -DBUILD_CONFIG=mysql_release -DWITH_ZLIB=bundled -DDOWNLOAD_BOOST=1 -DWITH_BOOST=`pwd`/boost-library/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-lrt" -DCMAKE_INSTALL_PREFIX=`pwd`/../out/ && +make mysqlclient -j 32 +``` +You may have to do this before (on error `unsupported reloc 42 against global symbol`): +https://bugs.mysql.com/bug.php?id=89391 +```shell script +mv /usr/bin/ld.gold /usr/bin/NOT_USED_ld.gold +``` + ## Setting up github ```shell script git config --global credential.helper store && \ @@ -105,8 +119,8 @@ git submodule update --init --recursive ```shell script export build_os_type=linux export build_os_arch=amd64 -export CMAKE_BUILD_OPTIONS="-j`nproc --all`" -export BUILD_OPTIONS="$CMAKE_BUILD_OPTIONS" +export CMAKE_MAKE_OPTIONS="-j`nproc --all`" +export MAKE_OPTIONS="$CMAKE_MAKE_OPTIONS" ``` ## Build libraries