Error Message "fatal error: 'cstdint' file not found" Is Displayed During ATC Conversion on Ubuntu 22.04
Symptom
When the ATC conversion command is executed on Ubuntu 22.04, the error message "fatal error: 'cstdint' file not found" is displayed.
Figure 1 Error message
Possible Causes
When multiple GCC versions are installed in the environment, the GCC of a later version in the default installation path is used for CCEC compilation. However, during the installation of the GCC of a later version, some files are missing. As a result, the cstdint header file cannot be found.
The locating process is as follows:
- Run the following command to check the GCC status in the environment:
1 2
cd /usr/lib/gcc/aarch64-linux-gnu ll
The following command output shows that two installation directories (GCC 11 and GCC 12) exist.

- Run the following command to query the GCC version in the environment:
1dpkg -l | grep gcc
The following command output shows that two versions (GCC 11 and GCC 12) exist.

- Check whether the header file exists in each version, and find that the header file exists only in the GCC 11 version. The path is as follows:
1/usr/include/c++/11/cstdint
Solution
Run the following command to uninstall GCC 12 and use the installed GCC 11 for compilation:
1
|
apt remove gcc-12 libgcc-12-dev |
Parent topic: Appendix C: Installation Troubleshooting