您尚未登录。

楼主 #1 2019-03-08 15:36:40

刘少来了
会员
注册时间: 2019-01-24
已发帖子: 25
积分: 20

qt5.6 编译出错

我编译qt5.6源码时 ,make出错,Ubuntu报错如下,大神们帮忙看看


/home/gsk/licheepi/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi/bin/../lib/gcc/arm-linux-gnueabi/7.2.1/../../../../arm-linux-gnueabi/bin/ld: .obj/qtdiag.o: undefined reference to symbol '__atomic_load_8@@LIBATOMIC_1.0'
/home/gsk/licheepi/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi/bin/../arm-linux-gnueabi/libc/lib/libatomic.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:81: recipe for target '../../bin/qtdiag' failed
make[3]: *** [../../bin/qtdiag] Error 1
make[3]: Leaving directory '/home/gsk/licheepi/qt-everywhere-opensource-src-5.6.0/qttools/src/qtdiag'
Makefile:250: recipe for target 'sub-qtdiag-make_first' failed
make[2]: *** [sub-qtdiag-make_first] Error 2
make[2]: Leaving directory '/home/gsk/licheepi/qt-everywhere-opensource-src-5.6.0/qttools/src'
Makefile:44: recipe for target 'sub-src-make_first' failed
make[1]: *** [sub-src-make_first] Error 2
make[1]: Leaving directory '/home/gsk/licheepi/qt-everywhere-opensource-src-5.6.0/qttools'
Makefile:769: recipe for target 'module-qttools-make_first' failed
make: *** [module-qttools-make_first] Error 2
gsk@gsk-machine:~/licheepi/qt-everywhere-opensource-src-5.6.0$

离线

#2 2019-03-08 15:57:12

jimmy
会员
注册时间: 2017-10-29
已发帖子: 316
积分: 315

Re: qt5.6 编译出错

libatomic.so.1  貌似缺这个文件

离线

楼主 #3 2019-03-08 16:15:09

刘少来了
会员
注册时间: 2019-01-24
已发帖子: 25
积分: 20

Re: qt5.6 编译出错

jimmy 说:

libatomic.so.1  貌似缺这个文件

我看了目录,有这个文件。。。。。

gsk@gsk-machine:~/licheepi/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/libc/lib$ ls -l libatomic.*
-rw-r--r-- 1 gsk gsk 480164 11月 19  2017 libatomic.a
lrwxrwxrwx 1 gsk gsk     18 11月 19  2017 libatomic.so -> libatomic.so.1.2.0
lrwxrwxrwx 1 gsk gsk     18 11月 19  2017 libatomic.so.1 -> libatomic.so.1.2.0
-rwxr-xr-x 1 gsk gsk 202276 11月 19  2017 libatomic.so.1.2.0
gsk@gsk-machine:~/licheepi/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/libc/lib$

离线

#4 2019-03-08 16:23:41

山无棱
会员
注册时间: 2017-10-23
已发帖子: 116
积分: 116

Re: qt5.6 编译出错

error adding symbols: DSO missing from command line

好像文件格式出问题了

离线

#5 2019-03-08 19:01:29

checkout
会员
注册时间: 2018-11-09
已发帖子: 173
积分: 168

Re: qt5.6 编译出错

libc用的是哪个版本?

最近编辑记录 checkout (2019-03-08 19:01:43)

离线

楼主 #6 2019-03-11 09:02:30

刘少来了
会员
注册时间: 2019-01-24
已发帖子: 25
积分: 20

Re: qt5.6 编译出错

checkout 说:

libc用的是哪个版本?

应该就是 libc2.25了

gsk@gsk-machine:~/licheepi/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/libc/lib$ ls -l libc*
-rwxr-xr-x 1 gsk gsk 13920364 11月 19  2017 libc-2.25.so
-rwxr-xr-x 1 gsk gsk   260164 11月 19  2017 libcidn-2.25.so
lrwxrwxrwx 1 gsk gsk       15 11月 19  2017 libcidn.so.1 -> libcidn-2.25.so
-rw-r--r-- 1 gsk gsk   859680 11月 19  2017 libcilkrts.a
lrwxrwxrwx 1 gsk gsk       19 11月 19  2017 libcilkrts.so -> libcilkrts.so.5.0.0
lrwxrwxrwx 1 gsk gsk       19 11月 19  2017 libcilkrts.so.5 -> libcilkrts.so.5.0.0
-rwxr-xr-x 1 gsk gsk   530876 11月 19  2017 libcilkrts.so.5.0.0
-rw-r--r-- 1 gsk gsk      173 11月 19  2017 libcilkrts.spec
-rwxr-xr-x 1 gsk gsk   169816 11月 19  2017 libcrypt-2.25.so
lrwxrwxrwx 1 gsk gsk       16 11月 19  2017 libcrypt.so.1 -> libcrypt-2.25.so
lrwxrwxrwx 1 gsk gsk       12 11月 19  2017 libc.so.6 -> libc-2.25.so

