execvp: /bin/sh: Argument list too long - Compilation Error
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
execvp: /bin/sh: Argument list too long - Compilation Error
Hi All,
Im facing compilation problem.
The compilation gives an error of "too many arguments" since there seem to be an OS limitation of command length in all the new OS versions. The compilation is kernel dependent and is not compatible with my 2.6.9-67.
I have an old machine which has an kernel version(2.4.21), i am using this machine for Compilation.
execvp: /bin/sh: Argument list too long - This is a common problem which actually signifies limitation of OS, and exists for solaris and other distros also.
--------------
Error that comes in all other kernel versions except 2.4.21-40:-
------------
gmake[1]: Entering directory gmake[1]: execvp: /bin/sh: Argument list too long
gmake[1]: *** Error 127
gmake[1]: Leaving directory
-----------
Can you please suggest some solution for this. If something can be done with the code, which can solve this problem , or if some patch is available to fix this.
Im facing compilation problem.
The compilation gives an error of "too many arguments" since there seem to be an OS limitation of command length in all the new OS versions. The compilation is kernel dependent and is not compatible with my 2.6.9-67.
I have an old machine which has an kernel version(2.4.21), i am using this machine for Compilation.
execvp: /bin/sh: Argument list too long - This is a common problem which actually signifies limitation of OS, and exists for solaris and other distros also.
--------------
Error that comes in all other kernel versions except 2.4.21-40:-
------------
gmake[1]: Entering directory gmake[1]: execvp: /bin/sh: Argument list too long
gmake[1]: *** Error 127
gmake[1]: Leaving directory
-----------
Can you please suggest some solution for this. If something can be done with the code, which can solve this problem , or if some patch is available to fix this.
Like you said, Actual limitation is not on command length, but on command length + environment length , the default space is 131K , which equals 128K argument and enviornment 3K , which is defined in limits.h.
Can you suggest some work around, how to clean the environment variables to fix this as i tried doing the clean using gmake clean before starting the compilation...!!!
Like you said, Actual limitation is not on command length, but on command length + environment length , the default space is 131K , which equals 128K argument and enviornment 3K , which is defined in limits.h.
Can you suggest some work around, how to clean the environment variables to fix this as i tried doing the clean using gmake clean before starting the compilation...!!!
You don't indicate what program you are trying to build.
Some programs (like newlib or glibc) generate long argument lists to add object files to archives. The makefile can be edited to covert a single invocation of a program (say, ar) to use xargs.
You have re-opened a thread that had been closed for **ELEVEN YEARS**...not surprised at all that the advice in here doesn't work now. And if you want help you need to go back to your OTHER thread about the same issue.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.