Subject: | multiple test failures on Ubuntu 11.10: "undefined symbol: XML_SetCommentHandler" |
All tests fail with an error message similar to this:
Can't load '.../blib/arch/auto/XML/Parser/Expat/Expat.so' for module
XML::Parser::Expat: .../blib/arch/auto/XML/Parser/Expat/Expat.so:
undefined symbol: XML_SetCommentHandler at
.../perl-5.12.3/lib/5.12.3/x86_64-linux/DynaLoader.pm line 200.
This is despite the most recent version of the libexpat1-dev package
being installed as per the README:
# apt-get install libexpat1-dev
...
libexpat1-dev is already the newest version.
...
Full details of my Perl installation:
$ perl -V
Summary of my perl5 (revision 5 version 12 subversion 3) configuration:
Platform:
osname=linux, osvers=2.6.35-28-generic, archname=x86_64-linux
uname='linux pluto 2.6.35-28-generic #49-ubuntu smp tue mar 1
14:39:03 utc 2011 x86_64 gnulinux '
config_args='-de -Dprefix=/home/lx/perl5/perlbrew/perls/perl-5.12.3'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include'
ccversion='', gccversion='4.4.5', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib /lib64 /usr/lib64
libs=-lnsl -ldl -lm -lcrypt -lutil -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
libc=/lib/libc-2.12.1.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.12.1'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib
-fstack-protector'
Characteristics of this binary (from libperl):
Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP
USE_64_BIT_ALL
USE_64_BIT_INT USE_LARGE_FILES USE_PERLIO
USE_PERL_ATOF
Built under linux
Compiled at Mar 24 2011 16:07:42
%ENV:
PERLBREW_PATH="/home/lx/perl5/perlbrew/bin:/home/lx/perl5/perlbrew/perls/current/bin"
PERLBREW_PERL="perl-5.12.3"
PERLBREW_ROOT="/home/lx/perl5/perlbrew"
PERLBREW_VERSION="0.18"
@INC:
/home/lx/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/x86_64-linux
/home/lx/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3
/home/lx/perl5/perlbrew/perls/perl-5.12.3/lib/5.12.3/x86_64-linux
/home/lx/perl5/perlbrew/perls/perl-5.12.3/lib/5.12.3
.
Full output of each step is attached, with possibly interesting excerpts
shown below.
$ perl Makefile.PL
Note (probably harmless): No library found for -lexpat
Note (probably harmless): No library found for -lexpat
...
$ make
...
cc -c -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2
-DVERSION=\"2.41\" -DXS_VERSION=\"2.41\" -fPIC
"-I/home/lx/perl5/perlbrew/perls/perl-5.12.3/lib/5.12.3/x86_64-linux/CORE"
Expat.c
Expat.xs: In function ‘append_error’:
Expat.xs:220:8: warning: format ‘%d’ expects argument of type ‘int’, but
argument 4 has type ‘XML_Size’ [-Wformat]
Expat.xs:220:8: warning: format ‘%d’ expects argument of type ‘int’, but
argument 5 has type ‘XML_Size’ [-Wformat]
Expat.xs:220:8: warning: format ‘%d’ expects argument of type ‘int’, but
argument 6 has type ‘XML_Index’ [-Wformat]
...
$ make TEST_VERBOSE=1 test
...
Can't load '.../blib/arch/auto/XML/Parser/Expat/Expat.so' for module
XML::Parser::Expat: .../blib/arch/auto/XML/Parser/Expat/Expat.so:
undefined symbol: XML_SetCommentHandler at
.../perl-5.12.3/lib/5.12.3/x86_64-linux/DynaLoader.pm line 200.
...
Subject: | makefile-pl-output.txt |
$ perl Makefile.PL
Note (probably harmless): No library found for -lexpat
Note (probably harmless): No library found for -lexpat
Writing Makefile for XML::Parser::Expat
Writing MYMETA.yml and MYMETA.json
Writing Makefile for XML::Parser
Writing MYMETA.yml and MYMETA.json
Subject: | make-output.txt |
$ make
cp Parser/Encodings/x-sjis-cp932.enc blib/lib/XML/Parser/Encodings/x-sjis-cp932.enc
cp Parser/Encodings/koi8-r.enc blib/lib/XML/Parser/Encodings/koi8-r.enc
cp Parser/Encodings/iso-8859-7.enc blib/lib/XML/Parser/Encodings/iso-8859-7.enc
cp Parser/Encodings/ibm866.enc blib/lib/XML/Parser/Encodings/ibm866.enc
cp Parser/Style/Tree.pm blib/lib/XML/Parser/Style/Tree.pm
cp Parser/Encodings/iso-8859-9.enc blib/lib/XML/Parser/Encodings/iso-8859-9.enc
cp Parser/Encodings/x-euc-jp-unicode.enc blib/lib/XML/Parser/Encodings/x-euc-jp-unicode.enc
cp Parser/Encodings/README blib/lib/XML/Parser/Encodings/README
cp Parser/Encodings/euc-kr.enc blib/lib/XML/Parser/Encodings/euc-kr.enc
cp Parser/Encodings/windows-1250.enc blib/lib/XML/Parser/Encodings/windows-1250.enc
cp Parser/Encodings/windows-1252.enc blib/lib/XML/Parser/Encodings/windows-1252.enc
cp Parser/Encodings/big5.enc blib/lib/XML/Parser/Encodings/big5.enc
cp Parser/Encodings/windows-1255.enc blib/lib/XML/Parser/Encodings/windows-1255.enc
cp Parser/Encodings/iso-8859-3.enc blib/lib/XML/Parser/Encodings/iso-8859-3.enc
cp Parser/Encodings/Japanese_Encodings.msg blib/lib/XML/Parser/Encodings/Japanese_Encodings.msg
cp Parser/Encodings/iso-8859-8.enc blib/lib/XML/Parser/Encodings/iso-8859-8.enc
cp Parser/Encodings/x-euc-jp-jisx0221.enc blib/lib/XML/Parser/Encodings/x-euc-jp-jisx0221.enc
cp Parser/Encodings/iso-8859-4.enc blib/lib/XML/Parser/Encodings/iso-8859-4.enc
cp Parser/Style/Subs.pm blib/lib/XML/Parser/Style/Subs.pm
cp Parser/Encodings/x-sjis-jdk117.enc blib/lib/XML/Parser/Encodings/x-sjis-jdk117.enc
cp Parser/Encodings/iso-8859-2.enc blib/lib/XML/Parser/Encodings/iso-8859-2.enc
cp Parser/Encodings/x-sjis-unicode.enc blib/lib/XML/Parser/Encodings/x-sjis-unicode.enc
cp Parser/LWPExternEnt.pl blib/lib/XML/Parser/LWPExternEnt.pl
cp Parser/Style/Objects.pm blib/lib/XML/Parser/Style/Objects.pm
cp Parser.pm blib/lib/XML/Parser.pm
cp Parser/Encodings/windows-1251.enc blib/lib/XML/Parser/Encodings/windows-1251.enc
cp Parser/Style/Debug.pm blib/lib/XML/Parser/Style/Debug.pm
cp Parser/Encodings/x-sjis-jisx0221.enc blib/lib/XML/Parser/Encodings/x-sjis-jisx0221.enc
cp Parser/Style/Stream.pm blib/lib/XML/Parser/Style/Stream.pm
cp Parser/Encodings/iso-8859-5.enc blib/lib/XML/Parser/Encodings/iso-8859-5.enc
make[1]: Entering directory `/home/lx/.cpanm/work/1335056724.6700/XML-Parser-2.41/Expat'
cp Expat.pm ../blib/lib/XML/Parser/Expat.pm
/home/lx/perl5/perlbrew/perls/perl-5.12.3/bin/perl /home/lx/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/ExtUtils/xsubpp -noprototypes -typemap /home/lx/perl5/perlbrew/perls/perl-5.12.3/lib/5.12.3/ExtUtils/typemap -typemap typemap Expat.xs > Expat.xsc && mv Expat.xsc Expat.c
cc -c -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"2.41\" -DXS_VERSION=\"2.41\" -fPIC "-I/home/lx/perl5/perlbrew/perls/perl-5.12.3/lib/5.12.3/x86_64-linux/CORE" Expat.c
Expat.xs: In function ‘append_error’:
Expat.xs:220:8: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘XML_Size’ [-Wformat]
Expat.xs:220:8: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘XML_Size’ [-Wformat]
Expat.xs:220:8: warning: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘XML_Index’ [-Wformat]
Running Mkbootstrap for XML::Parser::Expat ()
chmod 644 Expat.bs
rm -f ../blib/arch/auto/XML/Parser/Expat/Expat.so
cc -shared -O2 -L/usr/local/lib -fstack-protector Expat.o -o ../blib/arch/auto/XML/Parser/Expat/Expat.so \
\
chmod 755 ../blib/arch/auto/XML/Parser/Expat/Expat.so
cp Expat.bs ../blib/arch/auto/XML/Parser/Expat/Expat.bs
chmod 644 ../blib/arch/auto/XML/Parser/Expat/Expat.bs
Manifying ../blib/man3/XML::Parser::Expat.3
make[1]: Leaving directory `/home/lx/.cpanm/work/1335056724.6700/XML-Parser-2.41/Expat'
Manifying blib/man3/XML::Parser::Style::Objects.3
Manifying blib/man3/XML::Parser::Style::Debug.3
Manifying blib/man3/XML::Parser.3
Manifying blib/man3/XML::Parser::Style::Subs.3
Manifying blib/man3/XML::Parser::Style::Tree.3
Manifying blib/man3/XML::Parser::Style::Stream.3
Subject: | make-test-output.txt |
Message body is not shown because it is too large.