Ubuntu14.04 交叉编译Qt-creator
来源:互联网 发布:手机天猫淘宝 编辑:程序博客网 时间:2024/06/06 09:18
1. 下载Qt-creator 的源码:
链接:http://download.qt.io/official_releases/qtcreator/
2. 进入源码目录编译:
$ qmake qtcreator.pro$ make....... ../3rdparty/botan/botan.cpp:46220:21: fatal error: cpuid.h: No such file or directorycompilation terminated.make[3]: *** [.obj/debug-shared/botan.o] Error 1
这个错误貌似每个qt-creator 版本编译都会有, 你需要给该源码打一个patch。
Patch 的内容如下:
diff --git a/src/libs/3rdparty/botan/botan.cpp b/src/libs/3rdparty/botan/botan.cppindex 917c385..4364a2e 100644--- a/src/libs/3rdparty/botan/botan.cpp+++ b/src/libs/3rdparty/botan/botan.cpp@@ -1101,6 +1101,8 @@ class Montgomery_Exponentiator : public Modular_Exponentiator #if (BOTAN_MP_WORD_BITS != 32) #error The mp_x86_32 module requires that BOTAN_MP_WORD_BITS == 32+#elif !defined(BOTAN_TARGET_CPU_IS_X86_FAMILY)+typedef Botan::u64bit dword; #endif #ifdef Q_OS_UNIX@@ -1118,6 +1120,7 @@ extern "C" { */ inline word word_madd2(word a, word b, word* c) {+#if defined(BOTAN_TARGET_CPU_IS_X86_FAMILY) asm( ASM("mull %[b]") ASM("addl %[c],%[a]")@@ -1127,6 +1130,11 @@ inline word word_madd2(word a, word b, word* c) : "0"(a), "1"(b), [c]"g"(*c) : "cc"); return a;+#else+ dword z = (dword)a * b + *c;+ *c = (word)(z >> BOTAN_MP_WORD_BITS);+ return (word)z;+#endif } /*@@ -1134,6 +1142,7 @@ inline word word_madd2(word a, word b, word* c) */ inline word word_madd3(word a, word b, word c, word* d) {+#if defined(BOTAN_TARGET_CPU_IS_X86_FAMILY) asm( ASM("mull %[b]") @@ -1147,6 +1156,11 @@ inline word word_madd3(word a, word b, word c, word* d) : "0"(a), "1"(b), [c]"g"(c), [d]"g"(*d) : "cc"); return a;+#else+ dword z = (dword)a * b + c + *d;+ *d = (word)(z >> BOTAN_MP_WORD_BITS);+ return (word)z;+#endif } }@@ -2315,7 +2329,7 @@ namespace Botan { extern "C" { -#ifdef Q_OS_UNIX+#if defined(Q_OS_UNIX) && defined(BOTAN_TARGET_CPU_IS_X86_FAMILY) /* * Helper Macros for x86 Assembly */diff --git a/src/libs/3rdparty/botan/botan.h b/src/libs/3rdparty/botan/botan.hindex 6a9cbe0..8afec9e 100644--- a/src/libs/3rdparty/botan/botan.h+++ b/src/libs/3rdparty/botan/botan.h@@ -81,7 +81,9 @@ #endif #define BOTAN_TARGET_CPU_IS_LITTLE_ENDIAN+#if !defined(__arm__) #define BOTAN_TARGET_CPU_IS_X86_FAMILY+#endif #define BOTAN_TARGET_UNALIGNED_MEMORY_ACCESS_OK 1 #if defined(BOTAN_TARGET_CPU_IS_LITTLE_ENDIAN) || \
将该Patch 内容copy 到你的本地文件, 例如我们的文件为qt-issue.patch。
3. 打patch 后重新编译, 顺利通过编译!
阅读全文
0 0
- Ubuntu14.04 交叉编译Qt-creator
- QT creator交叉编译配置
- Ubuntu14.04中交叉编译Qt库
- 设置QT Creator交叉编译环境
- Qt Creator的安装与Qt交叉编译的配置
- Qt Creator的安装与Qt交叉编译的配置
- ubuntu14.04下安装qt creator
- Ubuntu14.04下Qt+Creator的安装
- Ubuntu14.04交叉编译BusyBox
- 4.2.3 设置Qt Creator使其支持交叉编译
- OANET(六):设置Qt Creator使其支持交叉编译
- 使用qt creator配置交叉编译+一键传输
- 【ARM】Ubuntu下使用Qt Creator创建交叉编译项目
- 【ARM】Ubuntu下使用Qt Creator创建交叉编译项目
- 4.2.3 设置Qt Creator使其支持交叉编译;4.2.4 交叉编译Qt4程序
- ubuntu14.04 交叉编译php5 交叉编译工具arm-linux
- 虚拟机中在Ubuntu14.04下搭建QT交叉编译环境--2014/8/14
- ubuntu14.04交叉编译环境搭建记录
- Android 之高仿活动时分秒倒计时
- 浅谈Html的内容加载及JS执行顺序
- Android画板开发(二) 橡皮擦实现
- ubuntu16.04 装kvm过程
- UML图
- Ubuntu14.04 交叉编译Qt-creator
- ora-01033:oracle initializationg or shutdown in progress
- JAVA连接池--mysql
- Java定时器的使用
- Spring IOC
- 阿里巴巴Java开发手册及Java代码规约扫描eclipse插件安装
- [spark] Standalone模式下Master、WorKer启动流程
- Redis 脚本
- 前端与后端的数据交互(jquery ajax+python flask)