Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 106992 - xsltproc segfaults when reading xsl-stylesheets
Summary: xsltproc segfaults when reading xsl-stylesheets
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Text-Markup Team (OBSOLETE)
URL:
Whiteboard:
Keywords:
: 107019 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-09-23 06:05 UTC by Michael Dudalev
Modified: 2006-03-31 17:40 UTC (History)
4 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 Michael Dudalev 2005-09-23 06:05:45 UTC
while ebuilding ghc-6.4.1 i've got this:
Writing users_guide/sec-ffi-ghc.html for sect1(sec-ffi-ghc)
Writing users_guide/ffi.html for chapter(ffi)
Writing users_guide/wrong-compilee.html for sect1(wrong-compilee)
Writing users_guide/wrong.html for chapter(wrong)
Writing users_guide/happy.html for sect1(happy)
Writing users_guide/hsc2hs.html for sect1(hsc2hs)
Writing users_guide/utils.html for chapter(utils)
Writing users_guide/ch11s02.html for sect1
Writing users_guide/ch11s03.html for sect1
Writing users_guide/ch11s04.html for sect1
Writing users_guide/win32-dlls.html for sect1(win32-dlls)
Writing users_guide/win32.html for chapter(win32)
Writing users_guide/bugs.html for sect1(bugs)
Writing users_guide/bugs-and-infelicities.html for chapter(bugs-and-infelicities )
Writing users_guide/faq.html for chapter(faq)
Writing users_guide/ix01.html for index
Writing users_guide/index.html for book(users-guide)
cp ../../../mk/fptools.css users_guide/
/usr/bin/xsltproc --output users_guide.fo \
            --stringparam draft.mode no \
            --stringparam toc.section.depth 3 --stringparam section.autolabel 1
--stringparam section.label.includes.component.label 1   \
            /usr/share/sgml/docbook/xsl-stylesheets-1.68.1/fo/docbook.xsl users_
guide.xml
Making portrait pages on USletter paper (8.5inx11in)
XPath error : Undefined variable
$ulink.footnotes != 0
                 ^
