Findings: Based on our findings so far, we need to upgrade to a WebRTC library version which has the following fix: 183120: Default streams: don't block media even if on different transceiver.
As a step towards the solution, we tried the following: 1. We were able to compile the latest code by following the instructions given at https://webrtc.github.io/webrtc-org/native-code/ios/. 2. We then replaced the libWebRTC.a for iOS in place of the old dependencies and also copied the relevant CPP and Objective-C include folders. 3. We were able to compile our SDK and CPP code with the new WebRTC library by making necessary changes in the code as per the newer way.
However, we are now facing errors for the RTC logging module. It seems the logging module has a few newer versions of overwritten implementations too. We are not sure how we should arrange these dependencies in our code. Please provide guidance for the same.
Present dependencies are arranged as follows: lib folder -> libWebRTC.a include folder -> cpp folder -> contains respective .h and .cpp files inside relevant folders(e.g. api, rtc_base, call etc) objc folder -> contain respective .h and .mm files inside relevant folders(e.g. api, base, components, Framework, helpers, native etc)
Please guide us about these dependencies arrangements, linkings to resolve the mentioned issue. Following is the screenshot of issues, which are coming for files that are inside include folders, i.e., WebRTC include files inside the CPP folder (logging.h is in rtc_base folder).
ERROR at //build_overrides/build.gni:41:13: Script returned non-zero exit code.
_result = exec_script("//build/mac/should_use_hermetic_xcode.py",
^----------
Current dir: /Users/<projectPath>/src/out/ios/
Command: python /Users/<projectPath>/src/build/mac/should_use_hermetic_xcode.py ios
Returned 127.
See //build/toolchain/toolchain.gni:10:1: whence it was imported.
import("//build_overrides/build.gni")
^-----------------------------------
See //build/config/ios/ios_sdk.gni:10:1: whence it was imported.
import("//build/toolchain/toolchain.gni")
^---------------------------------------
See //build/config/sysroot.gni:73:5: whence it was imported.
import("//build/config/ios/ios_sdk.gni")
^--------------------------------------
See //build/config/linux/pkg_config.gni:5:1: whence it was imported.
import("//build/config/sysroot.gni")
^----------------------------------
See //BUILD.gn:15:1: whence it was imported.
import("//build/config/linux/pkg_config.gni")
Can someone guide, how we can compile this old version of code for iOS, by resolving this issue?
Thanks,
Kranti
<Screenshot 2024-03-07 at 6.46.59 PM.png>
--
This list falls under the WebRTC Code of Conduct - https://webrtc.org/support/code-of-conduct.
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/06960b8a-6bdf-4f2d-8dbc-0abee5c1221en%40googlegroups.com.
Thanks a lot for reply 胡海
We used following commands to set python version 2.7:
eval "$(pyenv init -)"
pyenv local 2.7
Then tried command: gn gen out/ios --args='target_os="ios" target_cpu="arm64" is_debug=false ios_enable_code_signing=false' --ide=xcode
Now facing below error:
ERROR at dynamically parsed input that //build/config/ios/ios_sdk.gni:107:21 loaded :1:20: This is not a valid number.
machine_os_build=23B81
--^
See //build/config/sysroot.gni:73:5: whence it was imported.
import("//build/config/ios/ios_sdk.gni")
^--------------------------------------
See //build/config/linux/pkg_config.gni:5:1: whence it was imported.
import("//build/config/sysroot.gni")
^----------------------------------
See //BUILD.gn:15:1: whence it was imported.
import("//build/config/linux/pkg_config.gni")
^-------------------------------------------
Please let us know, if we can try any solution to resolve this issue?Step 1:
Command used to generate webrtc lib is (from Mac M1):
gn gen out/ios --args='target_os="ios" target_cpu="arm64" is_debug=false ios_enable_code_signing=false rtc_include_tests=false rtc_enable_symbol_export=true' --ide=xcode
followed by: ninja -C out/ios
Step 2:
We added libwebrtc.a and required include files to our SDK code and trying to upgrade webrtc lib used in our code. Please help to resolve below issues, if anyone faced the similar kind of issues: How we can define missing architecture from MAC to build code for iOS?
1. File: byte_order.h
Errors:
/Users/user/Documents/Projects/SDK/src/sdk/ios/depends/webrtc_ios/include/cpp/rtc_base/byte_order.h:96:2 "Missing byte order functions for this arch."
2. File: event.h
Error: "Missing byte order functions for this arch." and other errors as in below screenshot:
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/41d6650b-4e34-45a1-ad78-c0081b988df1n%40googlegroups.com.
Hello 胡海, thanks for reply.
We successfully compiled WebRTC_iOS M87 using Xcode 15.1, but encountered difficulties integrating this library into our SDK code. We copied libwebrtc.a to the required location within the SDK.
Our challenge lies in identifying the relevant include files (both CPP and Objective-C) to accompany this static library. The original WebRTC_iOS code contains numerous folders with identical names. We have manually compared and collected the necessary include files from the source of the WebRTC code that we compiled.
We believe that correct linking of the include directory could resolve our compilation issues. However, we are uncertain about the appropriate replacements for the two folders, CPP and Objective-C (objc), as illustrated in the screenshots below. We seek guidance on this matter.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/457be39e-b68e-404b-a55e-6e298efb7cfcn%40googlegroups.com.
<c19b65a0-8a8c-4003-b2c3-68fcdc2d6943.jpg>
#elif defined(_M_ARM64) || defined(__aarch64__)
#define WEBRTC_ARCH_ARM_FAMILY
#define WEBRTC_ARCH_64_BITS
#define WEBRTC_ARCH_LITTLE_ENDIAN
But in /rtc_base/byte_order.h I get an error of:
I don't hit the error: "#error WEBRTC_ARCH_BIG_ENDIAN or WEBRTC_ARCH_LITTLE_ENDIAN must be defined."
So Im thinking that somehow at least either WEBRTC_ARCH_BIG_ENDIAN or WEBRTC_ARCH_LITTLE_ENDIAN are defined. So i dont know why those functions would not get defined.
Any guesses?
Thanks in advanced!
To view this discussion visit https://groups.google.com/d/msgid/discuss-webrtc/b52b3e56-5ad1-4a68-afb8-7508d130070en%40googlegroups.com.


