解决6UL more undefined references to `__dso_handle' follow

本文记录了一次使用GCC编译器进行编译时遇到的错误,错误提示为未定义引用到`__dso_handle'。经过多次排查,发现错误的根源在于编译所在的磁盘格式为Windows下的NTFS格式。通过将磁盘格式转换为Linux下的ext4格式,编译问题得以解决。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

libs/compatibility-atomic-c++0x.o .libs/compatibility-thread-c++0x.o .libs/compatibility-chrono.o .libs/compatibility-condvar.o  -Wl,--whole-archive ../libsupc++/.libs/libsupc++convenience.a ../src/c++98/.libs/libc++98convenience.a ../src/c++11/.libs/libc++11convenience.a -Wl,--no-whole-archive  -lm -L/home/worker/NewDiskTwo/projects/6UL/fsl-release-bsp/build-fb/tmp/sysroots/x86_64-linux/usr/lib/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.3.0 -L/home/worker/NewDiskTwo/projects/6UL/fsl-release-bsp/build-fb/tmp/sysroots/imx6qsabresd/lib -L/home/worker/NewDiskTwo/projects/6UL/fsl-release-bsp/build-fb/tmp/sysroots/imx6qsabresd/usr/lib/arm-poky-linux-gnueabi/5.3.0 -L/home/worker/NewDiskTwo/projects/6UL/fsl-release-bsp/build-fb/tmp/sysroots/imx6qsabresd/usr/lib -lc -lgcc_s /home/worker/NewDiskTwo/projects/6UL/fsl-release-bsp/build-fb/tmp/sysroots/imx6qsabresd/usr/lib/arm-poky-linux-gnueabi/5.3.0/crtendS.o /home/worker/NewDiskTwo/projects/6UL/fsl-release-bsp/build-fb/tmp/sysroots/imx6qsabresd/usr/lib/crtn.o  -march=armv7-a -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 -Wl,-O1 -Wl,-z -Wl,relro -Wl,--gc-sections -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--version-script=libstdc++-symbols.ver   -Wl,-soname -Wl,libstdc++.so.6 -o .libs/libstdc++.so.6.0.21
| .libs/compatibility-c++0x.o: In function `__static_initialization_and_destruction_0':
| /usr/src/debug/gcc-runtime/5.3.0-r0/gcc-5.3.0/build.arm-poky-linux-gnueabi.arm-poky-linux-gnueabi/arm-poky-linux-gnueabi/libstdc++-v3/src/../../../../../../../../../work-shared/gcc-5.3.0-r0/gcc-5.3.0/libstdc++-v3/src/c++11/compatibility-c++0x.cc:215: undefined reference to `__dso_handle'
| ../src/c++11/.libs/libc++11convenience.a(system_error.o): In function `__static_initialization_and_destruction_0':
| /usr/src/debug/gcc-runtime/5.3.0-r0/gcc-5.3.0/build.arm-poky-linux-gnueabi.arm-poky-linux-gnueabi/arm-poky-linux-gnueabi/libstdc++-v3/src/c++11/../../../../../../../../../../work-shared/gcc-5.3.0-r0/gcc-5.3.0/libstdc++-v3/src/c++11/system_error.cc:71: undefined reference to `__dso_handle'
| ../libsupc++/.libs/libsupc++convenience.a(atexit_thread.o): In function `key_init':
| /usr/src/debug/gcc-runtime/5.3.0-r0/gcc-5.3.0/build.arm-poky-linux-gnueabi.arm-poky-linux-gnueabi/arm-poky-linux-gnueabi/libstdc++-v3/libsupc++/../../../../../../../../../work-shared/gcc-5.3.0-r0/gcc-5.3.0/libstdc++-v3/libsupc++/atexit_thread.cc:106: undefined reference to `__dso_handle'
| ../src/c++98/.libs/libc++98convenience.a(mt_allocator.o): In function `get_freelist':
| /usr/src/debug/gcc-runtime/5.3.0-r0/gcc-5.3.0/build.arm-poky-linux-gnueabi.arm-poky-linux-gnueabi/arm-poky-linux-gnueabi/libstdc++-v3/src/c++98/../../../../../../../../../../work-shared/gcc-5.3.0-r0/gcc-5.3.0/libstdc++-v3/src/c++98/mt_allocator.cc:64: undefined reference to `__dso_handle'
| ../src/c++98/.libs/libc++98convenience.a(messages_members_cow.o): In function `get_catalogs':
| /usr/src/debug/gcc-runtime/5.3.0-r0/gcc-5.3.0/build.arm-poky-linux-gnueabi.arm-poky-linux-gnueabi/arm-poky-linux-gnueabi/libstdc++-v3/src/c++98/messages_members_cow.cc:139: undefined reference to `__dso_handle'
| ../src/c++98/.libs/libc++98convenience.a(messages_members.o):/usr/src/debug/gcc-runtime/5.3.0-r0/gcc-5.3.0/build.arm-poky-linux-gnueabi.arm-poky-linux-gnueabi/arm-poky-linux-gnueabi/libstdc++-v3/src/c++98/messages_members.cc:139: more undefined references to `__dso_handle' follow
| collect2: error: ld returned 1 exit status
| make[3]: *** [libstdc++.la] Error 1
| make[3]: Leaving directory `/home/worker/NewDiskTwo/projects/6UL/fsl-release-bsp/build-fb/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/gcc-runtime/5.3.0-r0/gcc-5.3.0/build.arm-poky-linux-gnueabi.arm-poky-linux-gnueabi/arm-poky-linux-gnueabi/libstdc++-v3/src'
| make[2]: *** [all-recursive] Error 1
| make[2]: Leaving directory `/home/worker/NewDiskTwo/projects/6UL/fsl-release-bsp/build-fb/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/gcc-runtime/5.3.0-r0/gcc-5.3.0/build.arm-poky-linux-gnueabi.arm-poky-linux-gnueabi/arm-poky-linux-gnueabi/libstdc++-v3/src'
| make[1]: *** [all-recursive] Error 1
| make[1]: Leaving directory `/home/worker/NewDiskTwo/projects/6UL/fsl-release-bsp/build-fb/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/gcc-runtime/5.3.0-r0/gcc-5.3.0/build.arm-poky-linux-gnueabi.arm-poky-linux-gnueabi/arm-poky-linux-gnueabi/libstdc++-v3'
| make: *** [all] Error 2
| ERROR: oe_runmake failed
| ERROR: Function failed: do_compile (log file is located at /home/worker/NewDiskTwo/projects/6UL/fsl-release-bsp/build-fb/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/gcc-runtime/5.3.0-r0/temp/log.do_compile.8079)
ERROR: Task 792 (/home/worker/NewDiskTwo/projects/6UL/fsl-release-bsp/sources/poky/meta/recipes-devtools/gcc/gcc-runtime_5.3.bb, do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2683 tasks of which 2682 didn't need to be rerun and 1 failed.
No currently running tasks (212 of 5318)

Summary: 1 task failed:
  /home/worker/NewDiskTwo/projects/6UL/fsl-release-bsp/sources/poky/meta/recipes-devtools/gcc/gcc-runtime_5.3.bb, do_compile
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

 

6UL编译多次卡在如上错误,经多次排查,均无效。

最终的解决办法如下:

原来编译所在的磁盘格式是windows系统下的ntfs格式,将其转换成linux下的ext4格式后,再次编译,一次性成功。

ubuntu上将ntfs格式转成ext4格式的方法如下:

https://blog.youkuaiyun.com/yao201606/article/details/84934832

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值