Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 101332 - g-cpan -i XML::SAX::ExpatXS fails in installation phase: can't locate XML/SAX/ExpatXS.pm in @INC
Summary: g-cpan -i XML::SAX::ExpatXS fails in installation phase: can't locate XML/SA...
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard: g-cpan
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-04 07:25 UTC by Richard Brown (RETIRED)
Modified: 2007-03-29 23:56 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Brown (RETIRED) gentoo-dev 2005-08-04 07:25:21 UTC
Full error:

Writing
/var/tmp/portage/XML-SAX-ExpatXS-1.08/image//usr/lib/perl5/vendor_perl/5.8.6/i686-linux/auto/XML/SAX/ExpatXS/
.packlist
Appending installation info to
/var/tmp/portage/XML-SAX-ExpatXS-1.08/image//usr/lib/perl5/5.8.6/i686-linux/perllocal.
pod
Can't locate XML/SAX/ExpatXS.pm in @INC (@INC contains: /etc/perl
/usr/lib/perl5/site_perl/5.8.6/i686-linux /usr/lib/ perl5/site_perl/5.8.6
/usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.2/i686-linux
/usr/lib/perl5/site_pe rl /usr/lib/perl5/vendor_perl/5.8.6/i686-linux
/usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.2 /usr
/lib/perl5/vendor_perl/5.8.2/i686-linux /usr/lib/perl5/vendor_perl/5.8.5
/usr/lib/perl5/vendor_perl/5.8.5/i686-linux /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.6/i686-linux /usr/lib/perl5/5.8.6 /usr/local/lib/site_perl
/usr/lib/per l5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.2/i686-linux .) at
/usr/lib/perl5/vendor_perl/5.8.6/XML/SAX.pm line 1 47.
make: *** [install_expat_xs] Error 2

emerge info:
Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.4.3, glibc-2.3.5-r0,
2.6.12-gentoo-r6 i686)
=================================================================
System uname: 2.6.12-gentoo-r6 i686 AMD Athlon(tm) XP 2500+
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.11
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -pipe -fforce-addr -fomit-frame-pointer
-funroll-loops -frerun-loop-opt -frerun-cse-after-loop -falign-functions=4
-ftracer -mmmx -m3dnow -msse"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.2/share/config
/usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown
/usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown
/usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -pipe -fforce-addr -fomit-frame-pointer
-funroll-loops -frerun-loop-opt -frerun-cse-after-loop -falign-functions=4
-ftracer -mmmx -m3dnow -msse"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks fixpackages sandbox sfperms strict"
GENTOO_MIRRORS="ftp://192.168.1.162 http://gentoo.blueyonder.co.uk"
LANG="en_GB"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://192.168.1.162/gentoo-portage"
USE="x86 3dnow 3dnowex X aac alsa apache apache2 apm avi bash-completion berkdb
bitmap-fonts bonobo canna cddb cdparanoia cdr clamav crypt cups curl divx4linux
dvd eds emboss encode escreen f-prot fam firefox flac foomaticdb fortran freetds
gd gd-external gdbm gif gnome gnomedb gpm gstreamer gtk gtk2 gtkhtml guile hal
imagemagick imlib innodb java jpeg junit lcms ldap libcaca libg++ libwww mad
mailwrapper mikmod mmx mmx2 mono motif mozilla mp3 mpeg mssql mysql ncurses nls
no-old-linux nptl nptlonly nvidia odbc ogg oggvorbis opengl pam pcre pdflib perl
php png ppds python qt quicktime readline real rtc ruby samba scanner sdl
sendmail slang spamassassin spell sqlite sse ssl svga tcpd tidy tiff truetype
truetype-fonts type1-fonts unicode usb vhosts vorbis xine xml xml2 xmms xprint
xv xvid zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS


Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-09-04 04:12:16 UTC
Mass re-assign.
Comment 2 David Sparks 2005-10-02 03:42:24 UTC
Below is part of Makefile.PL from XML::SAX::ExpatXS that is causing the
installation error.  Notice how install_expat_xs is appended to the install
target.  When the install target is called it starts a new Perl process which
expects the XML::SAX::ExpatXS .pm to already be installed.  Adding the "image"
directory to @INC so the Makefile can continue ie:

   
PERL5LIB=/var/tmp/portage/XML-SAX-ExpatXS-1.08/image/usr/lib/perl5/vendor_perl/5.8.6
g-cpan -i XML-SAX-ExpatXS

returns a sandbox error because it tries to write to the file:

    /usr/lib/perl5/vendor_perl/5.8.6/XML/SAX/ParserDetails.ini


Makefile.PL snippet that is the source of the problem:

sub MY::install {
    package MY;
    my $script = shift->SUPER::install(@_);
    if (ExtUtils::MakeMaker::prompt("Do you want to alter ParserDetails.ini?",
"Y") =~ /^y/i) {
        $script =~ s/install :: (.*)$/install :: $1 install_expat_xs/m;
        $script .= <<"INSTALL";

install_expat_xs :
\t\@\$(PERL) -MXML::SAX -e
"XML::SAX->add_parser(q(XML::SAX::ExpatXS))->save_parsers()"

INSTALL
Comment 3 Michael Cummings (RETIRED) gentoo-dev 2006-07-10 03:39:46 UTC
yeeeks, I didn't even realize this bug existed until the last cc added themselves overnight. Let's see - interactive modules (like the prompting for adding to parsedetails in this case) are always going to be a problem for g-cpan (even if there have been a ton of changes since this original post). In this particular case, I'd recommend editing the generated ebuild and adding this to the bottom:

src_unpack() {
        unpack ${A}
        sed -i -e "s|y/|n/|" ${S}/Makefile.PL
}


then running
 ebuild XML-SAX-ExpatXS-1.20.ebuild digest
to regenerate the digest.
Comment 4 Jonathan Geisler 2006-07-10 07:36:57 UTC
That is not the primary bug on this.  And in fact, there is another Bugzilla bug opened for that kind of problem by me (42189).  The bigger problem is that the module expects itself to be installed during a postinstall make target so that it can modify a file that really does need to be modified so that the XML::SAX::ParserFactory can instantiate this module if called upon to do so.  Unfortunately, I had already worked around this problem by using cpan to install the module and then using g-cpan to re-install the module so that I can track any future updates through portage.
Comment 5 Michael Cummings (RETIRED) gentoo-dev 2006-07-10 13:05:30 UTC
g-cpan isn't perfect - can't be. Module authors rarely follow the same recipe twice. I'm afraid this is a can't fix kind of bug -its outside the scope of an app like g-cpan to be able to account for absolutely every possibility in cpan i'm afraid.
Comment 6 Michael Cummings (RETIRED) gentoo-dev 2007-03-29 23:56:41 UTC
many moons later, actually marking it cantfix this time (sorry for the shout from the past)