大家编译QEMU for MINI2440 出过问题吗,为什么我会这样
Tofloor
poster avatar
pdlenovo
deepin
2013-06-12 19:32
Author
如题
最近 在研究嵌入式os 需要用虚拟机,qemu ,当然 仓库里的qemu-system-arm 本身可以虚拟很多板子,但就是不包含mini2440 然后qemu有个专门对于mini2440的分支,
我把它
git clone git://repo.or.cz/qemu/mini2440.git  qemu 下来
然后:./configure --target-list=arm-softmmu
这都没问题:
然后:make -j4
编译到最后链接时出现如下问题:
AR    arm-softmmu/libqemu.a
  LINK  arm-softmmu/qemu-system-arm
/usr/bin/ld: vl.o: undefined reference to symbol 'timer_settime@@GLIBC_2.3.3'
/usr/bin/ld: note: 'timer_settime@@GLIBC_2.3.3' is defined in DSO /lib/x86_64-linux-gnu/librt.so.1 so try adding it to the linker command line
/lib/x86_64-linux-gnu/librt.so.1: could not read symbols: 无效的操作
collect2: 错误: ld 返回 1
make[1]: *** [qemu-system-arm] 错误 1
make: *** [subdir-arm-softmmu] 错误 2

我的系统是 deepin-linux 12.12 64位 RC
先谢谢大家了!!
Reply Favorite View the author
All Replies
tsuibin
deepin
2013-06-14 17:41
#1
你编译的是一个arm应用,那么需要的是库的arm版本
你至少需要自己准备一套工具链
Reply View the author
pdlenovo
deepin
2013-06-14 17:46
#2
你编译的是一个arm应用,那么需要的是库的arm版本
你至少需要自己准备一套工具链
您误解了,我编译的是QEMU虚拟机,这个可不是ARM应用哦
Reply View the author
tsuibin
deepin
2013-06-14 17:48
#3
稍等,我也编译一下
Reply View the author
pdlenovo
deepin
2013-06-14 17:51
#4
稍等,我也编译一下
好的 谢谢啦 我在ubuntu 12.04 32位上是编译成功了,后来我又下载12.12RC32位的,编译依然和上面那个问题一样,然后我又把ubuntu12.04 32位下编译好的qemu-system-arm复制到12.12rc下运行,依然报错,qemu-system-arm: error while loading shared libraries: libSDL-1.2.so.0: cannot open shared object file: No such file or directory
可是我明明安装了libsdl1.2-dev,在/usr/lib/x86_64-linux-gnu下也确实有libSDL-1.2.so.0这个文件。
Reply View the author
tsuibin
deepin
2013-06-14 17:53
#5
确实出问题了
/usr/bin/ld: vl.o: undefined reference to symbol 'timer_settime@@GLIBC_2.3.3'
/usr/bin/ld: note: 'timer_settime@@GLIBC_2.3.3' is defined in DSO /lib/x86_64-linux-gnu/librt.so.1 so try adding it to the linker command line
/lib/x86_64-linux-gnu/librt.so.1: could not read symbols: 无效的操作
collect2: 错误: ld 返回 1
make[1]: *** [qemu] 错误 1
make: *** [subdir-i386-softmmu] 错误 2
Reply View the author
pdlenovo
deepin
2013-06-14 17:56
#6
确实出问题了
/usr/bin/ld: vl.o: undefined reference to symbol 'timer_settime@@GLIBC_2.3.3'
/usr/bin/ld: note: 'timer_settime@@GLIBC_2.3.3' is defined in DSO /lib/x86_64-linux-gnu/librt.so.1 so try adding it to the linker command line
/lib/x86_64-linux-gnu/librt.so.1: could not read symbols: 无效的操作
collect2: 错误: ld 返回 1
make[1]: *** [qemu] 错误 1
make: *** [subdir-i386-softmmu] 错误 2
是的。
Reply View the author
pdlenovo
deepin
2013-06-14 18:00
#7
[quote]确实出问题了
/usr/bin/ld: vl.o: undefined reference to symbol 'timer_settime@@GLIBC_2.3.3'
/usr/bin/ld: note: 'timer_settime@@GLIBC_2.3.3' is defined in DSO /lib/x86_64-linux-gnu/librt.so.1 so try adding it to the linker command line
/lib/x86_64-linux-gnu/librt.so.1: could not read symbols: 无效的操作
collect2: 错误: ld 返回 1
make[1]: *** [qemu] 错误 1
make: *** [subdir-i386-softmmu] 错误 2
是的。[/quote]
您这配置的是I386的虚拟机,没想到也有问题,我配置的是ARM的虚拟机,也是这个问题
Reply View the author
tsuibin
deepin
2013-06-14 18:29
#8
你在什么地方,我送你一块2440的开发板吧
Reply View the author
tsuibin
deepin
2013-06-14 18:35
#9
[quote]稍等,我也编译一下
好的 谢谢啦 我在ubuntu 12.04 32位上是编译成功了,后来我又下载12.12RC32位的,编译依然和上面那个问题一样,然后我又把ubuntu12.04 32位下编译好的qemu-system-arm复制到12.12rc下运行,依然报错,qemu-system-arm: error while loading shared libraries: libSDL-1.2.so.0: cannot open shared object file: No such file or directory
可是我明明安装了libsdl1.2-dev,在/usr/lib/x86_64-linux-gnu下也确实有libSDL-1.2.so.0这个文件。[/quote]