离线

#7 2019-03-11 17:42:57

checkout
会员
注册时间: 2018-11-09
已发帖子: 173
积分: 168

Re: qt5.6 编译出错

是不是用了uClibc,要glibc才行的

离线

楼主 #8 2019-03-12 16:59:40

刘少来了
会员
注册时间: 2019-01-24
已发帖子: 25
积分: 20

Re: qt5.6 编译出错

checkout 说:

是不是用了uClibc,要glibc才行的

额,解决了,是链接库出问题了,在 qmake.conf 文件中,在QMAKE_LINK 后加上 -latomic就好了,但是又出了新问题。。。。。,一部分log如下,是不是我的编译器有问题啊,哎

../3rdparty/javascriptcore/JavaScriptCore/wtf/Vector.h:473:36: warning: cast from ‘QTWTF::AlignedBufferChar* {aka char*}’ to ‘QTJSC::ExpressionNode**’ increases required alignment of target type [-Wcast-align]
{standard input}: Assembler messages:
{standard input}:19369: 错误: invalid immediate: 983040 is out of range
{standard input}:19369: 错误: value of 983040 too large for field of 2 bytes at 30062
Makefile:10962: recipe for target 'obj/release/JITOpcodes.o' failed
make[3]: *** [obj/release/JITOpcodes.o] Error 1
{standard input}: Assembler messages:
{standard input}:147: 错误: invalid immediate: 983040 is out of range
{standard input}:147: 错误: value of 983040 too large for field of 2 bytes at 180
{standard input}:382: 错误: invalid immediate: 983040 is out of range
{standard input}:382: 错误: value of 983040 too large for field of 2 bytes at 544
{standard input}:5584: 错误: invalid immediate: 983040 is out of range
{standard input}:5584: 错误: value of 983040 too large for field of 2 bytes at 5292
{standard input}:6823: 错误: invalid immediate: 983040 is out of range
{standard input}:6823: 错误: value of 983040 too large for field of 2 bytes at 7632
{standard input}:10525: 错误: invalid immediate: 983040 is out of range
{standard input}:10525: 错误: value of 983040 too large for field of 2 bytes at 14738
{standard input}:11501: 错误: invalid immediate: 983040 is out of range
{standard input}:11501: 错误: value of 983040 too large for field of 2 bytes at 16602
{standard input}:12813: 错误: invalid immediate: 983040 is out of range
{standard input}:12813: 错误: value of 983040 too large for field of 2 bytes at 19056
{standard input}:15858: 错误: invalid immediate: 983040 is out of range
{standard input}:15858: 错误: value of 983040 too large for field of 2 bytes at 24866
{standard input}:19875: 错误: invalid immediate: 983040 is out of range
{standard input}:19875: 错误: value of 983040 too large for field of 2 bytes at 32562
Makefile:11241: recipe for target 'obj/release/JITPropertyAccess.o' failed
make[3]: *** [obj/release/JITPropertyAccess.o] Error 1
make[3]: Leaving directory '/home/gsk/licheepi/qt-everywhere-opensource-src-5.6.0/qtscript/src/script'
Makefile:43: recipe for target 'sub-script-make_first-ordered' failed
make[2]: *** [sub-script-make_first-ordered] Error 2
make[2]: Leaving directory '/home/gsk/licheepi/qt-everywhere-opensource-src-5.6.0/qtscript/src'
Makefile:44: recipe for target 'sub-src-make_first' failed
make[1]: *** [sub-src-make_first] Error 2
make[1]: Leaving directory '/home/gsk/licheepi/qt-everywhere-opensource-src-5.6.0/qtscript'
Makefile:795: recipe for target 'module-qtscript-make_first' failed
make: *** [module-qtscript-make_first] Error 2
gsk@gsk-machine:~/licheepi/qt-everywhere-opensource-src-5.6.0$

离线

#9 2019-03-12 17:35:40

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: qt5.6 编译出错

https://whycan.cn/t_2169.html


用 buildroot 吧,省心





离线

楼主 #10 2019-03-13 16:03:53

刘少来了
会员
注册时间: 2019-01-24
已发帖子: 25
积分: 20

Re: qt5.6 编译出错

晕哥 说:

https://whycan.cn/t_2169.html


用 buildroot 吧,省心

还是老老实实用buildroot吧,抱起晕哥嘬一口

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn