<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>7148</bug_id>
          
          <creation_ts>2015-01-15 21:21:48 +0000</creation_ts>
          <short_desc>Building Yocto Docs takes a significant time with recent tools versions</short_desc>
          <delta_ts>2015-02-12 18:14:01 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>9</classification_id>
          <classification>Documentation</classification>
          <product>General Docs</product>
          <component>docs-general</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>28 January 2015: work-around verified</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.8</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Richard Purdie">richard.purdie</reporter>
          <assigned_to name="Alejandro Hernandez">alejandro.hernandez</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>ross.burton</cc>
    
    <cc>sgw</cc>
    
    <cc>srifenbark</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>47951</commentid>
    <comment_count>0</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-01-15 21:21:48 +0000</bug_when>
    <thetext>richard@dax:/media/build1/poky/documentation/adt-manual$ time /media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/bin/xsltproc --xinclude -o adt-manual.html adt-manual-customization.xsl adt-manual.xml 
Note: namesp. cut : stripped namespace before processing           
            Yocto Project Application Developer&apos;s Guide
        
WARNING: cannot add @xml:base to node set root element.  Relative paths may not work.
Note: namesp. cut : processing stripped document                   
            Yocto Project Application Developer&apos;s Guide
        

real	0m32.690s
user	0m0.573s
sys	0m0.043s
richard@dax:/media/build1/poky/documentation/adt-manual$ /media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/bin/xsltproc --version
Using libxml 20708, libxslt 10126 and libexslt 815
xsltproc was compiled against libxml 20708, libxslt 10126 and libexslt 815
libxslt 10126 was compiled against libxml 20708
libexslt 815 was compiled against libxml 20708
richard@dax:/media/build1/poky/documentation/adt-manual$ time /media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/bin/xsltproc --xinclude -o adt-manual.html adt-manual-customization.xsl adt-manual.xml 
Note: namesp. cut : stripped namespace before processing           
            Yocto Project Application Developer&apos;s Guide
        
Note: namesp. cut : processing stripped document                   
            Yocto Project Application Developer&apos;s Guide
        

real	2m41.852s
user	0m0.720s
sys	0m0.099s
richard@dax:/media/build1/poky/documentation/adt-manual$ /media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/bin/xsltproc --versionUsing libxml 20902, libxslt 10128 and libexslt 817
xsltproc was compiled against libxml 20902, libxslt 10128 and libexslt 817
libxslt 10128 was compiled against libxml 20902
libexslt 817 was compiled against libxml 20902
richard@dax:/media/build1/poky/documentation/adt-manual$ time /media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/bin/xsltproc --xinclude -o adt-manual.html adt-manual-customization.xsl adt-manual.xml 
Note: namesp. cut : stripped namespace before processing           
            Yocto Project Application Developer&apos;s Guide
        
WARNING: cannot add @xml:base to node set root element.  Relative paths may not work.
Note: namesp. cut : processing stripped document                   
            Yocto Project Application Developer&apos;s Guide
        

real	0m33.907s
user	0m0.563s
sys	0m0.041s
richard@dax:/media/build1/poky/documentation/adt-manual$ /media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/bin/xsltproc --versionUsing libxml 20902, libxslt 10126 and libexslt 815
xsltproc was compiled against libxml 20902, libxslt 10126 and libexslt 815
libxslt 10126 was compiled against libxml 20902
libexslt 815 was compiled against libxml 20902

so the issue looks to be in libxslt between 1.1.26 and 1.1.28</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47952</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-01-15 21:26:12 +0000</bug_when>
    <thetext>richard@dax:/media/build1/poky/documentation/adt-manual$ /media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/bin/xsltproc --versionUsing libxml 20902, libxslt 10126 and libexslt 815
xsltproc was compiled against libxml 20902, libxslt 10126 and libexslt 815
libxslt 10126 was compiled against libxml 20902
libexslt 815 was compiled against libxml 20902
richard@dax:/media/build1/poky/documentation/adt-manual$ time /media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/bin/xsltproc --xinclude -o adt-manual.html adt-manual-customization.xsl adt-manual.xml 
^[[A^[[A
Note: namesp. cut : stripped namespace before processing           
            Yocto Project Application Developer&apos;s Guide
        
Note: namesp. cut : processing stripped document                   
            Yocto Project Application Developer&apos;s Guide
        

real	0m33.173s
user	0m0.591s
sys	0m0.030s
richard@dax:/media/build1/poky/documentation/adt-manual$ /media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/bin/xsltproc --versionUsing libxml 20902, libxslt 10127 and libexslt 816
xsltproc was compiled against libxml 20902, libxslt 10127 and libexslt 816
libxslt 10127 was compiled against libxml 20902
libexslt 816 was compiled against libxml 20902

so the issue is between 1.1.27 and 1.1.28</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47953</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-01-15 22:05:59 +0000</bug_when>
    <thetext>With SRCREV = &quot;73e08bf7c36a9145d38f51d37e66529b873c011a&quot;

real	2m9.349s
user	0m0.721s
sys	0m0.081s


SRCREV = &quot;dc11b6b379a882418093ecc8adf11f6166682e8d&quot;

real	2m22.658s
user	0m0.765s
sys	0m0.067s

SRCREV = &quot;3d7ba8075408e5b87fde820746bcacfd86b553c6&quot;

real	2m25.824s
user	0m0.733s
sys	0m0.080s

SRCREV = &quot;31312989ab25faf81f9aa9e41d17e0f8f4fe21e7&quot;

real	1m59.490s
user	0m0.721s
sys	0m0.098s</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47954</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-01-15 22:16:23 +0000</bug_when>
    <thetext>After some poking around, its this:

do_install_append_class-native () {
    create_wrapper ${D}/${bindir}/xsltproc XML_CATALOG_FILES=${sysconfdir}/xml/catalog.xml
}

which when added to the recipe causes the extra delays. I haven;t looked into why.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48011</commentid>
    <comment_count>4</comment_count>
    <who name="Alejandro Hernandez">alejandro.hernandez</who>
    <bug_when>2015-01-16 21:51:59 +0000</bug_when>
    <thetext>create_wrapper() from utils.bbclass is used to execute a command with extra environmental variables, at do_install() it moves the actual command &quot;xstlproc&quot; to &quot;xstlproc.real&quot;, and creates another executable &quot;xstlproc&quot; where the variables are declared and then it calls the actual command.

After performing an strace on both xstlproc and xstlproc.real, there&apos;s an interesting result, it looks like when calling xstlproc the file &quot;catalog.xml&quot; can&apos;t be found and it is then downloaded from upstream.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48014</commentid>
    <comment_count>5</comment_count>
    <who name="Alejandro Hernandez">alejandro.hernandez</who>
    <bug_when>2015-01-16 23:29:04 +0000</bug_when>
    <thetext>Indeed, the file catalog.xml can&apos;t be found on the sysroot native directory, when calling xsltproc.real (without the environmental variable), it &quot;finds&quot; the local catalog file on the host machine, this would be resolved by adding

DEPENDS += &quot;xmlto-native&quot;

To the libxslt recipe, although doing so, installs the file on the native sysroot, but even then the problem persists, either copying the local catalog file to the native sysroot or changing the environmental variable to point to it solves the problem, so the problem is within the catalog file.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48016</commentid>
    <comment_count>6</comment_count>
    <who name="Alejandro Hernandez">alejandro.hernandez</who>
    <bug_when>2015-01-17 00:21:03 +0000</bug_when>
    <thetext>The &quot;catalog.xml&quot; file refers to external entities, in this case local files &quot;docbook-xml.xml&quot; and &quot;docbook-xsl.xml&quot;:

[aehernan@aehernan-DevStation xml]$ head -n 18 catalog.xml | tail -n 4
&lt;delegateSystem systemIdStartString=&quot;http://www.oasis-open.org/docbook/xml/&quot; catalog=&quot;./docbook-xml.xml&quot;/&gt;
&lt;delegatePublic publicIdStartString=&quot;-//OASIS//DTD DocBook CALS Table Model&quot; catalog=&quot;./docbook-xml.xml&quot;/&gt;
&lt;delegateURI uriStartString=&quot;http://docbook.sourceforge.net/release/xsl/&quot; catalog=&quot;./docbook-xsl.xml&quot;/&gt;
&lt;delegateSystem systemIdStartString=&quot;http://docbook.sourceforge.net/release/xsl/&quot; catalog=&quot;./docbook-xsl.xml&quot;/&gt;

These two files are contained on the recipes:

docbook-xml-dtd4-native
docbook-xsl-stylesheets-native

respectively, installing these two packages solves the problem.


time ~/Yocto/poky/build/qemux86/tmp/sysroots/x86_64-linux/usr/bin/xsltproc.real -xinclude -o adt-manual.html adt-manual-customization.xsl adt-manual.xml
Note: namesp. cut : stripped namespace before processing           
            Yocto Project Application Developer&apos;s Guide
        
Note: namesp. cut : processing stripped document                   
            Yocto Project Application Developer&apos;s Guide
        

real	0m0.327s
user	0m0.309s
sys	0m0.018s


time ~/Yocto/poky/build/qemux86/tmp/sysroots/x86_64-linux/usr/bin/xsltproc -xinclude -o adt-manual.html adt-manual-customization.xsl adt-manual.xml
Note: namesp. cut : stripped namespace before processing           
            Yocto Project Application Developer&apos;s Guide
        
Note: namesp. cut : processing stripped document                   
            Yocto Project Application Developer&apos;s Guide
        

real	0m0.351s
user	0m0.325s
sys	0m0.024s</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48342</commentid>
    <comment_count>7</comment_count>
    <who name="Alejandro Hernandez">alejandro.hernandez</who>
    <bug_when>2015-01-27 21:53:29 +0000</bug_when>
    <thetext>In summary the problem was that the necessary local files were not being installed, these files were contained within the docbook-xml-dtd4-native and
docbook-xsl-stylesheets-native respectively, these two are listed as RDEPENDS to xmlto-native, which in theory should have worked, but since natives don&apos;t have packages it didn&apos;t, adding the following line to the xmlto recipe forces the RDEPENDS of xmlto-native to perform do_populate_sysroot before xmlto&apos;d do_populate_sysroot task, solving the issue:

do_populate_sysroot[rdeptask] = &quot;do_populate_sysroot&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48365</commentid>
    <comment_count>8</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-01-28 15:31:13 +0000</bug_when>
    <thetext>It&apos;s good that we&apos;ve solved this within the build system, but unfortunately Scott is still stuck with this problem - after upgrading to Ubuntu 14.10 it takes him up to 70 minutes to build and publish the full set of docs, which is beyond ridiculous. He already has docbook-xml and docbook-xsl installed, and I can&apos;t see any other packages in Ubuntu that look like they would be related.

Obviously we could get him a buildtools-like setup as a workaround, and that might be the quickest fix for the moment, but we do have to think about that subset of our users that will be building our docs themselves and potentially hitting the same issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48366</commentid>
    <comment_count>9</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2015-01-28 16:13:21 +0000</bug_when>
    <thetext>Hi, 

Thanks Richard and Alejandro for finding this work-around.  Thanks Paul for helping me get it going.  I am able to build manuals now at the speeds prior to this issue.  As Paul noted, though, it is still a work-around that forces me to use the poky build system as well as export the PATH variable (see bug 7134) to address the ENTITY expansion problems.  

It would be good to have a solution in place that works without exporting the PATH variable, thus making me use the poky/build area to create the manuals.  Maybe the whole issue is outside the scope of Yocto and has to do with Ubuntu.

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48614</commentid>
    <comment_count>10</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2015-02-06 17:24:51 +0000</bug_when>
    <thetext>Fixed in oe-core 928d41cb7343c23f586a2a1a5e6f81569d9c261b.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48774</commentid>
    <comment_count>11</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2015-02-12 17:41:44 +0000</bug_when>
    <thetext>Ross, 

One thing about this bug is that if a user clones the poky repo, they still need to take steps to get decent build times.  They need to re-bake the xmlto-native package and then they need to export the PATH variable.  How are we going to handle this for the user?  Do we need to have some sort of release note that instructs the user to take these steps?

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48775</commentid>
    <comment_count>12</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2015-02-12 17:46:56 +0000</bug_when>
    <thetext>If you&apos;re having slow builds outside of the Yocto environment (i.e. you haven&apos;t run oe-init-build-env) then the problem is with the host distribution, not anything in Poky.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48777</commentid>
    <comment_count>13</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-02-12 18:14:01 +0000</bug_when>
    <thetext>Yes, obviously, but I don&apos;t necessarily agree that that means we don&apos;t need to do anything further, because it will still be a problem for our users. Perhaps we can simply report the issue upstream to the major distributions that haven&apos;t already addressed it?</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>