GCC: Internal error: file size exceeds limit GCC: Internal error: file size limit exceeded

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.