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.

CODECOMPOSER: C++ incompatibilities with tiarmclang-4.0.2

Part Number: CODECOMPOSER
Other Parts Discussed in Thread: CCSTUDIO, CC1354P10

Tool/software:

Hi

We're trying to build a C++ project with tiarmclang-4.0.2. The build fails with undeclared identifiers in the compiler headers:

In file included from /home/marco/ti/ti-cgt-armllvm_4.0.2.LTS/include/c++/v1/functional:526:
In file included from /home/marco/ti/ti-cgt-armllvm_4.0.2.LTS/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /home/marco/ti/ti-cgt-armllvm_4.0.2.LTS/include/c++/v1/vector:325:
In file included from /home/marco/ti/ti-cgt-armllvm_4.0.2.LTS/include/c++/v1/__format/formatter_bool.h:20:
In file included from /home/marco/ti/ti-cgt-armllvm_4.0.2.LTS/include/c++/v1/__format/formatter_integral.h:13:
In file included from /home/marco/ti/ti-cgt-armllvm_4.0.2.LTS/include/c++/v1/__charconv/to_chars_integral.h:17:
In file included from /home/marco/ti/ti-cgt-armllvm_4.0.2.LTS/include/c++/v1/__charconv/to_chars_result.h:14:
/home/marco/ti/ti-cgt-armllvm_4.0.2.LTS/include/c++/v1/__system_error/errc.h:141:42: error: use of undeclared identifier 'EIDRM'
141 | identifier_removed = EIDRM,
| ^
/home/marco/ti/ti-cgt-armllvm_4.0.2.LTS/include/c++/v1/__system_error/errc.h:155:42: error: use of undeclared identifier 'ENOLINK'
155 | no_link = ENOLINK,
| ^
/home/marco/ti/ti-cgt-armllvm_4.0.2.LTS/include/c++/v1/__system_error/errc.h:160:28: error: use of undeclared identifier 'ENOMSG'
160 | no_message_available = ENOMSG,
| ^
/home/marco/ti/ti-cgt-armllvm_4.0.2.LTS/include/c++/v1/__system_error/errc.h:162:26: error: use of undeclared identifier 'ENOMSG'
162 | no_message = ENOMSG,
| ^
/home/marco/ti/ti-cgt-armllvm_4.0.2.LTS/include/c++/v1/__system_error/errc.h:189:38: error: use of undeclared identifier 'EOWNERDEAD'
189 | owner_dead = EOWNERDEAD,
| ^
/home/marco/ti/ti-cgt-armllvm_4.0.2.LTS/include/c++/v1/__system_error/errc.h:197:38: error: use of undeclared identifier 'ENOTRECOVERABLE'
197 | state_not_recoverable = ENOTRECOVERABLE,
| ^
/home/marco/ti/ti-cgt-armllvm_4.0.2.LTS/include/c++/v1/__system_error/errc.h:203:37: error: use of undeclared identifier 'ETXTBSY'
203 | text_file_busy = ETXTBSY,
| ^
/home/marco/ti/ti-cgt-armllvm_4.0.2.LTS/include/c++/v1/__system_error/errc.h:208:37: error: use of undeclared identifier 'ELOOP'
208 | too_many_symbolic_link_levels = ELOOP,
| ^

This can be replicated by simply including <functional> in any cpp file.