error: file /usr/share/sgml/docbook/xsl-stylesheets-1.68.1/fo/footnote.xsl line
94 element number
Failed to compile predicate
make[3]: *** [users_guide.fo] Segmentation fault
make[2]: *** [all] Error 1
make[1]: *** [all] Error 1
make[1]: Leaving directory `/var/tmp/portage/ghc-6.4.1/work/ghc-6.4.1/ghc'
make: *** [build] Error 1

!!! ERROR: dev-lang/ghc-6.4.1 failed.
!!! Function src_compile, Line 159, Exitcode 2
!!! make failed
!!! If you need support, post the topmost build error, NOT this status message.

seems to be some errors inside source of docs...

Reproducible: Always
Steps to Reproduce:
1.emerge =dev-lang/ghc-6.4.1
2.
3.

Actual Results:  
ebuild fails

Expected Results:  
successful installation

$ emerge  info
Portage 2.0.52-r1 (default-linux/x86/2005.1, gcc-3.4.4, glibc-2.3.5-r1,
2.6.13-suspend2-r4 i686)
=================================================================
System uname: 2.6.13-suspend2-r4 i686 Intel(R) Pentium(R) III Mobile CPU     
1133MHz
Gentoo Base System version 1.12.0_pre8
dev-lang/python:     2.3.5-r2, 2.4.1-r1
sys-apps/sandbox:    1.2.13
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium3 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/openjms/config /usr/kde/2/share/config
/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/init.d /etc/terminfo /etc/texmf/web2c
/etc/env.d"
CXXFLAGS="-O2 -march=pentium3 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="/home/qwe/samba/dists ftp://baz.zuzino.mipt.ru/
http://baz.zuzino.mipt.ru/gentoo/odin/  ftp://ftp.citkit.ru/pub/Linux/gentoo/
http://distfiles.gentoo.org/"
LANG="ru_RU.UTF-8"
LINGUAS="ru"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 16bit 7zip X X509 a52 aac acl acpi activefilter aimextras aio alsa ansi
ao apache2 apm applet auctex automount avalon avi bash-completion berkdb
bluetooth bmp bonobo boo browserplugin buffysize bzip2 c++ cairo cap capi caps
cardbus cdf cdparanoia cdrom chipcard chroot corba cracklib crypt csv ctype cups
curl curlwrappers dbus dhcp dio divx4linux djvu dlloader dmx dnd doc dpms dvi
ecc eds elf emacs emboss emoticon encode esd ethereal evo extensions extraengine
extras fam firefox foomaticdb fortran gb gcj gd gdal gdbm geometry geos ggi gif
gimp ginac glep glgd glitz glx gmail gmailtimestamps gmp gnome gnome-print
gnomecanvas gnomedb gnuplot gnutls gpgme gpm gps gs gsl gsm gssapi gstreamer gtk
gtk2 gtkhtml hal haskell hdf hdf5 howl html http icon iconv icu idea idl idn
ieee1394 image imagemagick imap imlib imlib2 inkjar ipv6 irda isdn j2ee jabber
jack jack-tmpfs java jboss jce jikes jimi jms john jpeg junit kde kerberos
keyscrub ladcca ladspa lame latex ldap leim libg++ libwww lj logrotate mad math
matroska mbox mcal mcve mdb mikmod mime mmx mng mono mopac7 motif mozdevelop
mozilla moznocompose moznoirc moznomail mozxmlterm mp3 mpeg mpeg2 mpeg4 msql
mssql mule musicbrainz mysql mysqli ncurses network neural nfs nls nntp nptl
ntlm numarray numeric nvidia ogg oggvorbis opengl osc oss pam pango patented
pcmcia pcntl pcre pda pdf pdflib perl pfpro pg-hier pg-intdatetime
pg-vacuumdelay pic png pop posix postgres ppds pyste python qdbm qt quicktime
radius rar rdesktop readline reiserfs rhythmbox rpc rrdtool rss rtc ruby samba
sapdb sasl sdl silc simplexml skey slang slp smartcard smime sms smtp snmp soap
spell sqlite sqlite3 srv sse ssl staticsocket svg sysfs syslog sysvipc szip
t1lib tetex tiff truetype truetype-fonts type1-fonts ucs2 ucs4 uml unicode usb
utf8 vim vim-with-x vorbis web wifi win32codecs wxwindows xemacs xine xml xml2
xmlrpc xosd xpm xscreensaver xsl xslt xv yaz zeroconf zlib linguas_ru
userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS, MAKEOPTS
Comment 1 Duncan Coutts (RETIRED) gentoo-dev 2005-09-23 11:01:36 UTC
Hmm, it looks like it is "fop" that is segfaulting.

Would you mind checking if this works for you:
USE="-java" emerge =dev-lang/ghc-6.4.1

Also, do you happen to know if you're running fop built with gcj or with another
java implementation?
Comment 2 Duncan Coutts (RETIRED) gentoo-dev 2005-09-23 17:10:50 UTC
Ok, we've disabled the java use flag for the moment until we can get a workaround. 

See also bug #107019 which is basically the same problem, but with dev-haskell/alex.

It does not seem that gcj is involved here. I'm adding the java herd to the CC
on this bug in the hope that they might be able to shed some light on the situation.
Comment 3 Luis Araujo (RETIRED) gentoo-dev 2005-09-24 07:28:17 UTC
After talking to the java herd, we have found that is a
app-text/docbook-xsl-stylesheets problem, ghc apparently isn't correctly
compiling the documentation with the latest version (1.68.1-r1) , though it
works with version 1.65.1.

I am re-assigning this bug to the text-markup herd, can you please take a look
at this?
Comment 4 Luis Araujo (RETIRED) gentoo-dev 2005-09-24 07:30:05 UTC
A similar problem happens with bug #107019
Comment 5 Duncan Coutts (RETIRED) gentoo-dev 2005-09-29 13:54:09 UTC
Michael, would you mind telling us what version of libxml2, libxslt, and
docbook-xsl-stylesheets you are using?

It appears that the segfault happens only with some versions and we're trying to
figure out which ones exactly.
Comment 6 Michael Dudalev 2005-09-29 16:05:56 UTC
(In reply to comment #5)
> Michael, would you mind telling us what version of libxml2, libxslt, and
> docbook-xsl-stylesheets you are using?
> 
> It appears that the segfault happens only with some versions and we're trying to
> figure out which ones exactly.

this ones:

[ebuild   R   ] dev-libs/libxml2-2.6.22  -debug +doc +ipv6 +python +readline
-static 0 kB
[ebuild   R   ] dev-libs/libxslt-1.1.15  +crypt -debug +python -static 0 kB
[ebuild   R   ] app-text/docbook-xsl-stylesheets-1.68.1-r1 
Comment 7 Duncan Coutts (RETIRED) gentoo-dev 2005-09-30 05:38:31 UTC
*** Bug 107019 has been marked as a duplicate of this bug. ***
Comment 8 Duncan Coutts (RETIRED) gentoo-dev 2005-09-30 05:39:21 UTC
Changing summary to better reflect the problem.

A quick recap for the text markup team:

some combinations of versions of libxml, libxslt and xsl-stylesheets cause the
xsltproc program to segfault when building the documentation for dev-lang/ghc
and dev-haskell/alex.

It appears to die while reading
/usr/share/sgml/docbook/xsl-stylesheets-1.68.1/fo/footnote.xsl

It seems only to happen with later versions of libxml and libxslt. Specifically 
dev-libs/libxslt-1.1.15 with dev-libs/libxml2-2.6.22 (on x86 and amd64) exhibit
the problem.

The current stable versions of those libs seem to be ok.

you can reproduce the bug by using the alex ebuild and re-enabling the java use
flag (which we have temporarily disabled)
Comment 9 Omari Norman 2006-02-20 17:13:02 UTC
I had the same problem, but when I was trying to make an fo file for an XML DocBook file that has footnotes in it. I worked around by downgrading libxslt to 1.1.14-r2. Anything I can do to help solve this bug, let me know.
Comment 10 Omari Norman 2006-03-03 20:19:21 UTC
See also http://lists.oasis-open.org/archives/docbook-apps/200509/msg00165.html this appears to be a libxslt bug rather than a Gentoo-specific bug.
Comment 11 Omari Norman 2006-03-03 20:28:47 UTC
Bug is fixed in CVS version of libxslt. See http://bugzilla.gnome.org/show_bug.cgi?id=316861
Comment 12 Omari Norman 2006-03-17 22:28:56 UTC
libxslt-1.1.14-r2, which did not have this problem, was kicked out of Portage. 1.1.15, which does have this problem, is the only one that remains.

This motivated me to find an alternative program; dev-java/xalan works well.
Comment 13 Jacobo Cabaleiro 2006-03-29 08:37:20 UTC
Another one for the group of affected ebuilds. I'm seeing this bug also when mercurial ebuild trys to generate man pages for mercurial (v 0.8). xmlto calls xsltproc which segfaults.
Comment 14 Leonardo Boshell (RETIRED) gentoo-dev 2006-03-30 16:43:54 UTC
(In reply to comment #11)
> Bug is fixed in CVS version of libxslt. See
> http://bugzilla.gnome.org/show_bug.cgi?id=316861

Sorry for the late reply. I've committed libxslt-1.1.15-r1 with the patch from upstream CVS. Could someone that have seen the bug reported in comment #0 try with this version and report the results?

Thanks.
Comment 15 Duncan Coutts (RETIRED) gentoo-dev 2006-03-31 02:26:52 UTC
(In reply to comment #14)
> Could someone that have seen the bug reported in comment #0 try
> with this version and report the results?

Yay, it works! Thanks Leonardo.

Just to confirm, here's what I get with libxslt-1.1.15 and then with libxslt-1.1.15-r1.

With libxslt-1.1.15 I can still reporduce the original segfault:

$ make fo
/usr/bin/xsltproc --output users_guide.fo \
            --stringparam draft.mode no \
            --stringparam toc.section.depth 3 --stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1   \
            /usr/share/sgml/docbook/xsl-stylesheets-1.68.1/fo/docbook.xsl users_guide.xml
Making portrait pages on USletter paper (8.5inx11in)
XPath error : Undefined variable
$ulink.footnotes != 0
                 ^
error: file /usr/share/sgml/docbook/xsl-stylesheets-1.68.1/fo/footnote.xsl line 94 element numberFailed to compile predicate
make: *** [users_guide.fo] Segmentation fault


With libxslt-1.1.15-r1 it works fine:

$ make fo
/usr/bin/xsltproc --output users_guide.fo \
            --stringparam draft.mode no \
            --stringparam toc.section.depth 3 --stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1   \
            /usr/share/sgml/docbook/xsl-stylesheets-1.68.1/fo/docbook.xsl users_guide.xml
Making portrait pages on USletter paper (8.5inx11in)
$ ls users_guide.fo
users_guide.fo
Comment 16 Leonardo Boshell (RETIRED) gentoo-dev 2006-03-31 17:40:58 UTC
OK, thanks for the confirmation. Resolving now.