当编译只有一个main.cpp文件的OpenMP工程时,如果代码中使用的STL库,编译器会报内部错误,语言标准为C++14,器件为c6678。main.cpp代码如下:
报如下错误:
编译选项为:
我的项目需要同时用的Openmp和C++14的STL,请问该如何解决这个问题?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
当编译只有一个main.cpp文件的OpenMP工程时,如果代码中使用的STL库,编译器会报内部错误,语言标准为C++14,器件为c6678。main.cpp代码如下:
#include <vector> struct ABC{ float *data; } void test_fxn(const std::vector<ABC>& obj) { float * data=obj[0].data; }
报如下错误:
**** Build of configuration Debug for project test **** "C:\\ti\\ccs930\\ccs\\utils\\bin\\gmake" -k -j 64 all -O Building file: "../main.cpp" Invoking: C6000 Compiler "C:/ti/ccs930/ccs/tools/compiler/ti-cgt-c6000_8.3.8/bin/cl6x" -mv6600 --include_path="C:/Users/YuHaoxin/Documents/CCS_Workspace/test" --include_path="C:/ti/ccs930/ccs/tools/compiler/ti-cgt-c6000_8.3.8/include" -g --c99 --c++14 --diag_warning=225 --diag_wrap=off --display_error_number --multithread --openmp --preproc_with_compile --preproc_dependency="main.d_raw" --cmd_file="C:/Users/YuHaoxin/Documents/CCS_Workspace/cfg/Debug/configPkg/compiler.opt" "../main.cpp" >> Compilation failure subdir_rules.mk:9: recipe for target 'main.obj' failed INTERNAL ERROR: C:\ti\ccs930\ccs\tools\compiler\ti-cgt-c6000_8.3.8\bin\acpia6x.exe experienced a segmentation fault while processing function (unknown or file scope) file ../main.cpp line 9 This is caused by a defect in the TI EABI C/C++ Parser. TI Customer Support may be able to suggest a workaround to avoid this. Upgrading to the newest version of the compiler may fix this problem. Contact TI in the E2E support forums at http://e2e.ti.com under "Development Tools", "TI C/C++ Compiler". See the link titled "Submitting an issue". We need to see this ENTIRE error message and a complete, reproducible test case including ALL of the command-line options. Include the .pp file created by option --preproc_with_comment gmake: *** [main.obj] Error 1 gmake: Target 'all' not remade because of errors. **** Build Finished ****
编译选项为:
-mv6600 --include_path="C:/Users/YuHaoxin/Documents/CCS_Workspace/test" --include_path="C:/ti/ccs930/ccs/tools/compiler/ti-cgt-c6000_8.3.8/include" -g --c99 --c++14 --diag_warning=225 --diag_wrap=off --display_error_number --multithread --openmp
我的项目需要同时用的Openmp和C++14的STL,请问该如何解决这个问题?
是否有尝试过上面帖子里的办法?
CCS allows for File Specific Options. With that you can enable --openmp at the project level, and then manually remove --openmp on specific C++ source files which cause the compiler crash.
我看到您在e2e上也发帖了。建议再跟帖问一下产品线工程师,或者我帮您跟帖也可以,最好把可以编译的C++贴一下作参考。
https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1040786/tms320c6678-c6000-8-3-8-compiler-report-internal-error-when-building-an-openmp-project-with-c-stl