Perl 在x86_64体系结构中以32位模式编译
我运行在一台采用x86_64体系结构的机器上,使用32位Perl 5.8.4编译。当我尝试安装XML::LibXML时,我收到以下调试消息: 。。。 所以问题是,我如何在.cpan属性(或Makefile.PL)中描述我希望在64位体系结构中以32位模式编译XML::LibXML B.R.CHPerl 在x86_64体系结构中以32位模式编译,perl,gcc,xml-libxml,Perl,Gcc,Xml Libxml,我运行在一台采用x86_64体系结构的机器上,使用32位Perl 5.8.4编译。当我尝试安装XML::LibXML时,我收到以下调试消息: 。。。 所以问题是,我如何在.cpan属性(或Makefile.PL)中描述我希望在64位体系结构中以32位模式编译XML::LibXML B.R.CH 首先,检查您的系统上是否安装了libxml2-devel和zlib-devel软件包,如下所示: $rpm-ql libxml2-devel $rpm-ql zlib-devel 如果其中任何一个未安装
祝你好运 我猜你使用的是安装在linux上的系统。您可能想尝试安装它自己的XML::LibXML包。否则,5.8.4非常旧(perl现在是5.14.X),因此您可能需要升级perl并重新开始。编译perl本身所使用的相同设置应用于编译XML::LibXML,因此,字面上的问题是相当令人困惑的。我猜它在使用32位编译器和正确的标志方面做得很好-唯一的问题是您没有32位libxml2。我猜您使用的是系统安装的linux。您可能想尝试安装它自己的XML::LibXML包。否则,5.8.4非常旧(perl现在是5.14.X),因此您可能需要升级perl并重新开始。编译perl本身所使用的相同设置应用于编译XML::LibXML,因此,字面上的问题相当令人困惑。我想它在使用32位编译器和正确的标志方面做得很好——唯一的问题是您没有32位libxml2。
# Running under perl version 5.008004 for linux
# Current time local: Fri Oct 7 08:43:24 2011
# Current time GMT: Fri Oct 7 06:43:24 2011
# Using Test.pm version 1.25
Can't load 'blib/arch/auto/Conftest/Conftest.so' for module Conftest: blib/arch/auto/Conftest/Conftest.so: wrong ELF class: ELFCLASS64 at /app/perl/.sys/i386_linux24/5.8.4/lib/5.8.4/i686-lin
ux-thread-multi/DynaLoader.pm line 230.
at test.pl line 2
Compilation failed in require at test.pl line 2.
BEGIN failed--compilation aborted at test.pl line 2.
not ok 1
# Failed test 1 in test.pl at line 1
# test.pl line 1 is: use Test; BEGIN { plan tests => 1; } END { ok($loaded) }
make: *** [test_dynamic] Error 255
system call to 'make test 'OTHERLDFLAGS='' failed at Makefile.PL line 495.
no
libxml2, zlib, and/or the Math library (-lm) have not been found.
Try setting LIBS and INC values on the command line
Or get libxml2 from
http://xmlsoft.org/
If you install via RPMs, make sure you also install the -devel
RPMs, as this is where the headers (.h files) are.
Also, you may try to run perl Makefile.PL with the DEBUG=1 parameter
to see the exact reason why the detection of libxml2 installation
failed or why Makefile.PL was not able to compile a test program.