Re[3]: "Argument list too long" error due to huge number of -I<dir> parameters in gcc command line

Vasily Lukichev
Fri Jul 20 07:27:00 GMT 2012


I would like to share all findings.

1. Try to remove all unused environment variables to give more memory for command line arguments.
2. Increase ARG_MAX value. Restricted solution since root is required to do that.
3. Use option @file.
4. Use option –specs=<file>.
5. Use C_PATH and others variables..

In our case option #4 was the best solution.


More information about the Gcc-help mailing list