编译报错:<command-line>: error: expected identifier or ‘(‘ before numeric constant

When adapting the R528 D1 solution on the tina platform today, tina_multimedia compiled the following very strange error. I have never encountered it before, hereby record it.
Insert picture description here
Seeing this compilation error, there is no useful information at all. I don't know which line or the cause of the error. Later, I checked the information on the Internet, and most of the explanations were: 枚举冲突,枚举类型中的某个变量被重复定义了。but there was no specific enumeration type and which variable. It is really difficult to find the problem.

The troubleshooting steps are as follows:

First, the same code R528 riscv program can be compiled and passed normally, eliminating the influence of the tool chain.

Second, I wonder if some of the D1 code submitted by others recently introduced conflicts. Try to revert the most recent submission, the problem is not resolved.

Third, change your thinking and check whether the openssl package introduces errors. Enter the directory and tina/package/libs/openssluse mm -Bcompile, no error is reported.
Then use tina_multimedia compiler to compile openssl package configuration information, we found the problem, as shown below:
Insert picture description here
this time given the information, plus before the Internet to find the explanation from the speculation is probably due to the compiler option introduced “-Dd1”with lhash.hthe Some macro definitions conflict. So try to remove the above compilation configuration “-Dd1”for verification, and the compilation passes. It can be concluded that the Makefile of tina_multimedia introduced improper compilation options, and finally found that it was TINA_CHIP_TYPEcaused by the definition .
Insert picture description here
Insert picture description here

Guess you like

Origin blog.csdn.net/houxiaoni01/article/details/115254152