- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Ansi c compiler
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2002 08:46 AM
11-22-2002 08:46 AM
Ansi c compiler
does the Ansi C compiler 11.11.02 or the HP-UX 11.00 default shell have a limitation on the number of command line arguments passed ?
I have to compile with a lot of arguments (lots of -I for directory includes) and when I launch the cc command it loops infinitely. When I eliminate only one argument of the ~150 it actually compiles !
Any Ideas ?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2002 08:58 AM
11-22-2002 08:58 AM
Re: Ansi c compiler
You can bipass the shell limitation by using xargs!
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2002 09:57 AM
11-22-2002 09:57 AM
Re: Ansi c compiler
But I saw under linux a kernel option that can be increased to alloacte more memory for command line arguments, this requires of course recompiling the kernel.
Is there something similar I can do in sam ?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2002 03:51 AM
11-25-2002 03:51 AM
Re: Ansi c compiler
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xf5963a1c04ffd61190050090279cd0f9,00.html
Look at the second answer of S.K. Chan
Good luck
Adam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2002 04:38 AM
11-25-2002 04:38 AM
Re: Ansi c compiler
In 10.20 this limit was quite small and we needed a kernel parameter to increase it. Since 11.00 there is no increasable limit : it's fixed (and high !!!) in /usr/include/limits.h, (#define ARG_MAX).
# define ARG_MAX 2048000 /* maximum length of arguments for the exec function in bytes, including environment data */
You can get this value using :
# getconf ARG_MAX
2048000
I think your limitation is rather in the compiler.
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2002 02:06 AM
11-27-2002 02:06 AM
Re: Ansi c compiler
If you think you need a large value, I suggest reconsidering the design of your program. For example, consider GNU tar. To create a tar archive holding particular files, you place each file as a command-line argument. But tar is often used for backing up large directory trees, meaning potentially many (in fact, an unlimited number of) command-line arguments. Therefore GNU tar has an option for reading a list of filenames from a file. As another example, consider the recursive (-R) option of chmod.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2002 01:59 PM
11-27-2002 01:59 PM
Re: Ansi c compiler
However, there is an option to move command arguments into a file instead of the command line. You can use "cc +opts myfile" to ask cc to read options from "myfile" just as if they were on the command line.
There is a similar "-c myfile" option for ld.