800 Star 2.4K Fork 1.2K

GVPHuawei LiteOS / LiteOS

 / 详情

realview-pbx-a9 编译报错 arm-none-eabi-ld: cannot find -lsupc++

已完成
创建于  
2020-12-31 13:40

Issue Description

Env: Ubuntu 20.04, arm-none-eabi-gcc(gcc version 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599])

取消C++支持则可以编译通过,库libnewlib-arm-none-eabi已经安装了。

Steps to Reproduce

  1. cp tools/build/config/realview-pbx-a9.config .config
  2. make clean; make -j 2

Error Message

arm-none-eabi-ld -nostartfiles -static --gc-sections -L/opt/LiteOS/tools/scripts/ld -L/opt/LiteOS/targets/realview-pbx-a9 -L/opt/LiteOS/out/realview-pbx-a9/lib -L/opt/LiteOS/out/realview-pbx-a9/lib/obj -L/opt/LiteOS/tools/build -L/usr/lib/gcc/arm-none-eabi/9.2.1 -L/usr/arm-none-eabi/lib -T/opt/LiteOS/targets/realview-pbx-a9/liteos.ld -utask_shellcmd -ucpup_shellcmd -uhelp_shellcmd -ufree_shellcmd -usem_shellcmd -umutex_shellcmd -uqueue_shellcmd -usysteminfo_shellcmd -uswtmr_shellcmd -uhwi_shellcmd -ufindsym_shellcmd -uzbar_scan_shellcmd -udmesg_shellcmd -udate_shellcmd -ureadExcInfo_shellcmd -uwatch_shellcmd -udeadlock_shellcmd -uarp_shellcmd -utelnet_shellcmd -ucd_shellcmd -uformat_shellcmd -upartition_shellcmd -uwriteproc_shellcmd -upartinfo_shellcmd -uumount_shellcmd -umount_shellcmd -uvirstatfs_shellcmd -ulsfd_shellcmd -ufatfsck_shellcmd -uiperf_shellcmd -ulwip_dump_shellcmd -ureset_shellcmd -ustartap_shellcmd -uhimd_shellcmd -uhiddrs_shellcmd -unand_bad_shellcmd -ui2c_read_shellcmd -ussp_read_shellcmd -uuart_config_shellcmd -uusb_debug_shellcmd -uramfs_fsmap -unfs_fsmap -ufat_fsmap -uyaffs_fsmap -uromfs_fsmap -ug_fsmap -ui2c_init -ugpio_init -uregulator_init -umtd_init_list -uhispi_init -uhifmc100_init -uhisfc350_init -unand_hifmc100_init -uhifmc100_parallel_init -usd_mci_init -uhi_mci_init -upl011_init -uhinfc620_init -uhisnfc100_init -uregulator_machine_init -uhisimeidia_regulator_init -ucpufreq_init -uhisilicon_cpufreq_init -ucpufreq_machine_init -udevfreq_init -umedia_devfreq_init -udevfreq_machine_init -uhieth_machine_init -uhigmac_machine_init -ujffs_fsmap -uprocfs_fsmap -ug_fsmap_wow -ui2c_init -ugpio_init -uregulator_init -umtd_init_list -uhispi_init -uhifmc100_init -uhisfc350_init -unand_hifmc100_init -uhifmc100_parallel_init -usd_mci_init -uhi_mci_init -upl011_init -uhinfc620_init -uhisnfc100_init -uregulator_machine_init -uhisimeidia_regulator_init -ucpufreq_init -uhisilicon_cpufreq_init -ucpufreq_machine_init -udevfreq_init -umedia_devfreq_init -udevfreq_machine_init -uhieth_machine_init -uhigmac_machine_init -ug_fsmap_scatter -ui2c_init -ugpio_init -uregulator_init -umtd_init_list -uhispi_init -uhifmc100_init -uhisfc350_init -unand_hifmc100_init -uhifmc100_parallel_init -usd_mci_init -uhi_mci_init -upl011_init -uhinfc620_init -uhisnfc100_init -uregulator_machine_init -uhisimeidia_regulator_init -ucpufreq_init -uhisilicon_cpufreq_init -ucpufreq_machine_init -udevfreq_init -umedia_devfreq_init -udevfreq_machine_init -uhieth_machine_init -uhigmac_machine_init -Map=/opt/LiteOS/out/realview-pbx-a9/Huawei_LiteOS.map -o /opt/LiteOS/out/realview-pbx-a9/Huawei_LiteOS.elf --start-group -lgcc -lcortex-a9 -lsupc++ -lstdc++ -lcortex-a9 -lbsp -lrealview-pbx-a9 -lbase -lcpup -lcppsupport -linit -lsec -lc -lposix -lm -lz -lcsysdeps -losdepends -lrealview-pbx-a9 -lshell --end-group
arm-none-eabi-ld: cannot find -lsupc++
arm-none-eabi-ld: cannot find -lstdc++
make: *** [Makefile:74: Huawei_LiteOS] Error 1

