quaver23

quaver23

0个粉丝

39

问答

0

专栏

0

资料

quaver23  发布于  2016-09-14 14:11:35
采纳率 0%
39个问答
11118

Qt5.7 移植到 Hi3536

 
请教各位前辈,我编译Qt 5.7 sources 不成功,以下是我做的动作:

请大家多多指点。

1. 在 /qtbase/mkspecs/devices 里创建了一个新的文件夹 [Linux-arm-hi3536-g++], 里面拷贝其他devices的 qmake.conf 及qplatformdef.h


2. 在qmake.conf加了一下代码:
        -----------------------------------------------------------------------------------------------------------------------------------------------
        QMAKE_INCDIR += /opt/hisi-linux/x86-arm/arm-hisiv400-linux/lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/include
        QMAKE_LIBDIR += /opt/hisi-linux/x86-arm/arm-hisiv400-linux/lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3
        HISILICON_CFLAGS += -march=armv7-a -mcpu=cortex-a9
        QMAKE_CFLAGS     += $$HILICON_FLAGS
        QMAKE_CXXFLAGS   += $$HILICON_FLAGS
        ----------------------------------------------------------------------------------------------------------------------------------------------


3. 在/qtbase/里创建了compile.sh 的文件,里头有./configure的参数:
        --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        #/bin/bash

        ./configure -confirm-license -release -eglfs -v -static -device linux-arm-hi3536-g++ -device-option CROSS_COMPILE=/opt/hisi-linux/x86-arm/arm-hisiv400-linux/bin/arm-hisiv400-linux-gnueabi- -        sysroot /home/aa/Hi3536_SDK_V2.0.4.0/package/osdrv_single/rootfs_glibc_single -prefix /home/aa/Hi3536_SDK_V2.0.4.0/v1_QtEmbedded_5.7
        ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


4. 之后再终端/qtbase/里运行compile.sh:
基本上编译失败,出现以下的问题:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
DEFAULT_INCDIRS="/opt/hisi-linux/x86-arm/arm-hisiv400-linux/arm-hisiv400-linux-gnueabi/include/c++/4.8.3
/opt/hisi-linux/x86-arm/arm-hisiv400-linux/arm-hisiv400-linux-gnueabi/include/c++/4.8.3/arm-hisiv400-linux-gnueabi
/opt/hisi-linux/x86-arm/arm-hisiv400-linux/arm-hisiv400-linux-gnueabi/include/c++/4.8.3/backward
/opt/hisi-linux/x86-arm/arm-hisiv400-linux/lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/include
/opt/hisi-linux/x86-arm/arm-hisiv400-linux/lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/include-fixed
/opt/hisi-linux/x86-arm/arm-hisiv400-linux/arm-hisiv400-linux-gnueabi/include
"
DEFAULT_LIBDIRS="/opt/hisi-linux/x86-arm/arm-hisiv400-linux/lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3
/opt/hisi-linux/x86-arm/arm-hisiv400-linux/lib/gcc
/opt/hisi-linux/x86-arm/arm-hisiv400-linux/arm-hisiv400-linux-gnueabi/lib
/home/aa/Hi3536_SDK_V2.0.4.0/package/osdrv_single/rootfs_glibc_single/lib
/home/aa/Hi3536_SDK_V2.0.4.0/package/osdrv_single/rootfs_glibc_single/usr/lib
"
Creating qmake...
make: Nothing to be done for 'first'.
Running configuration tests...
Found pkg-config from $PATH: /usr/bin/pkg-config
Warning: Disabling pkg-config since PKG_CONFIG_LIBDIR is not set and
the host's .pc files would be used (even if you set PKG_CONFIG_PATH).
Set this variable to the directory that contains target .pc files
for pkg-config to function correctly when cross-compiling or
use -pkg-config to override this test.
Note: PKG_CONFIG_SYSROOT_DIR automatically set to /home/aa/Hi3536_SDK_V2.0.4.0/package/osdrv_single/rootfs_glibc_single
Determining architecture... ()
/opt/hisi-linux/x86-arm/arm-hisiv400-linux/bin/arm-hisiv400-linux-gnueabi-g++ -c -pipe -mfloat-abi=hard --sysroot=/home/aa/Hi3536_SDK_V2.0.4.0/package/osdrv_single/rootfs_glibc_single -g -Wall -W -fPIC  -I. -isystem /opt/hisi-linux/x86-arm/arm-hisiv400-linux/lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/include -I../../mkspecs/devices/linux-arm-hi3536-g++ -o arch.o arch.cpp
arch.cpp:43:19: fatal error: stdio.h: No such file or directory
#include
                   ^
