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
Upgrade to m112 #154
Upgrade to m112 #154
Conversation
Not necessarily related - as the error seems to be linked to the arm64 arch - but just to make sure I've tried it on a Linux box, and it DID build OK. Didn't try to run it with the mediasoup-broadcaster-demo yet though. Just to make sure, I checked out |
Sorry, unable to test on a Mac m1 atm. |
Nice @copiltembel,
That's correct. Here the mapping https://chromiumdash.appspot.com/branches
Thanks, this are the commands I used to build it:
|
If you can run the tests we can push it as the linking issue much probably a local error. Test compilation is enabled with the flag: |
@copiltembel, did you use the same |
We must update website Installation section with those new values and args. |
Right, I should have enabled the I've used these parameters when building libwebrtc m112: `$ gn gen out/m112_debug --args='is_debug=true is_component_build=false is_clang=false rtc_include_tests=false rtc_use_h264=true use_rtti=true use_custom_libcxx=false treat_warnings_as_errors=false rtc_use_x11=false use_glib=false rtc_enable_protobuf=false rtc_exclude_audio_processing_module=true' But I get linking errors related to libdl when building
Just for the sake of it, I disabled libwebrtc's module which were complaining about libdl, like this:
Then I've built libmediasoupclient:
which succeeded, but obviously test_mediasoupclient crashed when running. I'll try to have a look tomorrow again at the libdl problem. I had it some time ago with a different application, but don't remember right now how I fixed it. |
I've managed to build and run
But running it fails with this error:
For reference, here's how I've built libwebrtc:
|
I'll try with an Intel Mac when possible. The linking issues are related to:
After commenting calls to When running then the test binary I see this one:
|
I did build M112 and successfully linked it to lib/tests in both debug/release builds on M1 Mac. Tests do fail for me the same way in both builds:
Build commands:
Hope that helps! Looking forward to upgrading! I did however got an excessive amount of warnings regarding symbol visibility. I am not knowledgable enough to know that exactly what it means, but in my app I solved it with patch to CMakeLists.txt
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8ce1b7d..99f9ef2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,7 @@
cmake_minimum_required(VERSION 3.5)
project(mediasoupclient LANGUAGES CXX)
+cmake_policy(SET CMP0063 NEW)
# Set version number.
set(mediasoupclient_VERSION_MAJOR 3)
@@ -16,6 +17,8 @@ configure_file (
# C++ standard requirements.
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_VISIBILITY_PRESET hidden)
+set(CMAKE_VISIBILITY_INLINES_HIDDEN ON)
# Project options.
option(MEDIASOUPCLIENT_BUILD_TESTS "Build unit tests" OFF)
diff --git a/deps/libsdptransform/CMakeLists.txt b/deps/libsdptransform/CMakeLists.txt
index b4f4648..e601ef7 100644
--- a/deps/libsdptransform/CMakeLists.txt
+++ b/deps/libsdptransform/CMakeLists.txt
@@ -1,4 +1,5 @@
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.3)
+cmake_policy(SET CMP0063 NEW)
project(sdptransform VERSION 1.2.9) |
I now think it might be related to xcode version. What version are you running? |
I managed to get passed that test by commenting out some code that I believe is not needed in that failing test:
But I'm stuck at another test:
|
Thanks for the input, don't hesitate to keep progressing. We'll come back to this as soon as we can. |
Still stuck here. The tests totally depend on the webrtc internal test code which is something we may need to get rid of. The same happens with |
@jmillan I've been maintaining a fork1 with some changes which helped us with our threading model, and we've done a few WebRTC upgrades (we're on M111 now, which is compatible with our M107 branch). Long story short, you'll need to link against a debug version of WebRTC to run tests, or run tests in release mode. IIRC, starting with M101, WebRTC's sequence checker (which checks for thread safety) has different implementations when running debug/release builds. The headers for the implementation use macros which expose different methods/member variables. When you run libmediasoupclient tests, there is an inconsistency between which methods the compiler thinks are available, and the symbols which actually are. We use a custom build of WebRTC already, so we fixed this by patching the sequence checker to be disabled in our debug builds, which allows us to use release builds of WebRTC from our tests (and app during development). Hope this helps! I'm happy to answer any other questions or help troubleshoot. I'm pretty familiar with both codebases :) Footnotes |
Very much appreciated @mikepulaski! I'll give it a try and let you know! |
Linker issue is gone :-). Now I need to debug a RefCount crash. Thanks @mikepulaski :-) |
.., due to a limitation in libwebrtc #154 (comment)
This branch, as it is, does compile and link properly now for m112. Thanks for your suggestion! The tests crashes as shown here.
When compiling in non debug mode, the error is indeed a warning:
As you see, compiling in debug mode adds the Do you know how can I remove such flag? Also, if you can spot the problem here #154 (comment), don't hesitate to comment or provide a fix. |
Do you set GN argument |
Nop, I couldn't find it. I'll try it. Thanks! |
@mikepulaski, you have done in your branch many changes. I'll check them in case we would like to introduce any in mainstream. Is that OK? We can comment further once I take a look at the changes. Would you please share the overall motivations for your changes? EDIT: Does the public API change in any means? If so, could you share why and how? |
@jmillan Glad I can help!
@Poldraunic's suggestion should do the trick! FWIW, this API was incorrectly marked as only available for macOS13+ in the macOS SDK shipping with Xcode 14.3+, but has been fixed in Xcode 15. It's harmless :)
I'm not certain just by looking at it. Do you know which test is failing? It might help to have a bit more context. From the looks of things, a ref counted object is freeing memory which has already been freed. The main difference I can see between this branch and the one that I forked is that I've replaced all instances of I understand that it might be difficult to update public API signatures, but it might be worth doing it in your local copy to see if it fixes the problem. If it does, and you want to maintain API compatibility, you could manually call |
Hi @mikepulaski,
Yes, so having built this branch the following test fails when running the test binary: Running it under LLDB gives the following trace: libwebrtc is compiled in debug mode as suggested. |
@mikepulaski, do you think you can provide some help here? The problem is, as described, with the test aborting. As per the trace in the previous comment the medias source interface state is not Seems that the changes in the code are correct, but if we cannot test it then we are blocked to release it. We very much appreciate if you or anyone finds the time to check this. NOTE: We are talking about this exact branch, which can be cloned and compiled. |
I'd like to help, but I am unable to reproduce fail for this test. For me, everything is still as before:
@jmillan, are you sure you're on the correct WebRTC branch and it is compiled correctly? |
Do you mean this branch m112 is working for you without problems and the tests does not show that abort? |
@jmillan I haven't tried libmediasoupclient itself, but Device.test doesn't fail for me. libmediasoupclient:
WebRTC:
|
Thanks, I'll try when I get some time 👍 |
Can we close this PR now that there is another one upgrading to M120? |
Closed in favour of #173 |
While upgrading to m112 I'm facing the following link issue with the tests.
Can anyone try it and provide some help?