WebRTC not building for Windows - webrtc

Whenever I try build WebRTC for Windows, I get this error when running gclient runhooks:
________ running 'C:\path\to\depot_tools\python276_bin\python.exe src/build
/landmines.py' in 'C:\path\to\webrtc\src\chromium' Please follow the instructions
at http://www.chromium.org/developers/how-tos/bui ld-instructions-windows
Traceback (most recent call last):
File "src/build/landmines.py", line 215, in <module>
sys.exit(main())
File "src/build/landmines.py", line 202, in main
gyp_environment.SetEnvironment()
File "C:\path\to\webrtc\src\chromium\src\build\gyp_environment.py", line 33, in
SetEnvironment
vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs()
File "C:\path\to\webrtc\src\chromium\src\build\vs_toolchain.py", line 34, in
SetEnvironmentAndGetRuntimeDllDirs
Update()
File "C:\path\to\webrtc\src\chromium\src\build\vs_toolchain.py", line 179, in
Update
subprocess.check_call(get_toolchain_args)
File "C:\path\to\depot_tools\python276_bin\lib\subprocess.py", line 540, in
check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\path\\to\\depot_tools\\python276_bin\\python.exe',
'C:\\path\\to\\depot_tools\\win_toolchain\\get_toolchain_if_necessary.py', '--output-json',
'C:\\path\\to\\webrtc\\src\\chromium\\src\\build\\win_toolchain.json',
'ee7d718ec60c2dc5d255bbe325909c2021a7efef']' returned non-zero exit status 1
Error: Command C:\path\to\depot_tools\python276_bin\python.exe src/build/landmines.py returned non-zero exit status 1 in C:\path\to\webrtc\src\chromium
Hook ''C:\path\to\depot_tools\python276_bin\python.exe' src/build/landmines.py' took 68.55 secs
Error: Command C:\path\to\depot_tools\python276_bin\python.exe - u src/sync_chromium.py --target-revision 271c6cca48a6cef32c0f3add3b17b700707deec 5 returned non-zero exit status 2 in C:\path\to\webrtc
Hook ''C:\path\to\depot_tools\python276_bin\python.exe' -u src/sync_chromium.py --target-revision 271c6cca48a6cef32c0f3add3b17b700707deec5' took 3842.34 secs
I'm using 64-bit Windows 7 with VS 2013 installed. I've already tried setting the following variables:
GYP_DEFINES='windows_sdk_path="C:\path\to\windows\sdk" platform=win
component=shared_library'
DEPOT_TOOLS_WIN_TOOLCHAIN=0
GYP_GENERATORS=msvs
GYP_MSVS_VERSION=2013
Attempting to build chromium also gives the same error. Fetching with nohooks works fine, it's just when I try gclient sync or runhooks that the error occurs. I've also tried building with ninja, and that fails as well. I've got all SDKs and such all up to date. Any help with this would be greatly appreciated.

