Chinaunix首页 | 论坛 | 博客
  • 博客访问: 697505
  • 博文数量: 260
  • 博客积分: 7033
  • 博客等级: 少将
  • 技术积分: 2633
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-13 23:15
文章分类

全部博文(260)

文章存档

2012年(2)

2011年(41)

2010年(78)

2009年(139)

我的朋友

分类: LINUX

2009-05-08 18:38:30

今天一个同事的gnome-system-tools,调用libxml-parser-perl时失败,据说这个问题已经放了很久了还没有解决。报告的错误是:
 

Can't load '/usr/lib/perl5/auto/XML/Parser/Expat/Expat.so' for module

XML::Parser::Expat: /usr/lib/libc.so: ELF file version does not match
current one at /usr/lib/perl/5.8/DynaLoader.pm line 230.
at /usr/lib/perl5/XML/Parser.pm line 14
Compilation failed in require at /usr/lib/perl5/XML/Parser.pm line 14.
BEGIN failed--compilation aborted at /usr/lib/perl5/XML/Parser.pm line 18.
Compilation failed in require at /usr/share/perl5/XML/Twig.pm line 116.
BEGIN failed--compilation aborted at /usr/share/perl5/XML/Twig.pm line 116.
Compilation failed in require at
/usr/share/system-tools-backends-2.0/modules/lib/perl/Net/DBus/Binding/Introspector.pm
line 57.
BEGIN failed--compilation aborted at
/usr/share/system-tools-backends-2.0/modules/lib/perl/Net/DBus/Binding/Introspector.pm
line 57.
Compilation failed in require at
/usr/share/system-tools-backends-2.0/modules/lib/perl/Net/DBus/Exporter.pm
line 235.
BEGIN failed--compilation aborted at
/usr/share/system-tools-backends-2.0/modules/lib/perl/Net/DBus/Exporter.pm
line 235.
Compilation failed in require at
/usr/share/system-tools-backends-2.0/modules/lib/perl/Net/DBus/Object.pm
line 129.
BEGIN failed--compilation aborted at
/usr/share/system-tools-backends-2.0/modules/lib/perl/Net/DBus/Object.pm
line 129.
Compilation failed in require at (eval 5) line 3.
...propagated at /usr/share/perl/5.8/base.pm line 85.
BEGIN failed--compilation aborted at
/usr/share/system-tools-backends-2.0/scripts/Platform.pm line 25.
Compilation failed in require at
/usr/share/system-tools-backends-2.0/scripts/SystemToolsBackends.pl line 51.
 
在板子上,ldd了一下Expat.so,发现也是报告elf version的错误。
下载了两个pdf:
 
后者说的比较精简,我比较喜欢。
 
仔细看了一下这两个文件的OD比较,也没有发现什么太大的差别。
而且readelf后,出来的也都是一样的结果。
很是奇怪。
 
但是我自己机器上交叉编译出来的那个文件在板子上就可以ldd。
 
后来发现那台共用机器的OE环境已经乱掉了,stuff/openembbed/下面有个packages还有个packages.old。而且有的文件夹里面的svn信息也丢失了。
 
最后,定性问题为编译环境问题!
 
--==========================================================================================--
(蓝色的0x2bbc为 start address)
image@xiewei-desktop deb $ od -N 64 -A x -t x1 Expat.151.so 
000000 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
000010 03 00 28 00 01 00 00 00 bc 2b 00 00 34 00 00 00
000020 0c 3d 01 00 02 00 00 05 34 00 20 00 04 00 28 00
000030 17 00 16 00 01 00 00 00 00 00 00 00 00 00 00 00
000040
--==========================================================================================--
image@xiewei-desktop deb $ od -N 64 -A x -t x1 Expat.local.so
000000 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
000010 03 00 28 00 01 00 00 00 4c 2d 00 00 34 00 00 00
000020 d0 3e 01 00 02 00 00 05 34 00 20 00 04 00 28 00
000030 19 00 18 00 01 00 00 00 00 00 00 00 00 00 00 00
000040
--==========================================================================================--
image@xiewei-desktop deb $ arm-linux-gnueabi-readelf -A Expat.151.so
Attribute Section: aeabi
File Attributes
  Tag_CPU_name: "7-A"
  Tag_CPU_arch: v7
  Tag_CPU_arch_profile: Application
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-1
  Tag_VFP_arch: VFPv3
  Tag_NEON_arch: NEONv1
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align8_needed: Yes
  Tag_ABI_align8_preserved: Yes, except leaf SP
  Tag_ABI_enum_size: int
  Tag_ABI_HardFP_use: SP and DP
  Tag_ABI_optimization_goals: Aggressive Speed
--==========================================================================================--
image@xiewei-desktop deb $ arm-linux-gnueabi-readelf -A Expat.local.so
Attribute Section: aeabi
File Attributes
  Tag_CPU_name: "7-A"
  Tag_CPU_arch: v7
  Tag_CPU_arch_profile: Application
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-1
  Tag_VFP_arch: VFPv3
  Tag_NEON_arch: NEONv1
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align8_needed: Yes
  Tag_ABI_align8_preserved: Yes, except leaf SP
  Tag_ABI_enum_size: int
  Tag_ABI_HardFP_use: SP and DP
  Tag_ABI_optimization_goals: Aggressive Speed
 
阅读(1173) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~