The following error occurs when you use GCC to compile a program today:
GCC: Internal error: the file size exceeds the limit
[Root @ hdfs05 copfile] # GCC readxml. c
GCC: Internal error: file size limit exceeded (Program)
Please submit a full bug report.
See <URL: http://bugzilla.redhat.com/bugzilla> for instructions.
[Root @ hdfs05 copfile] # GCC readxml. c
GCC: Internal error: the file size exceeds the limit (Program)
Please submit a complete error report.
For more information, see <URL: http://bugzilla.redhat.com/bugzilla>.
Solution:
This is because I mistakenly run the "ulimit 0" command in shell,
The ulimit command is used to limit certain system resources of a user, including the number of files that can be opened
The CPU time used, the total amount of memory available, the maximum file capacity that can be created by the current shell, and so on.
. For details about how to use the command, refer to the relevant information. Here we only introduce the knowledge related to the file size limit.
Command usage: ulimit [-shacdfilmnpqstuvx] [quota]
The default ulimit option is-F, which limits the maximum size of files that can be created by the current shell. Its unit is
It is KB. Note that it is the current shell. That is, if the ulimit-F command is used in the current shell, its function range
The current shell does not work on other shells.
For example:
Ulimit 1024 = ulimit-F 1024 indicates that the maximum file capacity that can be created is KB = 1 m.
You can use ulimit-f or ulimit to view the limited capacity. If you do not want to limit the size of the created file
Small. You can assign a value to unlimited, for example, ulimit unlimited or ulimit-f.
Unlimited.
Since I used the command ulimit 0 and the maximum file is 0, an error occurs during GCC compilation,
Solution:
Run the command ulimit unlimited in the current shell;
Or
Exit the shell and restart a shell.
In addition, the ulimit-C [quota] command limits the size of core files that can be created. It may be used when you use a GDB program.
For example:
Xiaosuo @ gentux test $ ulimit-C
0
Xiaosuo @ gentux test $ ulimit-C 1000
Xiaosuo @ gentux test $ ulimit-C
1000
Xiaosuo @ gentux test $./A. Out
Segment error (core dumped)
A compilation error occurs and a core file is generated,
Use GDB to debug the core file:
Xiaosuo @ gentux test $ GDB./A. out core