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.

[参考译文] AM62P:缺少32位库文件导致 SDK 中出现构建错误(Arago-2023.10)

Guru**** 2469810 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1465371/am62p-missing-32-bit-library-files-causing-build-errors-in-sdk-arago-2023-10

器件型号:AM62P

工具与软件:

您好!

由于 SDK 中缺少32位库头arago-2023.10-toolchain-2023.10.sh,我们在编译应用程序时遇到了致命的构建错误。 这些错误会阻止编译过程并阻止应用程序启动。

构建错误表示不存在以下32位库标头:

  • bits/typesizes-32.h
  • bits/timesize-32.h
  • bits/long-double-32.h
  • bits/floatn-32.h
  • bits/endian-32.h
  • bits/endianness-32.h
  • bits/pthreadtypes-32.h
  • bits/pthreadtypes-arch-32.h
  • bits/struct_rwlock-32.h
  • bits/setjmp-32.h
  • bits/local_lim-32.h

/opt/arago-2023.10/sysroots/aarch64-oe-linux/usr/include/bits/typesizes.h:23:10: fatal error: bits/typesizes-32.h: No such file or directory
   23 | #include <bits/typesizes-32.h>
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
/opt/arago-2023.10/sysroots/aarch64-oe-linux/usr/include/bits/timesize.h:23:10: fatal error: bits/timesize-32.h: No such file or directory
   23 | #include <bits/timesize-32.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
/opt/arago-2023.10/sysroots/aarch64-oe-linux/usr/include/bits/timesize.h:23:10: fatal error: bits/timesize-32.h: No such file or directory
   23 | #include <bits/timesize-32.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
/opt/arago-2023.10/sysroots/aarch64-oe-linux/usr/include/bits/long-double.h:23:10: fatal error: bits/long-double-32.h: No such file or directory
   23 | #include <bits/long-double-32.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
/opt/arago-2023.10/sysroots/aarch64-oe-linux/usr/include/bits/typesizes.h:23:10: fatal error: bits/typesizes-32.h: No such file or directory
   23 | #include <bits/typesizes-32.h>
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
/opt/arago-2023.10/sysroots/aarch64-oe-linux/usr/include/bits/floatn.h:23:10: fatal error: bits/floatn-32.h: No such file or directory
   23 | #include <bits/floatn-32.h>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
/opt/arago-2023.10/sysroots/aarch64-oe-linux/usr/include/bits/floatn.h:23:10: fatal error: bits/floatn-32.h: No such file or directory
   23 | #include <bits/floatn-32.h>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
/opt/arago-2023.10/sysroots/aarch64-oe-linux/usr/include/bits/endian.h:23:10: fatal error: bits/endian-32.h: No such file or directory
   23 | #include <bits/endian-32.h>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
/opt/arago-2023.10/sysroots/aarch64-oe-linux/usr/include/bits/endianness.h:23:10: fatal error: bits/endianness-32.h: No such file or directory
   23 | #include <bits/endianness-32.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
/opt/arago-2023.10/sysroots/aarch64-oe-linux/usr/include/bits/pthreadtypes.h:23:10: fatal error: bits/pthreadtypes-32.h: No such file or directory
   23 | #include <bits/pthreadtypes-32.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
/opt/arago-2023.10/sysroots/aarch64-oe-linux/usr/include/bits/pthreadtypes-arch.h:23:10: fatal error: bits/pthreadtypes-arch-32.h: No such file or directory
   23 | #include <bits/pthreadtypes-arch-32.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
/opt/arago-2023.10/sysroots/aarch64-oe-linux/usr/include/bits/struct_rwlock.h:23:10: fatal error: bits/struct_rwlock-32.h: No such file or directory
   23 | #include <bits/struct_rwlock-32.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
/opt/arago-2023.10/sysroots/aarch64-oe-linux/usr/include/bits/setjmp.h:23:10: fatal error: bits/setjmp-32.h: No such file or directory
   23 | #include <bits/setjmp-32.h>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
/opt/arago-2023.10/sysroots/aarch64-oe-linux/usr/include/bits/local_lim.h:23:10: fatal error: bits/local_lim-32.h: No such file or directory
   23 | #include <bits/local_lim-32.h>
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.

平台详细信息:

  • 架构: 64位
  • 多尔蒂利布: 使能
  • SDK: arago-2023.10-toolchain-2023.10.sh

即使在我们的环境中启用了 multilib 支持、并且系统架构为64位、也会发生错误。 所需的32位库似乎缺失或未正确包含在 SDK 中。

您能否帮助我们了解这些标题缺失的原因、并提供有关如何解决此问题的指导? 如果需要额外步骤以确保64位平台的32位兼容性、请提供详细信息。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Angelin:

    您的工作所依据的是哪种确切的 SDK 版本?

    您是否有可以根据显示典型故障的 Devkit 构建的"最小应用程序"? 也许只是一个包含您期望的标头文件的基本 main.c 文件那样简单吗?

    此致、Andreas

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Andreas:

    我们的工作使用以下 SDK 版本:

    • Yocto 配置使用 :processor-sdk-scarthgap-10.00.07.04-config.txt

    • 版本: 10.00.07.04

    • SDK 版本: arago-2023.10-toolchain-2023.10.sh
    • 地点: /opt/arago-2023.10

    下面是最小值 C++应用程序创建的 main.cpp()timesize-32.htimesize.h文件中重现与之相关的问题:

    #include
    #include

    int main(){
    std::cout <<"Testing timesize.h Include"<< std:endl;
    返回0;
    }

    当我们尝试使用 SDK 编译该 C++应用程序时、会出现以下错误:

    /opt/arago-2023.10/sysroots/aarch64-oe-linux/usr/include/bits/timesize.h:23:10: fatal error: bits/timesize-32.h: No such file or directory
       23 | #include <bits/timesize-32.h>
          |          ^~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    

    问题似乎源于timesize.h尝试timesize-32.h根据__WORDSIZE定义包含的逻辑:

    #include <bits/wordsize.h>
    
    #if __WORDSIZE == 32
    
    #ifdef _MIPS_SIM
    
    #if _MIPS_SIM == _ABIO32
    #include <bits/timesize-32.h>
    #elif _MIPS_SIM == _ABIN32
    #include <bits/timesize-n32.h>
    #else
    #error "Unknown _MIPS_SIM"
    #endif
    
    #else /* _MIPS_SIM is not defined */
    #include <bits/timesize-32.h>
    #endif
    
    #elif __WORDSIZE == 64
    #include <bits/timesize-64.h>
    #else
    #error "Unknown __WORDSIZE detected"
    #endif /* matches #if __WORDSIZE == 32 */
      

    尽管我们的平台是64位的,但构建尝试包含timesize-32.h SDK 中缺少的32位特定标头。

    如果您需要更多详细信息或其他示例、请告诉我。

    此致、

    Angelin Christy  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    好的,谢谢额外的细节。 我们很快就会介绍它。

    此致、Andreas

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Angelin:

    我刚刚在 SDK v10.1的环境中进行了此尝试、但在构建小示例程序时没有问题、请参阅以下步骤:

    # Create test source
    a0797059@jiji:~/ti/ti-processor-sdk-linux-am62pxx-evm-10.01.10.04/linux-devkit
    $ cat <<EOF > main.cpp
    > #include <bits/timesize.h>
    #include <iostream>
    
    int main() {
    std::cout << "Testing timesize.h inclusion" << std::endl;
    return 0;
    }
    > EOF
    
    # Double-check test source
    a0797059@jiji:~/ti/ti-processor-sdk-linux-am62pxx-evm-10.01.10.04/linux-devkit
    $ cat main.cpp
    #include <bits/timesize.h>
    #include <iostream>
    
    int main() {
    std::cout << "Testing timesize.h inclusion" << std::endl;
    return 0;
    }
    
    # Source the devkit environment
    a0797059@jiji:~/ti/ti-processor-sdk-linux-am62pxx-evm-10.01.10.04/linux-devkit
    $ source environment-setup
    
    # Double-check to make sure compiler flags got set
    [linux-devkit]:~/ti/ti-processor-sdk-linux-am62pxx-evm-10.01.10.04/linux-devkit> echo $CXXFLAGS
    -mbranch-protection=standard --sysroot=/home/a0797059/ti/ti-processor-sdk-linux-am62pxx-evm-10.01.10.04/linux-devkit/sysroots/aarch64-oe-linux
    
    # Build test code
    [linux-devkit]:~/ti/ti-processor-sdk-linux-am62pxx-evm-10.01.10.04/linux-devkit> $CXX main.cpp
    
    # Take a quick look at the generated file
    [linux-devkit]:~/ti/ti-processor-sdk-linux-am62pxx-evm-10.01.10.04/linux-devkit> file a.out
    a.out: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=757ee3a8476e1f175b9cc9ca4027b19e88f1fb06, for GNU/Linux 5.15.0, with debug_info, not stripped

    您是否可以尝试重新创建此文件?

    此致、Andreas