Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Build for iOS failed: the following arguments are required: --sio_root #699

Open
resignedScientist opened this issue Mar 7, 2023 · 5 comments

Comments

@resignedScientist
Copy link

When I run:
python build.py

it fails with the message:
"build.py: error: the following arguments are required: --sio_root"

What is this argument and what do I write after the argument?

Running on MacOS Ventura using the latest main branch

@jianjunz
Copy link
Collaborator

jianjunz commented Mar 8, 2023

build.py --help displays description for arguments. sio_root is the path for Socket.IO cpp.

@resignedScientist
Copy link
Author

resignedScientist commented Mar 11, 2023

Ok now I have built Socket.IO using this: https://github.com/kim-company/socket.io-client-cpp-ios-static

when I now run
python build.py --sio_root […]

it takes a while but then fails with:
../../talk/owt/sdk/conference/conferencesocketsignalingchannel.h:16:10: fatal error: 'sio_client.h' file not found #include "sio_client.h" ^~~~~~~~~~~~~~ 1 error generated.

I am on the main branch btw. I also tried using the v5.0 tag, but that fails with another error:
File "/Users/laudien/Projekte/WebRTC/src/scripts/build.py", line 150 print 'Start running unit tests.' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

Do I have to use a specific python version for this? I use Python version 3.11.1

Or do I have to run gclient sync again when switching commits?

@vishal2098govind
Copy link

cloning socket.io-client-cpp-ios-static repository comes with a /static_builds/commit_b1216ee428dd7d1e72368da9b12aa43bfc487c93/ folder with 2 files in it

  • arm64_libsioclient.a
  • arm64_libsioclient_tls.a

while passing path to python build.py --sio_root <path> which <path> should I provide

I provided the path till arm64_libsioclient.a file but was getting same error of 'sio_client.h' not found and 'sio_message.h' not found

