File Name Is Too Long During Operator Project Compilation
Symptom
In the project-based operator development scenario, when you are building an operator project, one of the following error messages is displayed:
- file name is too long (cannot be split); not dumped
1 2 3 4 5 6 7 8 9 10 11
ERROR: failed to create temporary archive: /tmp/mkself336430.tar CMake Error at /addcustom/cmake/makeself.cmake:12 (message): CPack Command error: 1 Header is 672 lines long tar: ./packages/vendors/customize/op_proto/inc/my_very_long_and_detailed_c_plus_plus_project_source_code_file_containing_advanced_features_and_implementations.h: file name is too long (cannot be split); not dumped tar: Exiting with failure status due to previous errors
- file name is too long (max 256); not dumped
1 2 3 4 5 6 7 8 9
ERROR: failed to create temporary archive: /tmp/mkself133003.tar CMake Error at /root/r00882787/Customproj/addcustom/cmake/makeself.cmake:12 (message): CPack Command error: 1 Header is 672 lines long tar: ./packages/vendors/ProjectX_FeatureY_Z_20241118_Monday_Development_BranchA1_Commit56789_AlphaVersion_ABCDEFGHIJKLM/op_impl/ai_core/tbe/ProjectX_FeatureY_Z_20241118_Monday_Development_BranchA1_Commit56789_AlphaVersion_ABCDEFGHIJKLM_impl/dynamic/add_custom.cpp: file name is too long (max 256); not dumped
Cause Analysis
During build, the length of the file name or path exceeds the system limit. As a result, an error occurs when the tar command is used to pack the file generated by the operator project.
Troubleshooting Procedure
If such an error is reported, reduce the length of the file name or path based on the error message.
The solutions to common errors are as follows:
- File name too long
- For the kernel code in the op_kernel directory of the operator project and host code in the op_host directory, their file names are automatically generated based on the operator OpType input during operator project creation. If an error is reported because the generated file name is too long, reduce the length of OpType.
- After the Comment API is used to set the operator group name, a prototype definition code file with the same name is generated for GE to call. If an error is reported because the generated file name is too long, reduce the length of the operator group name.
- File path too long
If vendor_name is configured in the CMakePresets.json file when you complete project build configuration, a path named after vendor_name is generated in the vendor directory during build. If an error is reported because the file path is too long, reduce the length of vendor_name.