I have found this possible solution at Google Code
as per braveyao#webrtc.org's sugestion
Supporting msvs is not the focus of Chromium. You can try ninja which
should always work. Also you could try to set the
"GYP_GENERATORS=msvs-ninja,ninja". Then you could build with ninja and
debug with VS2013.
Also, chromium is now 64bit only so you need to change GYP_DEFINES aswell
so your envirnment variables should be:
GYP_DEFINES=target_arch=x64
DEPOT_TOOLS_WIN_TOOLCHAIN=0
GYP_GENERATORS=msvs-ninja,ninja
GYP_MSVS_VERSION=2013
Of course replace 2013 if that's not the version of Visual Studio you have installed
you may need to delete what you already have downloaded and do a fresh fetch webrtc after that change if you thinkered with it
I should also add that the Windows must be english version (it's ok if you after install some other language pack but it must be originally english) - i have a PT-PT version at home and that one always gives an error with some python file when running gclient sync - at work though i originally had english version and installed the PT-PT language pack but it works fine
This is what worked for me. Does that work for you?

Related

WSLTTY/MINTTY Fails on Launch

After a machine restart last night my WSLTTY/MINTTY terminal crashes when I attempt to launch it. It displays an error message briefly before it crashes that reads:
note: backend error output: Assertion failed: connectRet == 0 (nix-sock.c: nix_local_connect: 67)
I'm on Windows 10, using WSL1, not WSL 2. I uninstalled WSLTTY and re-installed the most recent version, 3.5.1. The issue remained. I then uninstalled Ubuntu and re-installed the most recent version, 20.04.03 LTS. The issue still remains. I also tried installing an older version of WSLTTY/MINTTY (1.7.9) and received a slightly different error:
/bin/wslbridge: Exit 1 wslbridge error: failed to start backend process note: backend error output: wslbridge=backend.cc:44: int{anonymous}:: connectsocket(int const string &): Assertion 'connectRet==0' failed
So it seems the issue may have something to do with something called the wslbridge? Looks like there is an original version and a second version. wslbridge2.exe and wslbridge2-backend both live in wsltty/bin/ (with the newest version of WSLTTY/MINTTY).
I had WSLTTY/MINTTY configured pretty heavily and really enjoyed the way I had it set up. I'm really hoping I can get it working again and don't have to switch to a different terminal emulator or use the Windows one. Any help would be greatly appreciated.

locusts-plugins: FileNotFoundError: [WinError 2] The system cannot find the file specified

I've installed the locusts-plugins along with the other required modules as shown in the setup.py:
"locust>=1.4.3",
"psycogreen",
"psycopg2-binary",
"websocket-client",
"python-dateutil",
"pymongo",
"confluent-kafka",
"selenium>=4.0.0.b2",
"lxml",
"opencensus-ext-azure"
But when I attempt to run any of the examples using the webdrivers I get the error:
File "c:\users\mjohns33\pycharmprojects\pythonproject\venv\lib\site-packages\gevent\subprocess.py", line 1270, in _execute_child
hp, ht, pid, tid = CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
2021-04-12T20:11:44Z <Greenlet at 0x55012d0: > failed with FileNotFoundError
I have the standalone server running and chromedriver in the path, is there something I'm missing?
Thanks for the full callstack. The command that it is complaining about is killall, which is not available on Windows.
I've only ever run WebdriverUser on Mac and Linux. It might work if you just comment out that line (c:\users\mjohns33\pycharmprojects\pythonproject\venv\lib\site-packages\locust_plugins\users\webdriver.py, line 127)
(and manually kill chromedriver as needed)
I figured out that the locust-plugins is all-inclusive, meaning you don't want to install selenium or any other modules. Python, locust and locust-plugins, that's it.
I still see new errors but just having what's needed clears up a lot of these issues.

Segmentation Error: Local Machine Fails (16gb) but AWS EC2 works (1gb)

I understand this is a little vague but not sure where else to go to or things to debug. My python script was running fine yesterday. I made minor changes today and now it only runs successfully on my Amazon LightSail (ec2) machine. Everything I read about segmentation errors is that there is not enough memory, however my local machine has 16gb of ram while the cloud machine only has 1gb. Plus I am not working with big files? The files being imported/manipulated are typically under 2mb and there are like 7-10 files.
I feel it may be something related to my terminal/zsh rather than my codes.
The below is the error code I can not seem to manage to get around.
I've done enough research to find the python faulthandler module import faulthandler; faulthandler.enable() to give the debugging below:
Fatal Python error: Segmentation fault
Current thread 0x000000010c58edc0 (most recent call first):
File "/Users/garrett/opt/anaconda3/lib/python3.7/site-packages/pandas/core/groupby/generic.py", line 1795 in <genexpr>
File "/Users/garrett/opt/anaconda3/lib/python3.7/site-packages/pandas/core/groupby/generic.py", line 1797 in <listcomp>
File "/Users/garrett/opt/anaconda3/lib/python3.7/site-packages/pandas/core/groupby/generic.py", line 1797 in count
File "GmailDownloader.py", line 215 in <module>
zsh: segmentation fault python *.py
The code seems to regularly break on line 215 while trying to compute a gorupby in pandas but it is very similar to other groupbys in the code that were successful before it.
I am on a Mac Catlina using the pre-baked zsh for my terminal handling but even when I switch to good ol' bash using chsh -s /bin/bash in my terminal and then running the code I still get a zsh segmentation error.
I have recently tried out PyCharm today and it asked for permissions to store something in a bin folder to which I just said yes. I'm not sure if that is correlated at all or not.
The full code repository: https://github.com/GarrettMarkScott/AutomotiveCRMPuller
Ongoing list of other things I have tried:
Trashing the Terminal preferences (~/Library/Preferences/com.apple.Terminal.plist)
I almost threw in the towel but tried to reinstall my pandas since it was mentioned in my bug error and what do you know it worked after running pip install --upgrade pandas
Would of been impossible without the FaultHandler! Hopefully this helps someone out there!

Python 3.6: FileNotFoundError: [WinError 2] The system cannot find the file specified when running PDF-DIFF tool

I have a Windows 10 x64 based PC. I am trying to get this PDF-DIFF Python tool here: https://github.com/JoshData/pdf-diff
to run and it hits this error when it is running a line from Python Lib file called 'subprocess.py' file.
I posted this issue with full screenshots of the error and still waiting for response:
https://github.com/JoshData/pdf-diff/issues/30
Just to note that before installation of this github tool I :
1) installed Python 3.6 (tried both 32 bit and 64) and currently have 32 bit
2) installed Microsoft Visual Studio 14.0 Build tools (C++ build tools)
3) in command prompt ran command: pip install lxml so that I could have
the xml libraries downloaded and satisfy the tool's requirements
4) additionally have checked other stackoverflow threads suggesting that 'file not found' error is due to 'COMSPEC' variable being set differently in regedit vs. Python's subprocess.py.
In windows key registry, 'ComSpec' key set to: %SystemRoot%\system32\cmd.exe;
In python subprocess call is being made as such (last line is 997):
if shell:
startupinfo.dwFlags |= _winapi.STARTF_USESHOWWINDOW
startupinfo.wShowWindow = _winapi.SW_HIDE
comspec = os.environ.get("COMSPEC", "cmd.exe")
args = '{} /c "{}"'.format (comspec, args)
#Start the process
try:
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
# no special security
None, None,
int(not close_fds),
creationflags,
env,
os.fspath(cwd) if cwd is not None else
None,
startupinfo)
I'm out of ideas, and feel the program requirements are satisfied.
So, when I run the command in the prompt to get my two PDF files compared and output comparison spit out:
C:\Python36\Scripts\pdf_diff>pdf-diff 683000.pdf 17368000.pdf > comparison_output.png
*I immediately get error shown below:
Traceback (most recent call last):
File "C:\Python36\Scripts\pdf_diff\pdf-diff-script.py", line 11, in
load_entry_point('pdf-diff==0.9.0', 'console_scripts', 'pdf-diff')()
File "C:\Python36\lib\site-packages\pdf_diff-0.9.0-py3.6.egg\pdf_diff\command_line.py", line 496, in main
changes = compute_changes(args.files[0], args.files[1], top_margin=float(args.top_margin), bottom_margin=float(args.bottom_margin))
File "C:\Python36\lib\site-packages\pdf_diff-0.9.0-py3.6.egg\pdf_diff\command_line.py", line 14, in compute_changes
docs = [serialize_pdf(0, pdf_fn_1, top_margin, bottom_margin), serialize_pdf(1, pdf_fn_2, top_margin, bottom_margin)]
File "C:\Python36\lib\site-packages\pdf_diff-0.9.0-py3.6.egg\pdf_diff\command_line.py", line 29, in serialize_pdf
for run in box_generator:
File "C:\Python36\lib\site-packages\pdf_diff-0.9.0-py3.6.egg\pdf_diff\command_line.py", line 102, in mark_eol_hyphens
for next_box in boxes:
File "C:\Python36\lib\site-packages\pdf_diff-0.9.0-py3.6.egg\pdf_diff\command_line.py", line 64, in pdf_to_bboxes
xml = subprocess.check_output(["pdftotext", "-bbox", fn, "/dev/stdout"])
File "C:\Python36\lib\subprocess.py", line 336, in check_output
**kwargs).stdout
File "C:\Python36\lib\subprocess.py", line 403, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Python36\lib\subprocess.py", line 709, in init
restore_signals, start_new_session)
File "C:\Python36\lib\subprocess.py", line 997, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
I believe I found out the problem here. In the process of installing different versions of Python, namely 2.7 and 3.6 I broke something. I believe it could be the importing of different modules for the PDF-diff program. The PDF-DIFF program, according to manual is coded for Python 3. So, I believe the issue above was a versioning issue. I have for now removed Python 3.6 from my machine as I need 2.7 for other projects.

