gcc执行报错:

$ gcc oobrecv.c
/usr/bin/ld: errno: TLS definition in /lib64/libc.so.6 section .tbss mismatches non-TLS reference in /tmp/cccdLepY.o
/lib64/libc.so.6: could not read symbols: Bad value
collect2: ld returned 1 exit status

原因:

extern int errno;

将extern int errno;修改为#include <errno.h>就好了。

参考:
https://www.linuxquestions.org/questions/programming-9/errno-tls-definition-in-lib64-libc-so-6-section-tbss-mismatches-non-tls-reference-528681/

欢迎补充指正!

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