Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOS Build Failed: OSError: [Errno 7] Argument list too long #73

Closed
jtyang opened this issue Oct 24, 2018 · 2 comments
Closed

IOS Build Failed: OSError: [Errno 7] Argument list too long #73

jtyang opened this issue Oct 24, 2018 · 2 comments

Comments

@jtyang
Copy link

jtyang commented Oct 24, 2018

Hi:
Does anyone have this problem when compiling ios on mac?
Failed to execute link command in link_static_library() function。

Error log:
-----------------------------
Traceback (most recent call last):
  File "./tools/build.py", line 2054, in <module>
    sys.exit(main(sys.argv[1:]))
  File "./tools/build.py", line 2044, in main
    build.package_target()
  File "./tools/build.py", line 1614, in package_target
    libs.append(build.link_static_library())
  File "./tools/build.py", line 1685, in link_static_library
    self.execute(command)
  File "./tools/build.py", line 721, in execute
    res = self.execute_with_error(command, env=env, cwd=cwd)
  File "./tools/build.py", line 715, in execute_with_error
    job = subprocess.Popen(command, env=env, cwd=cwd)
  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 7] Argument list too long
------------------------
Thanks!
@haru398801
Copy link

Hello. Can I know build script on your terminal?
That error message was arise when you have typo in build command.

Thanks.

@jtyang
Copy link
Author

jtyang commented Oct 24, 2018

I am using the stellite build.py script to compile the latest version of the chromium code.

Maybe I have found the problem, because the ARG_MAX of the mac system is too small, I try to modify the command of the build.py---IOSBuild()---link_static_library() function seems to be fine.
The previous command is:
libtool -static *.o -arch_only armv7 -o /outdir/out_ios_arm/libxxx_arm.a
Change to:
libtool -static -arch_only armv7 -o /outdir/out_ios_arm/libxxx_arm.a -filelist /outdir/libtest.a.rsp
(Key point: Write all *.o files to a file first)

Thanks!

@jtyang jtyang closed this as completed Oct 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants