After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 376908 - The build is broken
The build is broken
Status: RESOLVED FIXED
Product: gnome-doc-utils
Classification: Deprecated
Component: build utils
CVS HEAD
Other Linux
: Normal normal
: ---
Assigned To: gnome-doc-utils maintainers
gnome-doc-utils maintainers
: 386599 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-11-19 08:26 UTC by Mariano Suárez-Alvarez
Modified: 2007-01-16 05:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A slightly less hacky dix (1.06 KB, patch)
2006-11-19 22:29 UTC, Mariano Suárez-Alvarez
none Details | Review
Updated patch (2.58 KB, patch)
2006-12-02 08:54 UTC, Mariano Suárez-Alvarez
none Details | Review

Description Mariano Suárez-Alvarez 2006-11-19 08:26:04 UTC
Jhbuilding right now ends with:

make[2]: Entering directory `/elsewhere/GNOME/src/gnome-doc-utils/doc/gnome-doc-make'
 cd ../.. && /bin/sh /elsewhere/GNOME/src/gnome-doc-utils/missing --run automake-1.9 --gnu  doc/gnome-doc-make/Makefile
 cd ../.. && /bin/sh ./config.status doc/gnome-doc-make/Makefile 
config.status: creating doc/gnome-doc-make/Makefile
make[2]: Leaving directory `/elsewhere/GNOME/src/gnome-doc-utils/doc/gnome-doc-make'
make[2]: Entering directory `/elsewhere/GNOME/src/gnome-doc-utils/doc/gnome-doc-make'
gawk -f ./gnome-doc-make.awk ../../gnome-doc-utils.make > C/make-ref.xml
xsltproc -o gnome-doc-make-C.omf --stringparam db2omf.basename gnome-doc-make --stringparam db2omf.format 'docbook' --stringparam db2omf.dtd "-//OASIS//DTD DocBook XML V4.4//EN" --stringparam db2omf.lang C --stringparam db2omf.omf_dir "/elsewhere/GNOME/opt/share/omf" --stringparam db2omf.help_dir "/elsewhere/GNOME/opt/share/gnome/help" --stringparam db2omf.omf_in "`pwd`/./gnome-doc-make.omf.in" ../../xslt/docbook/omf/db2omf.xsl C/gnome-doc-make.xml
make[2]: Leaving directory `/elsewhere/GNOME/src/gnome-doc-utils/doc/gnome-doc-make'
make[1]: Leaving directory `/elsewhere/GNOME/src/gnome-doc-utils/doc'
db2omf: Invalid subject code "System|Other" in /elsewhere/GNOME/src/gnome-doc-utils/doc/gnome-doc-make/./gnome-doc-make.omf.in.
make[2]: *** [gnome-doc-make-C.omf] Error 10
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

I can trace the problem to the fact that right after running autogen.sh, 

  diff gnome-doc-utils.make tools/gnome-doc-utils.make

shows the files are different. I have no idea why, in view of the cp commands inautogen.sh...
Comment 1 Don Scorgie 2006-11-19 14:26:48 UTC
Running into this problem when using jhbuild too.

manually copying tools/gnome-doc-utils.make to the top-level source directory allows it to work properly.
Comment 2 Mariano Suárez-Alvarez 2006-11-19 22:06:10 UTC
The reason for this is the following.

gnome-common's gnome-autogen.sh looks in every file listed in

configure_files="`find $srcdir -name '{arch}' -prune -o -name '_darcs' -prune -o -name '.??*' -prune -o -name configure.ac -print -o -name configure.in -print`"

for the pattern ^GNOME_DOC_INIT, and if it finds it, it assumes g-d-u is wanted by the package being autogen.sh'ed and runs g-d-prepare. 

In the case of g-d-u itself, both $(srcdir)/sandbox/mallard/configure.in and $(srcdir)/test/testdoc1/configure.in include that pattern, so g-d-prepare is run *after* the vain attempt of g-d-u's autogen-sh of copying $(srcdir)/tools/*.{make,m4} to $(srcdir).

A hack would be to move the two cp commands in the autogen.sh script to *after* the gnome-autogen.sh script is run. An ugly hack.
Comment 3 Mariano Suárez-Alvarez 2006-11-19 22:29:59 UTC
Created attachment 76872 [details] [review]
A slightly less hacky dix

This patch depends on the patch I just posted on bug 377175.

It uses a proposed CONFIGURE_FILES environment variable to be explicit about which configure.in files autogen.sh should scan.
Comment 4 Shaun McCance 2006-11-20 01:07:04 UTC
Damn.  So here's how this happened: gnome-doc-utils used to use its own custom gnome-autogen.sh with the g-d-u bits cut out.  But then I was missing changes to gnome-autogen.sh.  So instead, I changed gnome-doc-utils.m4 to define GNOME_DOC_INIT and GNOME_DOC_DEFINES.  GNOME_DOC_DEFINES does all the defines, but without the version check.  And since it doesn't match gnome-autogen.sh's grep, I could put it in configure.in.

Mariano, the approach using CONFIGURE_FILES seems relatively sane to me.  The approach from comment #2 would still create a problem when building gnome-doc-utils for the first time, because gnome-autogen.sh would try to call gnome-doc-prepare, which won't exist on the system yet.

If bug #377175 gets resolved, you have permission to commit this.  If we could also somehow specify a version of gnome-common required, that would be great.
Comment 5 Mariano Suárez-Alvarez 2006-12-02 08:54:19 UTC
Created attachment 77529 [details] [review]
Updated patch

This patch is an update to my renaming of the envvar in the gnome-common patch.

Also, from talking to jamesh on irc, it appears the following is expected to work:

cvs co gnome-doc-utils
cd gnome-doc-utils
mkdir build
cd build
../autogen.sh

Currently this does not work for g-d-u: this updated patch fixes one issue: the Makefile.am's in g-d-u should not include $(srcdir)/gnome-doc-utils.make because that will not exist in a build as the one above, so the patch adds a couple of /tools/ to get the existing file.

This is not enough: but I cannot see how to fix this srcdir!=builddir build, as there is some indirection which is getting broken and which I do not understand: the build goes ok until one hits the following (tt is my build directory):
 
Making all in doc
make[1]: Entering directory `/elsewhere/GNOME/src/gnome-doc-utils/tt/doc'
Making all in gnome-doc-make
make[2]: Entering directory `/elsewhere/GNOME/src/gnome-doc-utils/tt/doc/gnome-doc-make'
xsltproc -o gnome-doc-make-C.omf --stringparam db2omf.basename gnome-doc-make --stringparam db2omf.format 'docbook' --stringparam db2omf.dtd "-//OASIS//DTD DocBook XML V4.4//EN" --stringparam db2omf.lang C --stringparam db2omf.omf_dir "/usr/local/share/omf" --stringparam db2omf.help_dir "/usr/local/share/gnome/help" --stringparam db2omf.omf_in "`pwd`/../../../doc/gnome-doc-make/gnome-doc-make.omf.in" --stringparam db2omf.scrollkeeper_cl "`scrollkeeper-config --pkgdatadir`/Templates/C/scrollkeeper_cl.xml" ../../../xslt/docbook/omf/db2omf.xsl ../../../doc/gnome-doc-make/C/gnome-doc-make.xml || { rm -f "gnome-doc-make-C.omf"; exit 1; }
make[2]: Leaving directory `/elsewhere/GNOME/src/gnome-doc-utils/tt/doc/gnome-doc-make'
Making all in xslt
make[2]: Entering directory `/elsewhere/GNOME/src/gnome-doc-utils/tt/doc/xslt'
gawk -W compat -f "../../../doc/xslt/xsldoc.awk" "../../../xslt/docbook/common/db-chunk.xsl" | xsltproc -o "C/db-chunk.xml" --stringparam basename "db-chunk" --stringparam xsl_file "../../../xslt/docbook/common/db-chunk.xsl" "../../../doc/xslt/xsldoc.xsl" -
warning: failed to load external entity "../../../../xslt/docbook/common/db-chunk.xsl"
db-chunk: No stylesheet param for documented db.chunk.chunks
make[2]: *** [C/db-chunk.xml] Error 10
make[2]: Leaving directory `/elsewhere/GNOME/src/gnome-doc-utils/tt/doc/xslt'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/elsewhere/GNOME/src/gnome-doc-utils/tt/doc'
make: *** [all-recursive] Error 1
Comment 6 Shaun McCance 2006-12-03 17:57:59 UTC
Hum, if we're just going to include the gnome-doc-utils.make in tools, we probably don't need to copy it to the top-level build directory.

