Open jeckymodi opened 3 years ago
I had followed documentation for installation of Mediasoup ios.
https://github.com/ethand91/mediasoup-ios-client/blob/master/documentation/Installation.md
I had followed following commands to create .a framework of mediasoup but I am getting error like `fatal error: 'clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: ** [libmediasoupclient/libsdptransform/test/test_sdptransform] Error 1 make[1]: [libmediasoupclient/libsdptransform/test/CMakeFiles/test_sdptransform.dir/all] Error 2`**
cd /Users/jitendra/Documents/Projects/mediasoup-ios-client/mediasoup-client-ios/dependencies jitendra@Aub-17-Saurav-Mac-mini dependencies % cmake . -Bbuild -DLIBWEBRTC_INCLUDE_PATH=/Users/jitendra/Documents/Projects/mediasoup-ios-client/mediasoup-client-ios/dependencies/webrtc/src -DLIBWEBRTC_BINARY_PATH=/Users/jitendra/Documents/Projects/mediasoup-ios-client/mediasoup-client-ios/dependencies/webrtc/src/out_ios_libs/universal -DMEDIASOUP_LOG_DEV=ON -DCMAKE_CXX_FLAGS="-fvisibility=hidden" -DLIBSDPTRANSFORM_BUILD_TESTS=OFF -DIOS_SDK=iphone -DIOS_ARCHS="arm64"
This is the output for above command
CMake Warning (dev) in CMakeLists.txt: No project() command is present. The top-level CMakeLists.txt file must contain a literal, direct call to the project() command. Add a line of code such as project(ProjectName) near the top of the file, but after cmake_minimum_required(). CMake is pretending there is a "project(Project)" command on the first line. This warning is for project developers. Use -Wno-dev to suppress it. -- The C compiler identification is AppleClang 12.0.5.12050022 -- The CXX compiler identification is AppleClang 12.0.5.12050022 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- ========== libmediasoupclient iOS Build Configuration ========== -- CMAKE_OSX_SYSROOT = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/ -- CMAKE_OSX_ARCHITECTURES = arm64 =========== libmediasoupclient Build Configuration =========== -- MEDIASOUPCLIENT_BUILD_TESTS : OFF -- MEDIASOUPCLIENT_LOG_TRACE : OFF -- MEDIASOUPCLIENT_LOG_DEV : OFF -- LIBWEBRTC_INCLUDE_PATH : /Users/jitendra/Documents/Projects/mediasoup-ios-client/mediasoup-client-ios/dependencies/webrtc/src -- LIBWEBRTC_BINARY_PATH : /Users/jitendra/Documents/Projects/mediasoup-ios-client/mediasoup-client-ios/dependencies/webrtc/src/out_ios_libs/universal -- Configuring done -- Generating done CMake Warning: Manually-specified variables were not used by the project: MEDIASOUP_LOG_DEV -- Build files have been written to: /Users/jitendra/Documents/Projects/mediasoup-ios-client/mediasoup-client-ios/dependencies/build
After that I tried to fire this command
make -C build
I am getting following error.
Consolidate compiler generated dependencies of target sdptransform [ 16%] Built target sdptransform [ 20%] Building CXX object libmediasoupclient/CMakeFiles/mediasoupclient.dir/src/Consumer.cpp.o clang: warning: using sysroot for 'iPhoneOS' but targeting 'MacOSX' [-Wincompatible-sysroot] [ 24%] Building CXX object libmediasoupclient/CMakeFiles/mediasoupclient.dir/src/DataConsumer.cpp.o clang: warning: using sysroot for 'iPhoneOS' but targeting 'MacOSX' [-Wincompatible-sysroot] [ 28%] Building CXX object libmediasoupclient/CMakeFiles/mediasoupclient.dir/src/DataProducer.cpp.o clang: warning: using sysroot for 'iPhoneOS' but targeting 'MacOSX' [-Wincompatible-sysroot] [ 32%] Building CXX object libmediasoupclient/CMakeFiles/mediasoupclient.dir/src/Device.cpp.o clang: warning: using sysroot for 'iPhoneOS' but targeting 'MacOSX' [-Wincompatible-sysroot] [ 36%] Building CXX object libmediasoupclient/CMakeFiles/mediasoupclient.dir/src/Handler.cpp.o clang: warning: using sysroot for 'iPhoneOS' but targeting 'MacOSX' [-Wincompatible-sysroot] [ 40%] Building CXX object libmediasoupclient/CMakeFiles/mediasoupclient.dir/src/Logger.cpp.o clang: warning: using sysroot for 'iPhoneOS' but targeting 'MacOSX' [-Wincompatible-sysroot] [ 44%] Building CXX object libmediasoupclient/CMakeFiles/mediasoupclient.dir/src/PeerConnection.cpp.o clang: warning: using sysroot for 'iPhoneOS' but targeting 'MacOSX' [-Wincompatible-sysroot] [ 48%] Building CXX object libmediasoupclient/CMakeFiles/mediasoupclient.dir/src/Producer.cpp.o clang: warning: using sysroot for 'iPhoneOS' but targeting 'MacOSX' [-Wincompatible-sysroot] [ 52%] Building CXX object libmediasoupclient/CMakeFiles/mediasoupclient.dir/src/Transport.cpp.o clang: warning: using sysroot for 'iPhoneOS' but targeting 'MacOSX' [-Wincompatible-sysroot] [ 56%] Building CXX object libmediasoupclient/CMakeFiles/mediasoupclient.dir/src/mediasoupclient.cpp.o clang: warning: using sysroot for 'iPhoneOS' but targeting 'MacOSX' [-Wincompatible-sysroot] [ 60%] Building CXX object libmediasoupclient/CMakeFiles/mediasoupclient.dir/src/ortc.cpp.o clang: warning: using sysroot for 'iPhoneOS' but targeting 'MacOSX' [-Wincompatible-sysroot] [ 64%] Building CXX object libmediasoupclient/CMakeFiles/mediasoupclient.dir/src/scalabilityMode.cpp.o clang: warning: using sysroot for 'iPhoneOS' but targeting 'MacOSX' [-Wincompatible-sysroot] [ 68%] Building CXX object libmediasoupclient/CMakeFiles/mediasoupclient.dir/src/sdp/MediaSection.cpp.o clang: warning: using sysroot for 'iPhoneOS' but targeting 'MacOSX' [-Wincompatible-sysroot] [ 72%] Building CXX object libmediasoupclient/CMakeFiles/mediasoupclient.dir/src/sdp/RemoteSdp.cpp.o clang: warning: using sysroot for 'iPhoneOS' but targeting 'MacOSX' [-Wincompatible-sysroot] [ 76%] Building CXX object libmediasoupclient/CMakeFiles/mediasoupclient.dir/src/sdp/Utils.cpp.o clang: warning: using sysroot for 'iPhoneOS' but targeting 'MacOSX' [-Wincompatible-sysroot] [ 80%] Linking CXX static library libmediasoupclient.a [ 80%] Built target mediasoupclient [ 84%] Building CXX object libmediasoupclient/libsdptransform/test/CMakeFiles/test_sdptransform.dir/tests.cpp.o clang: warning: using sysroot for 'iPhoneOS' but targeting 'MacOSX' [-Wincompatible-sysroot] [ 88%] Building CXX object libmediasoupclient/libsdptransform/test/CMakeFiles/test_sdptransform.dir/parse.test.cpp.o clang: warning: using sysroot for 'iPhoneOS' but targeting 'MacOSX' [-Wincompatible-sysroot] [ 92%] Linking CXX executable test_sdptransform clang: warning: using sysroot for 'iPhoneOS' but targeting 'MacOSX' [-Wincompatible-sysroot] ld: warning: -headerpad_max_install_names is ignored when used with -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) ld: building for macOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/libc++.tbd) built for iOS, file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/libc++.tbd' for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [libmediasoupclient/libsdptransform/test/test_sdptransform] Error 1 make[1]: *** [libmediasoupclient/libsdptransform/test/CMakeFiles/test_sdptransform.dir/all] Error 2 make: *** [all] Error 2
Any help would be appereciated.
I have the same problem
I had followed documentation for installation of Mediasoup ios.
https://github.com/ethand91/mediasoup-ios-client/blob/master/documentation/Installation.md
I had followed following commands to create .a framework of mediasoup but I am getting error like `fatal error: 'clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: ** [libmediasoupclient/libsdptransform/test/test_sdptransform] Error 1 make[1]: [libmediasoupclient/libsdptransform/test/CMakeFiles/test_sdptransform.dir/all] Error 2`**
This is the output for above command
After that I tried to fire this command
make -C build
I am getting following error.
Any help would be appereciated.