-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RTTI not set on linux/macos build? #53
Comments
cmake -DGN_EXTRA_ARGS="use_rtti=true" <your_cmake_source_dir> |
Rebuilding the library (cd out && cmake -DGN_EXTRA_ARGS="use_rtti=true" ..) with make && make install and same error. I am statically linking libwebrtc.a instead of including the CMAKE build system into my app. I have another issue but im not sure where it belongs, if its due to compile params or a bug in webrtc-src itself. the media/base/fakevideocapturer.h has custom FOURCC_I420. When I try to run this code I crash here on SetCaptureFormat(&format):
If the capture format is default and not FOURCC_I420, there is no crash and SetCaptureFormat(&format) is called just fine. Google seems to say this is a crash due to an out of bounds reference. But there is only 1 issue on github where the issues seems to indicate it depends on how the library was compiled. Any idea if I should submit this here or on webrtc-src? |
just for verification purposes: you can use the mac installer on the following link to get an RTTI-enabled libwebrtc: https://drive.google.com/drive/folders/0B398g_p42xgrbUF3VjlFNnNxb3M?usp=sharing |
Clearly use_rtti is not set :(. The steps I did:
Everything works, i have datachannel working, video/audio channel negotiation, the only crash is on SetCaptureFormat(&format); when request format is I420 or H264, ex:I420 640x480x30.
I am on linux, no macos here :(, but the issue was reported by macos users on indie projects using this libwebrtc. |
The steps I did:
$ git clone https://github.com/aisouard/libwebrtc.git
$ cd libwebrtc
$ mkdir out
$ cd out
$ cmake -DGN_EXTRA_ARGS="use_rtti=true" ..
$ make
$ sudo make install
1. Im compiling like so
g++ -DWEBRTC_POSIX -D_GLIBCXX_USE_CXX11_ABI=0 -std=gnu++0x main.cpp -fno-rtti -g -o app
-I ./lib/websocketpp/ -I ./lib/rapidjson/include/ -I ./lib/libwebrtc/out/include/ -lpthread -lSM -lICE -lX11 -lXext -ldl -lrt /usr/lib/x86_64-linux-gnu/libboost_system.a ./lib/libwebrtc/out/lib/libwebrtc.a
Everything works, i have datachannel working, video/audio channel
negotiation, the only crash is on SetCaptureFormat(&format); when request
format is I420 or H264, ex:I420 640x480x30.
you see here, every single argument on that line could be a mismatch with
what libwebrtc was compiled with. you're definitely missing qui a few -D,
and you could be picking up the wrong lib.
1.
I am not using CMAKE in the application project, I just want to
compile the libwebrtc and statically link it. Am I going down the wrong
path, and I should just use CMAKE in my own project using libwebrtc? Which
libwebrtc.a wold be correct one?
I *strongly* advocate using cmake.
1.
I think this maybe a difference in the stdlib libwebrtc.a was compiled
with and my app, is there anyway to confirm?
you only need to know that if you do NOT use cmake. :-)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#53 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAT1nokrGD4SmDkvzSIG443o2HPch-Ojks5snrUWgaJpZM4Ppo6G>
.
…--
Alex. Gouaillard, PhD, PhD, MBA
------------------------------------------------------------------------------------
President - CoSMo Software Consulting, Singapore
------------------------------------------------------------------------------------
sg.linkedin.com/agouaillard
-
|
Hate to bring this back up, but I'm running into this issue now and even after adding the RTTI flag I still don't see any change in the |
if you try to subclass a VideoCapturer or Thread you get
This seems to be because RTTI was not enabled in the build. It should be enabled by default for linux and macos.
-fno-rtti must be set on your app to avoid the problem. But there should at least be an option to include RTTI.
The text was updated successfully, but these errors were encountered: