line / stellite

Stellite project is a client library and server application that offers an easy way to develop, build, and implement client/server running primarily over the QUIC protocol developed by Google as part of the Chromium project.
Apache License 2.0
475 stars 81 forks source link

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

Closed jtyang closed 6 years ago

jtyang commented 6 years ago
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 commented 6 years ago

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

Thanks.

jtyang commented 6 years ago

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!