可能是路径不对
Reply View the author
pdlenovo
deepin
2013-06-14 19:19
#10
[quote][quote]稍等,我也编译一下
好的 谢谢啦 我在ubuntu 12.04 32位上是编译成功了,后来我又下载12.12RC32位的,编译依然和上面那个问题一样,然后我又把ubuntu12.04 32位下编译好的qemu-system-arm复制到12.12rc下运行,依然报错,qemu-system-arm: error while loading shared libraries: libSDL-1.2.so.0: cannot open shared object file: No such file or directory
可是我明明安装了libsdl1.2-dev,在/usr/lib/x86_64-linux-gnu下也确实有libSDL-1.2.so.0这个文件。[/quote]

可能是路径不对[/quote]
那怎么办呢,有解决的方法吗,我不想离开DEEPIN 它真的很好
Reply View the author
pdlenovo
deepin
2013-06-14 19:24
#11
你在什么地方,我送你一块2440的开发板吧
我是宜昌宜都的人,可是我也不想写几行代码就去刷板子啊
Reply View the author
snyh1010
deepin
2013-06-14 21:25
#12
这是因为gcc升级引起的,  ld (link) 现在的规则更加严谨了,  需要你完善编译脚本

在你编译的地方加上  -lrt    不过应该不至这一个库缺少。   你先玩玩,不行我再看看具体要怎么改
Reply View the author
pdlenovo
deepin
2013-06-14 21:56
#13
这是因为gcc升级引起的,  ld (link) 现在的规则更加严谨了,  需要你完善编译脚本

在你编译的地方加上  -lrt    不过应该不至这一个库缺少。   你先玩玩,不行我再看看具体要怎么改
谢谢,这个我试过的,我修改了makefile 的LDFLGS+=-lrt 结果一样。12.04可以的 可是我实在不愿放弃deepin linux12.12因为这个系统 是我有史以来见过最好的linux发行版
Reply View the author
pdlenovo
deepin
2013-06-15 01:07
#14
13.04也不行,错误一样
mint15也不行,错误一样
这都是32位的, 准确的说是 i686的
看来真的没希望的, 苦B的去用12.04吧
别了,我最爱的deepin linux 12.12.
Reply View the author
tsuibin
deepin
2013-06-19 19:53
#15
LIBS+=-lrt
Reply View the author
pdlenovo
deepin
2013-06-19 20:24
#16
LIBS+=-lrt
嗯 嗯 谢谢 在Makefile.target中第三十行加上-lrt再编译就行了 谢谢你们
Reply View the author