compilation terminated.
Makefile:196: recipe for target 'arch.o' failed
make: *** [arch.o] Error 1
Unable to determine architecture!

Could not determine the target architecture!
Turn on verbose messaging (-v) to see the final report.
Determining architecture... ()
g++ -c -pipe -g -Wall -W -fPIC  -I. -I../../mkspecs/linux-g++ -o arch.o arch.cpp
g++  -o arch arch.o   
    Found architecture in binary
CFG_HOST_ARCH="x86_64"
CFG_HOST_CPUFEATURES=" mmx sse sse2"
System architecture: 'unknown'
Host architecture: 'x86_64'
Precompiled-headers support enabled.
/opt/hisi-linux/x86-arm/arm-hisiv400-linux/bin/arm-hisiv400-linux-gnueabi-g++ -c -fvisibility=hidden fvisibility.c
Symbol visibility control enabled.
collect2: fatal error: cannot find 'ld'
compilation terminated.
/opt/hisi-linux/x86-arm/arm-hisiv400-linux/bin/arm-hisiv400-linux-gnueabi-g++ --sysroot=/home/aa/Hi3536_SDK_V2.0.4.0/package/osdrv_single/rootfs_glibc_single -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c
bsymbolic_functions.c:2:2: error: #error "Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)."
#error "Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)."
  ^
Symbolic function binding disabled.
checking for C++11...
/opt/hisi-linux/x86-arm/arm-hisiv400-linux/bin/arm-hisiv400-linux-gnueabi-g++ -c -pipe -mfloat-abi=hard --sysroot=/home/aa/Hi3536_SDK_V2.0.4.0/package/osdrv_single/rootfs_glibc_single -O2 -std=gnu++11 -Wall -W -fPIC  -I. -isystem /opt/hisi-linux/x86-arm/arm-hisiv400-linux/lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/include -I../../../mkspecs/devices/linux-arm-hi3536-g++ -o c++11.o c++11.cpp
In file included from /opt/hisi-linux/x86-arm/arm-hisiv400-linux/arm-hisiv400-linux-gnueabi/include/c++/4.8.3/arm-hisiv400-linux-gnueabi/bits/c++config.h:426:0,
                 from /opt/hisi-linux/x86-arm/arm-hisiv400-linux/arm-hisiv400-linux-gnueabi/include/c++/4.8.3/utility:68,
                 from c++11.cpp:46:
/opt/hisi-linux/x86-arm/arm-hisiv400-linux/arm-hisiv400-linux-gnueabi/include/c++/4.8.3/arm-hisiv400-linux-gnueabi/bits/os_defines.h:39:22: fatal error: features.h: No such file or directory
#include
                      ^
compilation terminated.
Makefile:195: recipe for target 'c++11.o' failed
make: *** [c++11.o] Error 1
C++11 disabled.
ERROR: Qt requires a C++11 compiler and yours does not seem to be that.
Please upgrade.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
我来回答
回答3个
时间排序
认可量排序

cowboy

0个粉丝

9

问答

0

专栏

5

资料

cowboy 2016-09-16 11:30:01
认可0
版本问题,交叉编译版本 QT5.6 ,看信息是这样的

quaver23

0个粉丝

39

问答

0

专栏

0

资料

quaver23 2016-09-16 16:16:00
认可0
你指的是海思的交叉编译器的版本吗? 就用 hisiv400 的 CC啊

chanyenping

0个粉丝

0

问答

0

专栏

0

资料

chanyenping 2016-12-17 08:47:06
认可0
https://wiki.qt.io/New_Features_in_Qt_5.7

New Features in Qt 5.7
C++11 Support Required from the compiler

Qt has enabled usage of C++11 in Qt applications for a long time, but with Qt 5.7 we are also enabling use of C++11 in the Qt modules. Therefore Qt 5.7 requires C++11 support from the compiler, and has removed support from older compilers not providing adequate C++11 support.

===

ERROR: Qt requires a C++11 compiler and yours does not seem to be that.

Qt 要先生成主機端 qmake, 所以是主機端的编译器版本要支援 C++11才行
不是交叉编译器

簡單檢測一下
$ echo "int main() { }" > a.c
$ g++ a.c -std=c++11
cc1plus: error: unrecognized command line option "-std=c++11"

So please upgrade your gcc :)
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
+ 添加网盘链接/附件

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
相关问答
无更多相似问答 去提问
举报反馈

举报类型

  • 内容涉黄/赌/毒
  • 内容侵权/抄袭
  • 政治相关
  • 涉嫌广告
  • 侮辱谩骂
  • 其他

详细说明

易百纳技术社区