python src/scripts/build.py --sio_root ./socket.io-client-cpp-ios-static/static_builds/commit_b1216ee428dd7d1e72368da9b12aa43bfc487c93/arm64_libsioclient
Done. Made 2021 targets from 288 files in 556ms
ninja: Entering directory `out/Debug-device-arm64'
ninja: no work to do.
ninja: Entering directory `out/Debug-device-arm64'
ninja: no work to do.
ninja: Entering directory `out/Debug-device-arm64'
[1/4] CXX obj/talk/owt/owt_sdk_conf/conferencesocketsignalingchannel.o
FAILED: obj/talk/owt/owt_sdk_conf/conferencesocketsignalingchannel.o 
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/talk/owt/owt_sdk_conf/conferencesocketsignalingchannel.o.d -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCR_XCODE_VERSION=1420 -DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-1\" -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DOWT_LIBRARY_IMPL -DWEBRTC_ENABLE_SYMBOL_EXPORT -DWEBRTC_ENABLE_OBJC_SYMBOL_EXPORT -DWEBRTC_ENABLE_AVX2 -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=1 -DWEBRTC_POSIX -DWEBRTC_MAC -DWEBRTC_IOS -DABSL_ALLOCATOR_NOTHROW=1 -DHAVE_WEBRTC_VIDEO -I../../talk/owt/sdk/include/cpp -I../../third_party -I../../talk/owt/socket.io-client-cpp-ios-static/static_builds/commit_b1216ee428dd7d1e72368da9b12aa43bfc487c93/arm64_libsioclient/include -I../.. -Igen -I../../third_party/libyuv/include -I../../third_party/jsoncpp/source/include -I../../third_party/webrtc -Igen/third_party/webrtc -I../../third_party/abseil-cpp -I../../third_party/webrtc/sdk/objc -I../../third_party/webrtc/sdk/objc/base -Wall -Werror -Wextra -Wimplicit-fallthrough -Wextra-semi -Wunreachable-code-aggressive -Wthread-safety -Wunguarded-availability -Wundeclared-selector -Wno-missing-field-initializers -Wno-unused-parameter -Wloop-analysis -Wno-unneeded-internal-declaration -Wenum-compare-conditional -Wno-psabi -Wno-ignored-pragma-optimize -Wno-deprecated-builtins -Wno-bitfield-constant-conversion -Wshadow -fno-delete-null-pointer-checks -fno-ident -fno-strict-aliasing -fstack-protector-strong -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -ffp-contract=off -target arm64-apple-ios11.0 -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -no-canonical-prefixes -ftrivial-auto-var-init=pattern -O0 -fno-omit-frame-pointer -g2 -gdwarf-aranges -Xclang -debug-info-kind=limited -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wimplicit-retain-self -Wstrict-overflow -Wmissing-field-initializers -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -std=c++20 -Wno-trigraphs -fno-exceptions -fno-rtti -Wno-deprecated-declarations -Wno-undef -c ../../talk/owt/sdk/conference/conferencesocketsignalingchannel.cc -o obj/talk/owt/owt_sdk_conf/conferencesocketsignalingchannel.o
In file included from ../../talk/owt/sdk/conference/conferencesocketsignalingchannel.cc:14:
../../talk/owt/sdk/conference/conferencesocketsignalingchannel.h:16:10: fatal error: 'sio_client.h' file not found
#include "sio_client.h"
         ^~~~~~~~~~~~~~
1 error generated.
[2/4] CXX obj/talk/owt/owt_sdk_conf/conferencepeerconnectionchannel.o
FAILED: obj/talk/owt/owt_sdk_conf/conferencepeerconnectionchannel.o 
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/talk/owt/owt_sdk_conf/conferencepeerconnectionchannel.o.d -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCR_XCODE_VERSION=1420 -DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-1\" -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DOWT_LIBRARY_IMPL -DWEBRTC_ENABLE_SYMBOL_EXPORT -DWEBRTC_ENABLE_OBJC_SYMBOL_EXPORT -DWEBRTC_ENABLE_AVX2 -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=1 -DWEBRTC_POSIX -DWEBRTC_MAC -DWEBRTC_IOS -DABSL_ALLOCATOR_NOTHROW=1 -DHAVE_WEBRTC_VIDEO -I../../talk/owt/sdk/include/cpp -I../../third_party -I../../talk/owt/socket.io-client-cpp-ios-static/static_builds/commit_b1216ee428dd7d1e72368da9b12aa43bfc487c93/arm64_libsioclient/include -I../.. -Igen -I../../third_party/libyuv/include -I../../third_party/jsoncpp/source/include -I../../third_party/webrtc -Igen/third_party/webrtc -I../../third_party/abseil-cpp -I../../third_party/webrtc/sdk/objc -I../../third_party/webrtc/sdk/objc/base -Wall -Werror -Wextra -Wimplicit-fallthrough -Wextra-semi -Wunreachable-code-aggressive -Wthread-safety -Wunguarded-availability -Wundeclared-selector -Wno-missing-field-initializers -Wno-unused-parameter -Wloop-analysis -Wno-unneeded-internal-declaration -Wenum-compare-conditional -Wno-psabi -Wno-ignored-pragma-optimize -Wno-deprecated-builtins -Wno-bitfield-constant-conversion -Wshadow -fno-delete-null-pointer-checks -fno-ident -fno-strict-aliasing -fstack-protector-strong -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -ffp-contract=off -target arm64-apple-ios11.0 -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -no-canonical-prefixes -ftrivial-auto-var-init=pattern -O0 -fno-omit-frame-pointer -g2 -gdwarf-aranges -Xclang -debug-info-kind=limited -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wimplicit-retain-self -Wstrict-overflow -Wmissing-field-initializers -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -std=c++20 -Wno-trigraphs -fno-exceptions -fno-rtti -Wno-deprecated-declarations -Wno-undef -c ../../talk/owt/sdk/conference/conferencepeerconnectionchannel.cc -o obj/talk/owt/owt_sdk_conf/conferencepeerconnectionchannel.o
In file included from ../../talk/owt/sdk/conference/conferencepeerconnectionchannel.cc:4:
In file included from ../../talk/owt/sdk/conference/conferencepeerconnectionchannel.h:12:
../../talk/owt/sdk/conference/conferencesocketsignalingchannel.h:16:10: fatal error: 'sio_client.h' file not found
#include "sio_client.h"
         ^~~~~~~~~~~~~~
1 error generated.
[3/4] CXX obj/talk/owt/owt_sdk_conf/conferenceclient.o
FAILED: obj/talk/owt/owt_sdk_conf/conferenceclient.o 
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/talk/owt/owt_sdk_conf/conferenceclient.o.d -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCR_XCODE_VERSION=1420 -DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-1\" -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DOWT_LIBRARY_IMPL -DWEBRTC_ENABLE_SYMBOL_EXPORT -DWEBRTC_ENABLE_OBJC_SYMBOL_EXPORT -DWEBRTC_ENABLE_AVX2 -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=1 -DWEBRTC_POSIX -DWEBRTC_MAC -DWEBRTC_IOS -DABSL_ALLOCATOR_NOTHROW=1 -DHAVE_WEBRTC_VIDEO -I../../talk/owt/sdk/include/cpp -I../../third_party -I../../talk/owt/socket.io-client-cpp-ios-static/static_builds/commit_b1216ee428dd7d1e72368da9b12aa43bfc487c93/arm64_libsioclient/include -I../.. -Igen -I../../third_party/libyuv/include -I../../third_party/jsoncpp/source/include -I../../third_party/webrtc -Igen/third_party/webrtc -I../../third_party/abseil-cpp -I../../third_party/webrtc/sdk/objc -I../../third_party/webrtc/sdk/objc/base -Wall -Werror -Wextra -Wimplicit-fallthrough -Wextra-semi -Wunreachable-code-aggressive -Wthread-safety -Wunguarded-availability -Wundeclared-selector -Wno-missing-field-initializers -Wno-unused-parameter -Wloop-analysis -Wno-unneeded-internal-declaration -Wenum-compare-conditional -Wno-psabi -Wno-ignored-pragma-optimize -Wno-deprecated-builtins -Wno-bitfield-constant-conversion -Wshadow -fno-delete-null-pointer-checks -fno-ident -fno-strict-aliasing -fstack-protector-strong -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -ffp-contract=off -target arm64-apple-ios11.0 -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -no-canonical-prefixes -ftrivial-auto-var-init=pattern -O0 -fno-omit-frame-pointer -g2 -gdwarf-aranges -Xclang -debug-info-kind=limited -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wimplicit-retain-self -Wstrict-overflow -Wmissing-field-initializers -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -std=c++20 -Wno-trigraphs -fno-exceptions -fno-rtti -Wno-deprecated-declarations -Wno-undef -c ../../talk/owt/sdk/conference/conferenceclient.cc -o obj/talk/owt/owt_sdk_conf/conferenceclient.o
In file included from ../../talk/owt/sdk/conference/conferenceclient.cc:9:
In file included from ../../talk/owt/sdk/conference/conferencepeerconnectionchannel.h:12:
../../talk/owt/sdk/conference/conferencesocketsignalingchannel.h:16:10: fatal error: 'sio_client.h' file not found
#include "sio_client.h"
         ^~~~~~~~~~~~~~
1 error generated.
ninja: build stopped: subcommand failed.

@vishal2098govind
Copy link

vishal2098govind commented Apr 4, 2023

I followed the instructions from https://github.com/socketio/socket.io-client-cpp/blob/master/INSTALL.md after which I figured out that running make install adds all the required headers(.h) files and .a files which are

  • sio_client.h
  • sio_message.h
  • sio_socket.h
  • libsioclient.a
  • libsioclient_tls.a

inside /usr/local/ directory by default at following locations

/usr/local/include/sio_client.h
/usr/local/include/sio_message.h
/usr/local/include/sio_socket.h
/usr/local/lib/libsioclient.a
/usr/local/lib/libsioclient_tls.a

Thus, I used command python ./scripts/build.py --sio_root /usr/local/ and I got rid of this error atleast.

But now, I am stuck with another error which says

python ./scripts/build.py --sio_root /usr/local/                           
Done. Made 2021 targets from 288 files in 6931ms
ninja: Entering directory `out/Debug-device-arm64'
ninja: no work to do.
ninja: Entering directory `out/Debug-device-arm64'
ninja: no work to do.
ninja: Entering directory `out/Debug-device-arm64'
[7/7] AR obj/talk/owt/libowt_sdk_conf.a
ninja: Entering directory `out/Debug-device-arm64'
ninja: no work to do.
ninja: Entering directory `out/Debug-device-arm64'
ninja: no work to do.
Traceback (most recent call last):
  File "/Users/vishal/development/office/coditation/huddl/huddl-rn-wrapper/owt-poc/src/src/scripts/build.py", line 208, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/vishal/development/office/coditation/huddl/huddl-rn-wrapper/owt-poc/src/src/scripts/build.py", line 197, in main
    dist(opts.arch, opts.scheme)
  File "/Users/vishal/development/office/coditation/huddl/huddl-rn-wrapper/owt-poc/src/src/scripts/build.py", line 126, in dist
    buildwebrtcframework(arch_list, scheme)
  File "/Users/vishal/development/office/coditation/huddl/huddl-rn-wrapper/owt-poc/src/src/scripts/build.py", line 110, in buildwebrtcframework
    distutils.dir_util.copy_tree(
  File "/Users/vishal/.pyenv/versions/3.11.2/lib/python3.11/site-packages/setuptools/_distutils/dir_util.py", line 139, in copy_tree
    raise DistutilsFileError("cannot copy tree '%s': not a directory" % src)
distutils.errors.DistutilsFileError: cannot copy tree 'out/Debug-device-arm64/WebRTC.framework': not a directory

@vishal2098govind
Copy link

vishal2098govind commented Apr 4, 2023

I could finally get rid of this error following #62 (comment) in #62 and had to use the command python ./scripts/build.py --sio_root /usr/local/ --skip_tests to avoid errors in test files stop me.

I could finally see the "Done" message after running this (had to once delete the entire /out/ directory before being able to successfully run this. You could also consider running gclient sync once as well before trying this.)

Finally it generated three folders in out directory.

image

I believe this completes the three steps needed for iOS build steps as mentioned by this https://github.com/open-webrtc-toolkit/owt-client-native#ios

I would want to know the next steps after this, which I am still struggling to find out!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants