Mac 4147 - Run cef/tools/translator.sh failed

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Mac 4147 - Run cef/tools/translator.sh failed

Postby xuyoucai » Mon Mar 29, 2021 9:52 pm

The error msg like below:

Code: Select all
Parsing C++ headers from /Users/mac/google/cef/chromium/src/cef/include...
In C API header directory /Users/mac/google/cef/chromium/src/cef/include/capi...
Generating cef_accessibility_handler.h C API header...
Traceback (most recent call last):
  File "translator.py", line 174, in <module>
    update_file(*write_capi_header(header, capi_header_dir, filename))
  File "translator.py", line 148, in update_file
    result = clang_format(file, newcontents)
  File "/Users/mac/google/cef/chromium/src/cef/tools/clang_util.py", line 26, in clang_format
    root_dir, file_contents.encode('utf-8'))
  File "/Users/mac/google/cef/chromium/src/cef/tools/exec_util.py", line 33, in exec_cmd
    shell=(sys.platform == 'win32'))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
xuyoucai
Techie
 
Posts: 13
Joined: Tue Oct 20, 2020 6:28 am

Re: Mac 4147 - Run cef/tools/translator.sh failed

Postby magreenblatt » Mon Mar 29, 2021 10:10 pm

What OS and CEF version? How did you download the CEF/Chromium source code? Have you built successfully?
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Mac 4147 - Run cef/tools/translator.sh failed

Postby xuyoucai » Mon Mar 29, 2021 10:22 pm

My OS version is 10.15.7 and CEF version is 84.0.0-4147+fdc75046316a1c9366143df25e163e0c634a0022.
I download CEF/Chromium by automate-git.py.
Yes, I built it successfullly.
xuyoucai
Techie
 
Posts: 13
Joined: Tue Oct 20, 2020 6:28 am

Re: Mac 4147 - Run cef/tools/translator.sh failed

Postby magreenblatt » Mon Mar 29, 2021 10:41 pm

You seem to be missing the clang-format binary. Does chromium/src/buildtools/mac/clang-format exist for you? If not, try running “gclient runhooks” from inside the chromium/src directory.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Mac 4147 - Run cef/tools/translator.sh failed

Postby xuyoucai » Mon Mar 29, 2021 10:47 pm

The clang-format binary exist for me.
xuyoucai
Techie
 
Posts: 13
Joined: Tue Oct 20, 2020 6:28 am

Re: Mac 4147 - Run cef/tools/translator.sh failed

Postby xuyoucai » Tue Mar 30, 2021 3:59 am

I modify the script code in cef/tools/clang_util.py(line 19).
I change the clang_format_exe path to a absolute path and it's work fine.
But I don't know why it work failed when using the relative path?

Code: Select all
if sys.platform == 'win32':
  # Force use of the clang-format version bundled with depot_tools.
  clang_format_exe = 'clang-format.bat'
else:
  clang_format_exe = '/Users/mac/google/cef/chromium/src/buildtools/mac/clang-format'
xuyoucai
Techie
 
Posts: 13
Joined: Tue Oct 20, 2020 6:28 am

Re: Mac 4147 - Run cef/tools/translator.sh failed

Postby magreenblatt » Tue Mar 30, 2021 9:13 am

What directory are you running translator.sh from? Try running it from inside the tools directory.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Mac 4147 - Run cef/tools/translator.sh failed

Postby xuyoucai » Tue Mar 30, 2021 10:35 pm

I‘m running it from inside the tools directory from the beginning.
xuyoucai
Techie
 
Posts: 13
Joined: Tue Oct 20, 2020 6:28 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 36 guests