Fixing linking

This commit is contained in:
WolverinDEV 2020-01-25 16:01:54 +01:00
parent a9d709859d
commit 4f0bf72585
4 changed files with 13 additions and 13 deletions

@ -1 +1 @@
Subproject commit 0ef580477fdd88218d78216ec26ab000e0234f1f
Subproject commit 66ad46cef6fd035f9466ea6556135fcbe4d9c24e

View File

@ -51,12 +51,13 @@ Building GLIB2.0
git clone https://github.com/GNOME/glib.git && \
cd glib && \
git checkout glib-2-62 && \
meson _build -Dlibmount=false --prefix=`pwd`/out --buildtype=release --default-library=both -Diconv=libc
meson _build -Dlibmount=false --prefix=`pwd`/out --buildtype=release --default-library=both -Diconv=libc -Dselinux=disabled
ninja -C _build && \
ninja -C _build install && \
cd ..
```
Publishing GLIB2.0
```shell script
export build_os_type=linux
@ -76,25 +77,26 @@ Building boringssl
git clone https://boringssl.googlesource.com/boringssl && cd boringssl && \
git checkout 1cc95ac0 # This version does TeaSpeak use
[[ "`getconf LONG_BIT`" != "64" ]] && { export _toolchain="-DCMAKE_TOOLCHAIN_FILE=../util/32-bit-toolchain.cmake"; }
cmake . -DCMAKE_INSTALL_PREFIX=`pwd`/out -DOPENSSL_NO_ASM=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release $_toolchain && \
[[ "`getconf LONG_BIT`" != "64" && ! "$(uname -m)" ~= arm* ]] && { export _toolchain="-DCMAKE_TOOLCHAIN_FILE=`pwd`/util/32-bit-toolchain.cmake"; }
cmake . -DCMAKE_INSTALL_PREFIX=`pwd`/out -DOPENSSL_NO_ASM=ON -DCMAKE_CXX_FLAGS="-Wno-error=attributes" -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release $_toolchain && \
make -j32
```
Build libnice
```shell script
apt-get install gtk-doc-tools
apt-get install -y gtk-doc-tools
git clone https://github.com/libnice/libnice.git && cd libnice
export glib20_dir="`pwd`/../glibc-prebuild/linux_amd64/"
export glib20_lib_path="$glib20_dir/lib/"*"/"
export glib20_lib_path=$(realpath "$glib20_dir/lib/"*"/")
export boringssl_path="`pwd`/../boringssl/"
#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"
export LDFLAGS="-L$boringssl_path/crypto/ -L$boringssl_path/ssl/"
#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"
./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 && \
@ -118,6 +120,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.
export GLIB_LIBS="$glib20_lib_path/libgio-2.0.a -lz -lresolv $glib20_lib_path/libgmodule-2.0.a $glib20_lib_path/libgobject-2.0.a $glib20_lib_path/libffi.a $glib20_lib_path/libglib-2.0.a -lpcre -pthread"
Ninja may be too sold. It should work with 1.9.0.

View File

@ -42,7 +42,7 @@ if [[ ${build_os_type} != "win32" && "${_datapipes_webrtc}" == "ON" ]]; then
# TODO: pcre really required here?
web_cmake_flags="$web_cmake_flags -DGLIB_PREBUILD_FLAGS=\"-I$glib20_dir/include -I$glib20_dir/include/glib-2.0/ -I$glib20_lib_path/glib-2.0/include/\""
web_cmake_flags="$web_cmake_flags -DGLIB_PREBUILD_LIBRARIES=\"$glib20_lib_path/libgio-2.0.a;z;resolv;$glib20_lib_path/libgmodule-2.0.a;$glib20_lib_path/libgobject-2.0.a;$glib20_lib_path/libffi.a;$glib20_lib_path/libglib-2.0.a;pcre\""
web_cmake_flags="$web_cmake_flags -DGLIB_PREBUILD_LIBRARIES=\"$glib20_lib_path/libgio-2.0.so;z;resolv;$glib20_lib_path/libgmodule-2.0.so;$glib20_lib_path/libgobject-2.0.so;$glib20_lib_path/libffi.a;$glib20_lib_path/libglib-2.0.so;pcre\""
web_cmake_flags="$web_cmake_flags -DLIBNICE_PREBUILD_PATH=\"../libnice/linux_${build_os_arch}\""
echo "WebRTC flags: $web_cmake_flags"
fi

@ -1 +1 @@
Subproject commit 1716e118fc5756fab5a0271d6d4b9594b5755a18
Subproject commit 2e5282843040c8519f3db604b222f80589e37d94