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.

Compiler/CODECOMPOSER: CGT-C6000_8.3. C++14 Mode. Errors in libcxx/system_error. Unkonwn errors macros.

Part Number: CODECOMPOSER


Tool/software: TI C/C++ Compiler

Hi All.

I'm trying new CGT v.8.3.1 for C6600 CPUs.

When I tried to compile my existing project, I got such errors on C++ files:

"/opt/ti/ccs710/ccsv7/tools/compiler/ti-cgt-c6000_8.3.1/include/libcxx/system_error", line 279: error #20: identifier "ECONNABORTED" is undefined
"/opt/ti/ccs710/ccsv7/tools/compiler/ti-cgt-c6000_8.3.1/include/libcxx/system_error", line 280: error #20: identifier "EALREADY" is undefined
"/opt/ti/ccs710/ccsv7/tools/compiler/ti-cgt-c6000_8.3.1/include/libcxx/system_error", line 282: error #20: identifier "ECONNRESET" is undefined
"/opt/ti/ccs710/ccsv7/tools/compiler/ti-cgt-c6000_8.3.1/include/libcxx/system_error", line 292: error #20: identifier "EHOSTUNREACH" is undefined
"/opt/ti/ccs710/ccsv7/tools/compiler/ti-cgt-c6000_8.3.1/include/libcxx/system_error", line 293: error #20: identifier "EIDRM" is undefined
"/opt/ti/ccs710/ccsv7/tools/compiler/ti-cgt-c6000_8.3.1/include/libcxx/system_error", line 303: error #20: identifier "ENETRESET" is undefined
"/opt/ti/ccs710/ccsv7/tools/compiler/ti-cgt-c6000_8.3.1/include/libcxx/system_error", line 307: error #20: identifier "ENOLINK" is undefined
"/opt/ti/ccs710/ccsv7/tools/compiler/ti-cgt-c6000_8.3.1/include/libcxx/system_error", line 312: error #20: identifier "ENOMSG" is undefined
"/opt/ti/ccs710/ccsv7/tools/compiler/ti-cgt-c6000_8.3.1/include/libcxx/system_error", line 327: error #20: identifier "ENOTSOCK" is undefined
"/opt/ti/ccs710/ccsv7/tools/compiler/ti-cgt-c6000_8.3.1/include/libcxx/system_error", line 341: error #20: identifier "EOWNERDEAD" is undefined
"/opt/ti/ccs710/ccsv7/tools/compiler/ti-cgt-c6000_8.3.1/include/libcxx/system_error", line 343: error #20: identifier "EPROTO" is undefined
"/opt/ti/ccs710/ccsv7/tools/compiler/ti-cgt-c6000_8.3.1/include/libcxx/system_error", line 349: error #20: identifier "ENOTRECOVERABLE" is undefined
"/opt/ti/ccs710/ccsv7/tools/compiler/ti-cgt-c6000_8.3.1/include/libcxx/system_error", line 355: error #20: identifier "ETXTBSY" is undefined
"/opt/ti/ccs710/ccsv7/tools/compiler/ti-cgt-c6000_8.3.1/include/libcxx/system_error", line 360: error #20: identifier "ELOOP" is undefined

I looked into <system_error> header and included headers and I think the compiler is right. There are no such symbols anywhere.......

What can I do to fix it?

  • Unfortunately, I am unable to reproduce the error.  For the source file which gets these diagnostics, please submit a test case as described in the article How to Submit a Compiler Test Case.

    Thanks and regards,

    -George

  • test_cpp14.zip

    Here is a test project.

    OS: Ubuntu 16.04 LTS.

    CCS 8.1

    So, I'm tried to do smth to fix...

    I opened ccs810/ccsv8/tools/compiler/ti-cgt-c6000_8.3.1/include/libcxx/system_error


    And fixed line 229 from #include <cerrno> to #include "errno.h"

    And now it works.

    There is a errno.h in a directory one level up, and in libcxx directory. The first one doesn't contain the symbols, but second does.

    Please, tell me what's that?

  • Also changing libcxx/cerrno line 29 to #include "errno.h" helps.
  • Thank you for the test case.  I can reproduce the same behavior.  There appears to be a problem in the interaction between SYS/BIOS header files and compiler RTS header files.  I am consulting with other experts on the best way forward.

    Thanks and regards,

    -George

  • Thank you George. I will wait for reply.

  • Andrey,

    Thank you for attaching the project file. This helps us to reproduce the issue. Unfortunately, the TI-POSIX support was not validated with C++, so we missed this issue. I assume you want the TI-POSIX support, or maybe you want re-entrant support for errno, which is why you have /ti/posix/ccs on your include path.

    If you don't need TI-POSIX support, or re-entrant support, the simplest solution it to remove /ti/posix/ccs from your include path. Simply delete the following line from your project properties include path:

    ${xdc_find:ti/posix/ccs:${ProjName}}

    However, if you want TI-POSIX support, you can use the following fix to move past the build error. This is an unofficial fix, I am still working on the final solution and will update this thread to keep you posted. For now edit the following file in your SYS/BIOS installation:

    /bios_6_73_01_01/packages/ti/posix/ccs/errno.h

    Look for the following code near the middle of the file:

    /*  TI toolchain check
     *
     *  TI DSP Compiler
     */
    #elif defined(__TMS320C6X__)

    /* include toolchain's header file */
    #include <../include/errno.h>

    Modify the include statement above as follows:

    #include_next <errno.h>

    This should resolve the build error.

    You are probably interested in knowing what is going on. POSIX support is implemented from several places. The compiler, run-time library, and kernel all contribute to POSIX. When adding the kernel support for POSIX, we need to honor the contributions made by the compiler, and simply fill in the missing pieces. For example, the compiler provides errno.h with some common error codes. However, we need to add additional error codes required by the kernel. We did this by placing the TI-POSIX include path at the front of the list. In the TI-POSIX provided errno.h header file, we include the one provided by the compiler, then add the missing error codes. However, the include trick above does not work correctly with C++. Thus, the include chain was broken.

    Switching to the new #include_next directive, allows us to add TI-POSIX support without breaking the include chain.

    Let us know if this works for you, or if you run into more issues.

    Thanks,
    ~Ramsey

  • Ramsey,

    Thank you for your comprehensive reply. It helped me very much.

    As fact, I don't need POSIX, I even didn't know that it is enabled :)

    So, in my case I just removed posix from include path.

  • Andrey,

    Okay, sounds like you don't need POSIX support. I want to mention one more detail for completeness. When not using TI-POSIX, remove the following line from your configuration script:

    xdc.useModule('ti.posix.tirtos.Settings');

    I did not see this in the attached project, but I wanted to mention it in case you have it present in other configuration scripts.

    ~Ramsey