评论 (3)

skyeye 创建了任务
skyeye 关联仓库设置为LiteOS/LiteOS
展开全部操作日志

你好。经过检查,您的编译器工具链与我们一样。
然后可能是编译服务器的版本差异,以下是我们进行验证的服务器版本:

Linux ubuntu 4.2.0-27-generic- 14.04.1-Ubuntu SMP Fri Jan 22 15:32:26 UTC 2016
以下是成功编译的日志:
arm-none-eabi-ld -nostartfiles -static --gc-sections -L/data/liteos/Huawei_LiteOS/tools/scripts/ld -L/data/liteos/Huawei_LiteOS/targets/realview-pbx-a9 -L/data/liteos/Huawei_LiteOS/out/realview-pbx-a9/lib -L/data/liteos/Huawei_LiteOS/out/realview-pbx-a9/lib/obj -L/data/liteos/Huawei_LiteOS/tools/build -L/data/liteos/gcc-arm-none-eabi-9-2019-q4-major/lib/gcc/arm-none-eabi/9.2.1 -L/data/liteos/gcc-arm-none-eabi-9-2019-q4-major/arm-none-eabi/lib -T/data/liteos/Huawei_LiteOS/targets/realview-pbx-a9/liteos.ld -utask_shellcmd -ucpup_shellcmd -uhelp_shellcmd -ufree_shellcmd -usem_shellcmd -umutex_shellcmd -uqueue_shellcmd -usysteminfo_shellcmd -uswtmr_shellcmd -uhwi_shellcmd -ufindsym_shellcmd -uzbar_scan_shellcmd -udmesg_shellcmd -udate_shellcmd -ureadExcInfo_shellcmd -uwatch_shellcmd -udeadlock_shellcmd -uarp_shellcmd -utelnet_shellcmd -ucd_shellcmd -uformat_shellcmd -upartition_shellcmd -uwriteproc_shellcmd -upartinfo_shellcmd -uumount_shellcmd -umount_shellcmd -uvirstatfs_shellcmd -ulsfd_shellcmd -ufatfsck_shellcmd -uiperf_shellcmd -ulwip_dump_shellcmd -ureset_shellcmd -ustartap_shellcmd -uhimd_shellcmd -uhiddrs_shellcmd -unand_bad_shellcmd -ui2c_read_shellcmd -ussp_read_shellcmd -uuart_config_shellcmd -uusb_debug_shellcmd -uramfs_fsmap -unfs_fsmap -ufat_fsmap -uyaffs_fsmap -uromfs_fsmap -ug_fsmap -ui2c_init -ugpio_init -uregulator_init -umtd_init_list -uhispi_init -uhifmc100_init -uhisfc350_init -unand_hifmc100_init -uhifmc100_parallel_init -usd_mci_init -uhi_mci_init -upl011_init -uhinfc620_init -uhisnfc100_init -uregulator_machine_init -uhisimeidia_regulator_init -ucpufreq_init -uhisilicon_cpufreq_init -ucpufreq_machine_init -udevfreq_init -umedia_devfreq_init -udevfreq_machine_init -uhieth_machine_init -uhigmac_machine_init -ujffs_fsmap -uprocfs_fsmap -ug_fsmap_wow -ui2c_init -ugpio_init -uregulator_init -umtd_init_list -uhispi_init -uhifmc100_init -uhisfc350_init -unand_hifmc100_init -uhifmc100_parallel_init -usd_mci_init -uhi_mci_init -upl011_init -uhinfc620_init -uhisnfc100_init -uregulator_machine_init -uhisimeidia_regulator_init -ucpufreq_init -uhisilicon_cpufreq_init -ucpufreq_machine_init -udevfreq_init -umedia_devfreq_init -udevfreq_machine_init -uhieth_machine_init -uhigmac_machine_init -ug_fsmap_scatter -ui2c_init -ugpio_init -uregulator_init -umtd_init_list -uhispi_init -uhifmc100_init -uhisfc350_init -unand_hifmc100_init -uhifmc100_parallel_init -usd_mci_init -uhi_mci_init -upl011_init -uhinfc620_init -uhisnfc100_init -uregulator_machine_init -uhisimeidia_regulator_init -ucpufreq_init -uhisilicon_cpufreq_init -ucpufreq_machine_init -udevfreq_init -umedia_devfreq_init -udevfreq_machine_init -uhieth_machine_init -uhigmac_machine_init -Map=/data/liteos/Huawei_LiteOS/out/realview-pbx-a9/Huawei_LiteOS.map -o /data/liteos/Huawei_LiteOS/out/realview-pbx-a9/Huawei_LiteOS.elf --start-group -lgcc -lcortex-a9 -lsupc++ -lstdc++ -lcortex-a9 -lbsp -lrealview-pbx-a9 -lbase -lcpup -lcppsupport -linit -lsec -lc -lposix -lm -lz -lcsysdeps -losdepends -lrealview-pbx-a9 -lshell --end-group
arm-none-eabi-ld: warning: /data/liteos/gcc-arm-none-eabi-9-2019-q4-major/lib/gcc/arm-none-eabi/9.2.1/libgcc.a(_udivmoddi4.o) uses variable-size enums yet the output is to use 32-bit enums; use of enum values across objects may fail
arm-none-eabi-objcopy -O binary /data/liteos/Huawei_LiteOS/out/realview-pbx-a9/Huawei_LiteOS.elf /data/liteos/Huawei_LiteOS/out/realview-pbx-a9/Huawei_LiteOS.bin
arm-none-eabi-objdump -t /data/liteos/Huawei_LiteOS/out/realview-pbx-a9/Huawei_LiteOS.elf |sort >/data/liteos/Huawei_LiteOS/out/realview-pbx-a9/Huawei_LiteOS.sym.sorted
arm-none-eabi-objdump -d /data/liteos/Huawei_LiteOS/out/realview-pbx-a9/Huawei_LiteOS.elf >/data/liteos/Huawei_LiteOS/out/realview-pbx-a9/Huawei_LiteOS.asm
arm-none-eabi-size /data/liteos/Huawei_LiteOS/out/realview-pbx-a9/Huawei_LiteOS.elf
text data bss dec hex filename
170216 596 56880 227692 3796c /data/liteos/Huawei_LiteOS/out/realview-pbx-a9/Huawei_LiteOS.elf
########################################################################################################
######## LiteOS build successfully! ########
########################################################################################################
这个问题,我们一般碰到的多是编译器版本不匹配导致。
这个需要我们内部再升级版本到20.04才能评估。初步估计可能是服务器版本差异所致。
建议暂时先关闭c++使用。

bing 负责人设置为zhou
bing 添加了
 
question
标签

@skyeye 您好,感谢对LiteOS的支持,当前issue长时间未回复,我们暂时关闭,如果有需要可以继续重新提issue。

zhou 任务状态待办的 修改为已完成

请问如何关闭c++使用?

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(4)
10221895 cwg2022 1640879564
C
1
https://gitee.com/LiteOS/LiteOS.git
git@gitee.com:LiteOS/LiteOS.git
LiteOS
LiteOS
LiteOS

搜索帮助

14c37bed 8189591 565d56ea 8189591