MIPS下编译QT4.8.0的__tls_get_addr找不到错误
2012-02-07 14:47
615 查看
用arm可以成功编译QT4.8.0, 但用mips编译的时候却碰到如下错误:
我的mips版本是4.4.5的。
去看了下/src/corelib/thread目录下的qthread_unix.cpp文件, 发现HAVE_TLS宏打开了才会导致错误,
关掉该宏后再编译, 果然通过了。
于是就打了如下补丁:
obj/release-shared-emb-mips/qthread_unix.o: In function `set_thread_data(QThreadData*)': qthread_unix.cpp.text+0xec): undefined reference to `__tls_get_addr' .obj/release-shared-emb-mips/qthread_unix.o: In function `QThreadData::current()': qthread_unix.cpp.text+0x708): undefined reference to `__tls_get_addr' collect2: ld returned 1 exit status
我的mips版本是4.4.5的。
去看了下/src/corelib/thread目录下的qthread_unix.cpp文件, 发现HAVE_TLS宏打开了才会导致错误,
关掉该宏后再编译, 果然通过了。
于是就打了如下补丁:
--- old/src/corelib/thread/qthread_unix.cpp 2012-02-07 14:46:10.000000000 +0800 +++ new/qthread_unix.cpp 2012-02-07 12:59:19.000000000 +0800 @@ -107,7 +107,7 @@ enum { ThreadPriorityResetFlag = 0x80000000 }; #if defined(Q_OS_LINUX) && defined(__GLIBC__) && (defined(Q_CC_GNU) || defined(Q_CC_INTEL)) -#define HAVE_TLS +//#define HAVE_TLS #endif #if defined(Q_CC_XLC) || defined (Q_CC_SUN) #define HAVE_TLS
相关文章推荐
- Qt5 编译错误找不到头文件的解决方法
- arm-qt编译程序错误解决(没有-lts,arm-linux-g++找不到)
- 编译用于Linux-arm 的Qt4.8.0 opensource 出现 clock_gettime() 未找的错误解决办法
- VS编译Qt时若主函数为wmain时出现链接错误,找不到main入口函数
- Qt+ffmpeg 配置 错误:undefined reference to `av_get_random_seed' 找不到.so
- 编译错误之error C3861: “GetDynamicTimeZoneInformation”: 找不到标识符
- windows XP编译Qt4.8.0错误
- Qt : 记录一个编译错误
- QT 编译常见错误:usr/bin/ld: cannot find
- 编译通过,可运行时找不到类,提示 classLink not found 之类的错误
- QT4.5.3编译的一些错误
- 编译内核出现:ngcc:找不到命令 的错误
- 《转载》使用org.w3c.dom.Element的setTextContent()、getTextContent()方法时出现编译错误
- 问:flashbuilder多余的导入会导致自动编译脚本执行报错(错误:找不到定义)? 答:Ctrl+Shift+O 去掉冗余的导入。
- Qt5.x 编译QWebenginewidgets出现错误Project ERROR: Unknown module(s) in QT: webenginewidgets
- QT 编译常见错误:usr/bin/ld: cannot find
- Java命令行编译文件时出现的错误,找不到符号或软件包不存在等
- Qt 编译错误总结
- Eclipse错误: 找不到或无法加载主类或项目无法编译10种解决大法!
- 关于qt中使用ico文件做程序图标时编译报debug/myico_res.o Error 1错误的说明