As for the error, I think we just need to add some $(srcdir) action to the files being passed on line 18 of doc/xslt/Makefile.am.  I'm surprised I didn't catch this problem when running distcheck.
Comment 7 Guillaume Desmottes 2006-12-15 20:25:52 UTC
I can confirm than this bug is still present in HEAD.
Comment 8 James Andrewartha 2006-12-21 09:28:22 UTC
And I'm still getting build failures:

http://jhbuild.bxlug.be/builds/2006-12-20-0008/logs/gnome-doc-utils/#configure
Comment 9 James Andrewartha 2006-12-21 09:52:44 UTC
Looking into it further, CONFIGURE_AC_FILES=$srcdir/configure.in doesn't work because gnome-autogen.sh ignores that variable and uses the following to determine configure_files:

configure_files="`find $srcdir -name '{arch}' -prune -o -name '_darcs' -prune -o -name '.??*' -prune -o -name configure.ac -print -o -name configure.in -print`"

which then finds GNOME_DOC_INIT in gnome-doc-utils/test/testdoc1/configure.in and ./sandbox/mallard/configure.in.
Comment 10 Mariano Suárez-Alvarez 2006-12-21 19:35:56 UTC
James, that is preciselñy why I said that «This patch depends on the patch I just posted on bug 377175»

Please do not add comments to open bugs that have been confirmed only to say «I am still seeing this», as, unless the bug is marked FIXED, that is to be expected. If the bug gets marked FIXED but you still see it, _then_ let the world know. We already get much bugmail as it is! ;-)
Comment 11 Shaun McCance 2007-01-12 19:19:33 UTC
This has been resolved in #377175 by making gnome-autogen.sh skip configure.(ac|in) files in directories with a NO-AUTO-GEN file.
Comment 12 Shaun McCance 2007-01-15 23:29:13 UTC
*** Bug 386599 has been marked as a duplicate of this bug. ***
Comment 13 Mariano Suárez-Alvarez 2007-01-16 04:15:38 UTC
It should be noted that this only works if your definition of ‘works’ allows for the autogen.sh script in, say,  gnome-doc-utils/sandbox/mallard to fail because there is no configure script...

Comment 14 Shaun McCance 2007-01-16 05:43:25 UTC
I'm not so concerned abuot that directory being unbuildable right now, as it's not part of the actual package, and I'm going to change its contents fairly drastically soon anyway.