owt-client-native
owt-client-native copied to clipboard
build_linux.py clang verison of libowt.a cause memory issue
I changed scripts/build_linux.py to build with clang, but when I include libowt.a, app crash.
{
# Disable usage of GTK.
'rtc_use_gtk=false',
# When is_clang is false, we're not using sysroot in tree.
- 'use_sysroot=false',
+ #'use_sysroot=false',
# For Linux build we expect application built with gcc/g++. Set SDK to use
# the same toolchain.
- 'is_clang=false',
+ #'is_clang=false',
# Upstream only officially supports clang, so we need to suppress warnings
# to avoid gcc/g++ specific build errors.
'treat_warnings_as_errors=false',
}
Thread 2 "conf_sample" received signal SIGABRT, Aborted. [Switching to Thread 0x7ffff5fa6700 (LWP 6510)] __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #1 0x00007ffff65fb7f1 in __GI_abort () at abort.c:79 #2 0x00007ffff7bc396b in ?? () from /usr/lib/x86_64-linux-gnu/libc++abi.so.1 #3 0x00007ffff7bac9cf in ?? () from /usr/lib/x86_64-linux-gnu/libc++abi.so.1 #4 0x00007ffff7bc2b23 in ?? () from /usr/lib/x86_64-linux-gnu/libc++abi.so.1 #5 0x00007ffff7bc5966 in ?? () from /usr/lib/x86_64-linux-gnu/libc++abi.so.1 #6 0x00007ffff7bc58ed in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libc++abi.so.1 #7 0x00007ffff7bc5518 in operator new(unsigned long) () from /usr/lib/x86_64-linux-gnu/libc++abi.so.1
@jianjunz Is there any solution?
using CMAKE_CXX_FLAGS -O0, the error is in sdputils.cc:14, which is a static const map: #13 0x00000000004704bd in __cxx_global_var_init () at ../../talk/owt/sdk/base/sdputils.cc:14
(gdb) bt
#0 __memmove_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:282
#1 0x00000000004e65d7 in std::__1::char_traits
If is_clang=true and use_sysroot=true, it uses a prebuilt clang binary, which could be different from your system's clang.
I need to build libwebrtc.a as a plugin to integrated with Unreal. how to build with system's clang?