Looking at the related issue and the compilers I have at hand this seems to be the case:
v2.1.2 - broken
- v3.2.2 - works
- v4.0.2 - broken

  • I am unable to reproduce this result.  Please show the full invocation of tiarmclang, with the options exactly as tiarmclang sees them.  Please copy and paste the text of the command, and do not use a screenshot.

    Thanks and regards,

    -George

  • This is the issue from a few years ago. Does this forum actually have an effect on the way you fix your tooling problems or are things way too corporate at this point?

  • I continue to think my first forum reply is reasonable.  You state ...

    This can be replicated by simply including <functional> in any cpp file.

    I tried to do that, and it always builds clean for me.  It is clear I'm missing something.  So I'm forced to guess at what I'm missing.  I continue to think a reasonable next step is asking to see the compiler options.  

    Of course, you are welcome to disagree and say that the focus of the investigation should be elsewhere, like integrating <functional> with whatever SDK (software development kit) you use.  If that is the case, then I will change responsibility for this thread to the team which supports that SDK.  Is that what you want to do?  Which SDK do you use?

    Thanks and regards,

    -George

  • Replicated it in CCStudio as well.

    - A cpp file containing only #include <functional>
    - tiarmclang-4.0.1
    - SimpleLink-8.30.1.01
    - Target gnu++17

    174]Building file: "../main.cpp"
    [175]Invoking: Arm Compiler
    [176]"/home/marco/ti/ccs2001/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/bin/tiarmclang" -c @"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/source/ti/ble5stack_flash/config/build_components.opt" @"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/source/ti/ble5stack_flash/config/factory_config.opt" -mcpu=cortex-m33 -mfloat-abi=hard -mfpu=fpv5-sp-d16 -mlittle-endian -Oz -I"/home/marco/workspace_ccstheia/basic_ble_LP_EM_CC1354P10_6_freertos_ticlang" -I"/home/marco/workspace_ccstheia/basic_ble_LP_EM_CC1354P10_6_freertos_ticlang/Release" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/source/ti/drivers/dpl" -I"/home/marco/workspace_ccstheia/basic_ble_LP_EM_CC1354P10_6_freertos_ticlang/app" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/source" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/source/ti" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/source/ti/ble5stack_flash" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/source/ti/ble5stack_flash/controller/cc26xx/inc" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/source/ti/ble5stack_flash/inc" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/source/ti/ble5stack_flash/rom" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/source/ti/ble5stack_flash/common/cc26xx" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/source/ti/ble5stack_flash/icall/inc" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/source/ti/ble5stack_flash/hal/src/target/_common" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/source/ti/ble5stack_flash/common/cc26xx/npi/stack" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/source/ti/ble5stack_flash/hal/src/inc" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/source/ti/ble5stack_flash/heapmgr" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/source/ti/ble5stack_flash/profiles/dev_info" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/source/ti/ble5stack_flash/profiles/simple_profile" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/source/ti/ble5stack_flash/icall/src/inc" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/source/ti/ble5stack_flash/npi/src" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/source/ti/ble5stack_flash/osal/src/inc" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/source/ti/ble5stack_flash/services/src/saddr" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/source/ti/ble5stack_flash/services/src/sdata" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/source/ti/common/nv" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/source/ti/common/cc26xx" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/source/ti/ble5stack_flash/icall/src" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/source/ti/bleapp/profiles/health_thermometer" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/source/ti/bleapp/services/health_thermometer" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/kernel/tirtos7/packages" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/source/ti/devices/cc13x4_cc26x4" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/source/ti/posix/ticlang" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/source/third_party/freertos/include" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/source/third_party/freertos/portable/GCC/ARM_CM33_NTZ/non_secure" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/kernel/freertos" -I"/home/marco/ti/simplelink_cc13xx_cc26xx_sdk_8_30_01_01/kernel" -DICALL_NO_APP_EVENTS -DCC13XX -DCC13X4 -DFLASH_ONLY_BUILD -DNVOCMP_NWSAMEITEM=1 -DNVOCMP_NVPAGES=4 -Dxdc_target__isaCompatible_v8M -DHEAPMGR_CONFIG=0x80 -DHEAPMGR_SIZE=0x0 -DCC13X2P -DFREERTOS -DNVOCMP_POSIX_MUTEX -gdwarf-3 -MMD -MP -MF"main.d_raw" -MT"main.o" -I"/home/marco/workspace_ccstheia/basic_ble_LP_EM_CC1354P10_6_freertos_ticlang/Release/syscfg" -std=gnu++17 @"syscfg/ti_utils_build_compiler.opt" -o"main.o" "../main.cpp"
    [177]subdir_rules.mk:37: recipe for target 'main.o' failed
    [178]In file included from ../main.cpp:1:
    [179]In file included from /home/marco/ti/ccs2001/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/include/c++/v1/functional:526:
    [180]In file included from /home/marco/ti/ccs2001/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/include/c++/v1/__functional/boyer_moore_searcher.h:27:
    [181]In file included from /home/marco/ti/ccs2001/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/include/c++/v1/vector:325:
    [182]In file included from /home/marco/ti/ccs2001/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/include/c++/v1/__format/formatter_bool.h:20:
    [183]In file included from /home/marco/ti/ccs2001/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/include/c++/v1/__format/formatter_integral.h:13:
    [184]In file included from /home/marco/ti/ccs2001/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/include/c++/v1/__charconv/to_chars_integral.h:17:
    [185]In file included from /home/marco/ti/ccs2001/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/include/c++/v1/__charconv/to_chars_result.h:14:
    [186]In file included from /home/marco/ti/ccs2001/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/include/c++/v1/__system_error/errc.h:104:
    [187]/home/marco/ti/ccs2001/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/include/c++/v1/cerrno:31:5: error: &lt;cerrno&gt; tried including <errno.h> but didn't find libc++'s <errno.h> header. This usually means that your header search paths are not configured properly. The header search paths should contain the C++ Standard Library headers before any C Standard Library, and you are probably using compiler flags that make that not be the case.
    [188] 31 | # error &lt;cerrno&gt; tried including <errno.h> but didn't find libc++'s <errno.h> header. \
    [189] | ^
    [190]In file included from ../main.cpp:1:
    [191]In file included from /home/marco/ti/ccs2001/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/include/c++/v1/functional:526:
    [192]In file included from /home/marco/ti/ccs2001/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/include/c++/v1/__functional/boyer_moore_searcher.h:27:
    [193]In file included from /home/marco/ti/ccs2001/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/include/c++/v1/vector:325:
    [194]In file included from /home/marco/ti/ccs2001/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/include/c++/v1/__format/formatter_bool.h:20:
    [195]In file included from /home/marco/ti/ccs2001/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/include/c++/v1/__format/formatter_integral.h:13:
    [196]In file included from /home/marco/ti/ccs2001/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/include/c++/v1/__charconv/to_chars_integral.h:17:
    [197]In file included from /home/marco/ti/ccs2001/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/include/c++/v1/__charconv/to_chars_result.h:14:
    [198]/home/marco/ti/ccs2001/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/include/c++/v1/__system_error/errc.h:141:42: error: use of undeclared identifier 'EIDRM'
    [199] 141 | identifier_removed = EIDRM,
    [200] | ^
    [201]/home/marco/ti/ccs2001/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/include/c++/v1/__system_error/errc.h:155:42: error: use of undeclared identifier 'ENOLINK'
    [202] 155 | no_link = ENOLINK,
    [203] | ^
    [204]/home/marco/ti/ccs2001/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/include/c++/v1/__system_error/errc.h:160:28: error: use of undeclared identifier 'ENOMSG'
    [205] 160 | no_message_available = ENOMSG,
    [206] | ^
    [207]/home/marco/ti/ccs2001/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/include/c++/v1/__system_error/errc.h:162:26: error: use of undeclared identifier 'ENOMSG'
    [208] 162 | no_message = ENOMSG,
    [209] | ^
    [210]/home/marco/ti/ccs2001/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/include/c++/v1/__system_error/errc.h:189:38: error: use of undeclared identifier 'EOWNERDEAD'
    [211] 189 | owner_dead = EOWNERDEAD,
    [212] | ^
    [213]/home/marco/ti/ccs2001/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/include/c++/v1/__system_error/errc.h:197:38: error: use of undeclared identifier 'ENOTRECOVERABLE'
    [214] 197 | state_not_recoverable = ENOTRECOVERABLE,
    [215] | ^
    [216]/home/marco/ti/ccs2001/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/include/c++/v1/__system_error/errc.h:203:37: error: use of undeclared identifier 'ETXTBSY'
    [217] 203 | text_file_busy = ETXTBSY,
    [218] | ^
    [219]/home/marco/ti/ccs2001/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/include/c++/v1/__system_error/errc.h:208:37: error: use of undeclared identifier 'ELOOP'
    [220] 208 | too_many_symbolic_link_levels = ELOOP,
    [221] | ^
    [222]9 errors generated.
    [223]gmake: *** [main.o] Error 1

    Apologies for snapping. This SDK and this toolchain has been nothing but trouble so far and the "nah, we're not going to fix it" response in the original thread got to me.

  • From the release note of the 8.30.01.01 SDK (Release Notes)

    "

    Dependencies

    SimpleLink Low Power F2 SDK 8.30.01.01 was built & tested on a Windows host platform using the following Integrated Development Environments (IDEs) and components. Using an IDE or toolchain version not listed below may result in compatibility issues with this SDK release. Refer to the individual component release notes in the Document Overview for each component’s supported code generation tools. CCS Theia 1.5.0 does not include TI Clang v. 3.2.2 LTS which is needed for this SDK. TI Clang v. 3.2.2 LTS can be downloaded separately: https://www.ti.com/tool/download/ARM-CGT-CLANG

    "

    Does everything work when you are using the recommended versions?

    Siri

  • Hi

    Yes, it does indeed work with 3.2.2-LTS on Linux. If you don't intend to support 4.0.2-LTS then at least give the SDK team a heads up that dark clouds are coming.

     Thanks /Marco