Kivy does not provide a python shell on yosemite

I failed to let kivy work on my mac (yosemite 10.10.4). After placing kivy in applications and running makesymlinks, I expected to get a python shell after the 'kivy' command. However, I got the following error.
Script started, output file is started
Script: on: No such file or directory
Script done, output file is started
/usr/local/bin/kivy: line 2: bash-3.2$: command not found
/usr/local/bin/kivy: line 3: bash:: command not found
/usr/local/bin/kivy: line 4: bash-3.2$: command not found
: command not found: line 5: Password:
/usr/local/bin/kivy: line 6: sudo:: command not found
/usr/local/bin/kivy: line 7: syntax error near unexpected token `('
'usr/local/bin/kivy: line 7: `bash-3.2$ exit()
Meanwhile I started developing on ubuntu, which works fine, but if I want to deploy my app on my ipad, it seems that I still need kivy nicely installed on my mac, because buildozer seems to require to run on mac when deploying for iOS.
Any tips are very welcome.
Note: I tried macport too, but received the following error
Error: org.macports.build for port py27-kivy returned: command execution failed
Please see the log file for port py27-kivy for details:
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports .org_release_tarballs_ports_python_py-kivy/py27-kivy/main.log
To report a bug, follow the instructions in the guide:
http://guide.macports.org/#project.tickets
Error: Processing of port py27-kivy failed
I ended up to conclude that the Kivy installation was corrupt. Re-installing it was not enough, but first uninstalling the existing one, and afterwards install a fresh download brought a solution.
I found this solution thanks to qua-non, who was also active in the kivy users support group. Thanks!