Open chenhequn opened 1 year ago
@jianjunz Is there any solution?
using CMAKE_CXX_FLAGS -O0, the error is in sdputils.cc:14, which is a static const map:
(gdb) bt
at ../../buildtools/third_party/libc++/trunk/include/__string:225
__s=0x400003100000006 <error: Cannot access memory at address 0x400003100000006>, __sz=1) at ../../buildtools/third_party/libc++/trunk/include/string:1792
at ../../buildtools/third_party/libc++/trunk/include/string:1838
__last=0x7fffffffe0d0) at ../../buildtools/third_party/libc++/trunk/include/unordered_map:1624
this=0x24ff3f0 <owt::base::audio_codec_names>, __il=<incomplete type>) at ../../buildtools/third_party/libc++/trunk/include/unordered_map:1565
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?
I changed scripts/build_linux.py to build with clang, but when I include libowt.a, app crash.
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