New issue
Advanced search Search tips

Issue 772340 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Oct 2017
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

OSError: [Errno 8] Exec format error

Reported by kenorb@gmail.com, Oct 6 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36 OPR/47.0.2631.71

Steps to reproduce the problem:
1. Followed steps from mac_build_instructions.md
2. Run: env PATH="/usr/bin:$PATH" ninja -C out/Default chrome
At later stages the following error appears:

What is the expected behavior?

What went wrong?
$ env PATH="/usr/bin:$PATH" ninja -C out/Default chrome
ninja: Entering directory `out/Default'
[340/12524] AR irt_x64/obj/components/tracing/proto/libprotos.a
FAILED: irt_x64/obj/components/tracing/proto/libprotos.a 
python "../../build/toolchain/gcc_ar_wrapper.py"  --output=irt_x64/obj/components/tracing/proto/libprotos.a --ar="../../native_client/toolchain/mac_x86/pnacl_newlib/bin/x86_64-nacl-ar"  rcsD @"irt_x64/obj/components/tracing/proto/libprotos.a.rsp"
Traceback (most recent call last):
  File "../../build/toolchain/gcc_ar_wrapper.py", line 78, in <module>
    sys.exit(main())
  File "../../build/toolchain/gcc_ar_wrapper.py", line 74, in main
    return subprocess.call(wrapper_utils.CommandToRun(command))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 8] Exec format error
[342/12524] AR irt_x64/obj/ppapi/native_client/src/untrusted/pnacl_irt_shim/libpnacl_irt_shim_browser.a
FAILED: irt_x64/obj/ppapi/native_client/src/untrusted/pnacl_irt_shim/libpnacl_irt_shim_browser.a 
python "../../build/toolchain/gcc_ar_wrapper.py"  --output=irt_x64/obj/ppapi/native_client/src/untrusted/pnacl_irt_shim/libpnacl_irt_shim_browser.a --ar="../../native_client/toolchain/mac_x86/pnacl_newlib/bin/x86_64-nacl-ar"  rcsD @"irt_x64/obj/ppapi/native_client/src/untrusted/pnacl_irt_shim/libpnacl_irt_shim_browser.a.rsp"
Traceback (most recent call last):
  File "../../build/toolchain/gcc_ar_wrapper.py", line 78, in <module>
    sys.exit(main())
  File "../../build/toolchain/gcc_ar_wrapper.py", line 74, in main
    return subprocess.call(wrapper_utils.CommandToRun(command))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 8] Exec format error
[344/12524] AR irt_x64/obj/third_party/ced/libced.a
FAILED: irt_x64/obj/third_party/ced/libced.a 
python "../../build/toolchain/gcc_ar_wrapper.py"  --output=irt_x64/obj/third_party/ced/libced.a --ar="../../native_client/toolchain/mac_x86/pnacl_newlib/bin/x86_64-nacl-ar"  rcsD @"irt_x64/obj/third_party/ced/libced.a.rsp"
Traceback (most recent call last):
  File "../../build/toolchain/gcc_ar_wrapper.py", line 78, in <module>
    sys.exit(main())
  File "../../build/toolchain/gcc_ar_wrapper.py", line 74, in main
    return subprocess.call(wrapper_utils.CommandToRun(command))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 8] Exec format error
[345/12524] AR irt_x64/obj/base/libbase_static.a
FAILED: irt_x64/obj/base/libbase_static.a 
python "../../build/toolchain/gcc_ar_wrapper.py"  --output=irt_x64/obj/base/libbase_static.a --ar="../../native_client/toolchain/mac_x86/pnacl_newlib/bin/x86_64-nacl-ar"  rcsD @"irt_x64/obj/base/libbase_static.a.rsp"
Traceback (most recent call last):
  File "../../build/toolchain/gcc_ar_wrapper.py", line 78, in <module>
    sys.exit(main())
  File "../../build/toolchain/gcc_ar_wrapper.py", line 74, in main
    return subprocess.call(wrapper_utils.CommandToRun(command))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 8] Exec format error
[346/12524] AR irt_x64/obj/mojo/public/c/system/libmojo_public_system.a
FAILED: irt_x64/obj/mojo/public/c/system/libmojo_public_system.a 
python "../../build/toolchain/gcc_ar_wrapper.py"  --output=irt_x64/obj/mojo/public/c/system/libmojo_public_system.a --ar="../../native_client/toolchain/mac_x86/pnacl_newlib/bin/x86_64-nacl-ar"  rcsD @"irt_x64/obj/mojo/public/c/system/libmojo_public_system.a.rsp"
Traceback (most recent call last):
  File "../../build/toolchain/gcc_ar_wrapper.py", line 78, in <module>
    sys.exit(main())
  File "../../build/toolchain/gcc_ar_wrapper.py", line 74, in main
    return subprocess.call(wrapper_utils.CommandToRun(command))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 8] Exec format error
[347/12524] AR irt_x64/obj/native_client/src/shared/gio/libgio.a
FAILED: irt_x64/obj/native_client/src/shared/gio/libgio.a 
python "../../build/toolchain/gcc_ar_wrapper.py"  --output=irt_x64/obj/native_client/src/shared/gio/libgio.a --ar="../../native_client/toolchain/mac_x86/pnacl_newlib/bin/x86_64-nacl-ar"  rcsD @"irt_x64/obj/native_client/src/shared/gio/libgio.a.rsp"
Traceback (most recent call last):
  File "../../build/toolchain/gcc_ar_wrapper.py", line 78, in <module>
    sys.exit(main())
  File "../../build/toolchain/gcc_ar_wrapper.py", line 74, in main
    return subprocess.call(wrapper_utils.CommandToRun(command))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 8] Exec format error
[348/12524] AR irt_x64/obj/native_client/src/untrusted/nacl/libimc_syscalls.a
FAILED: irt_x64/obj/native_client/src/untrusted/nacl/libimc_syscalls.a 
python "../../build/toolchain/gcc_ar_wrapper.py"  --output=irt_x64/obj/native_client/src/untrusted/nacl/libimc_syscalls.a --ar="../../native_client/toolchain/mac_x86/pnacl_newlib/bin/x86_64-nacl-ar"  rcsD @"irt_x64/obj/native_client/src/untrusted/nacl/libimc_syscalls.a.rsp"
Traceback (most recent call last):
  File "../../build/toolchain/gcc_ar_wrapper.py", line 78, in <module>
    sys.exit(main())
  File "../../build/toolchain/gcc_ar_wrapper.py", line 74, in main
    return subprocess.call(wrapper_utils.CommandToRun(command))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 8] Exec format error
[349/12524] LINK ./mksnapshot
ninja: build stopped: subcommand failed.

Did this work before? N/A 

Chrome version: e7f0416cefe3af6fee4921a25611b0af4cedf868  Channel: n/a
OS Version: OS X 10.12.0
Flash Version:
 

Comment 1 Deleted

Comment 2 Deleted

Comment 3 by kenorb@gmail.com, Oct 6 2017

Sample failing commands (printed from Python code):
CMD: ../../native_client/toolchain/mac_x86/pnacl_newlib/bin/x86_64-nacl-ar rcsD irt_x64/obj/native_client/src/untrusted/nacl/libimc_syscalls.a @irt_x64/obj/native_client/src/untrusted/nacl/libimc_syscalls.a.rsp
CMD: ../../native_client/toolchain/mac_x86/pnacl_newlib/bin/x86_64-nacl-ar rcsD irt_x64/obj/components/tracing/proto/libprotos.a @irt_x64/obj/components/tracing/proto/libprotos.a.rsp
CMD: ../../native_client/toolchain/mac_x86/pnacl_newlib/bin/x86_64-nacl-ar rcsD irt_x64/obj/third_party/ced/libced.a @irt_x64/obj/third_party/ced/libced.a.rsp

I've checked and `x86_64-nacl-ar` file is basically empty, so I had to remove the whole toolchain folder and re-run `gclient sync` again to fix it. I think it got empty, as I was experimenting with `afsctool` tool to compress natively Chrome sources on HFS+ and probably something went wrong. Similarly my git command binary got zeroed as well for some reason, so it could be some internal HFS+ macOS bug.

I think in the normal scenario this won't happen, so please close it.
Labels: Needs-Milestone
Status: WontFix (was: Unconfirmed)
As per comment #3 closing this Issue.
Please feel free to raise a new issue if you face any issue further on chrome.

Thanks..!!

Sign in to add a comment