Cross-build breakage with libstdc++-v3 doc changes

2012-01-17 Thread Hans-Peter Nilsson
> From: Benjamin Kosnik 
> Date: Wed, 18 Jan 2012 00:41:59 +0100

> This updates the support for generating epub docs to EPUB3. Using the
> EPUB3 stylesheets allows the removal of ruby and other tool checks from
> configure, and generates a much better documentation file.

...or for cross-targets, breakage.  Something went wrong with
this or subsequent changes; somewhere in the r183262:183268 I've
started getting:

...
Configuring in cris-elf/libstdc++-v3
configure: creating cache ./config.cache
checking build system type... x86_64-unknown-linux-gnu
checking host system type... cris-axis-elf
checking target system type... cris-axis-elf
...
checking for GNU c++filt... /usr/bin/c++filt

(right there's a buglet, but let's not get
distracted and it's a preexisting condition anyway )

checking whether the target supports .symver directive... yes
configure: versioning on shared library symbols is no
checking for size_t as unsigned int... no
checking for ptrdiff_t as int... no
checking whether the target supports hidden visibility... yes
configure: visibility supported: yes
checking for makeinfo... makeinfo --split-size=500
checking for modern makeinfo... yes
checking for doxygen... yes
checking for dot... no
checking for xsltproc... yes
checking for xmllint... yes
checking for stylesheets used in generation of documentation... no
checking for local stylesheet directory... no
checking for dblatex... no
checking for pdflatex... yes
checking for 
/usr/share/xml/docbook/stylesheet/docbook-xsl-ns/epub3/chunk.xsl... configure: 
error: cannot check for file existence when cross compiling
make[1]: *** [configure-target-libstdc++-v3] Error 1
make[1]: Leaving directory `/tmp/hpautotest-gcc1/cris-elf/gccobj'
make: *** [all] Error 2

For r183262 I got, around the above point of breakage:
...
configure: visibility supported: yes
checking for makeinfo... makeinfo --split-size=500
checking for modern makeinfo... yes
checking for doxygen... yes
checking for dot... no
checking for xsltproc... yes
checking for xmllint... yes
checking for stylesheets used in generation of documentation... no
checking for local stylesheet directory... no
checking for dblatex... no
checking for pdflatex... yes
checking for ruby... yes
checking for dbtoepub... no
configure: updating cache ./config.cache
checking for gxx-include-dir... no
checking for --enable-version-specific-runtime-libs... no
checking for install location... 
${prefix}/${target_alias}/include/c++/${gcc_version}
configure: creating ./config.status
config.status: creating Makefile
...

Pretty please cross-test for your favorite cross-target.  The
build system was running Fedora 12, FWIW.

brgds, H-P


Re: Cross-build breakage with libstdc++-v3 doc changes

2012-01-18 Thread Ulrich Weigand
Hans-Peter Nilsson wrote:

> > From: Benjamin Kosnik 
> > Date: Wed, 18 Jan 2012 00:41:59 +0100
> 
> > This updates the support for generating epub docs to EPUB3. Using the
> > EPUB3 stylesheets allows the removal of ruby and other tool checks from
> > configure, and generates a much better documentation file.
> 
> ...or for cross-targets, breakage.  Something went wrong with
> this or subsequent changes; somewhere in the r183262:183268 I've
> started getting:
[snip]
> checking for 
> /usr/share/xml/docbook/stylesheet/docbook-xsl-ns/epub3/chunk.xsl... 
> configure: error: cannot check for file existence when cross compiling
> make[1]: *** [configure-target-libstdc++-v3] Error 1
> make[1]: Leaving directory `/tmp/hpautotest-gcc1/cris-elf/gccobj'
> make: *** [all] Error 2

Yes, I'm seeing the same problem when building a spu-elf
cross-compiler ...

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  ulrich.weig...@de.ibm.com



Re: Cross-build breakage with libstdc++-v3 doc changes

2012-01-18 Thread Benjamin Kosnik


> > ...or for cross-targets, breakage.  Something went wrong with
> > this or subsequent changes; somewhere in the r183262:183268 I've
> > started getting:
> [snip]
> > checking
> > for /usr/share/xml/docbook/stylesheet/docbook-xsl-ns/epub3/chunk.xsl...
> > configure: error: cannot check for file existence when cross
> > compiling make[1]: *** [configure-target-libstdc++-v3] Error 1
> > make[1]: Leaving directory `/tmp/hpautotest-gcc1/cris-elf/gccobj'
> > make: *** [all] Error 2
> 
> Yes, I'm seeing the same problem when building a spu-elf
> cross-compiler ...

Testing this patch, will check it in if passes, sorry.

-benjamin
2012-01-18  Benjamin Kosnik  

	* configure.ac: Move epub checks...
	* acinclude (GLIBCXX_CONFIGURE_DOCBOOK): ...here, use
	test -f instead of AC_CHECK_FILES.

diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 9d08178..fd3ba96 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -631,7 +631,7 @@ AC_DEFUN([GLIBCXX_CONFIGURE_TESTSUITE], [
 
 
 dnl
-dnl Does any necessary configuration of the documentation directory.
+dnl Does any necessary configuration for docbook in the docs directory.
 dnl
 dnl XSLTPROC must be set before this
 dnl
@@ -642,7 +642,7 @@ dnl  XSL_STYLE_DIR
 dnl
 AC_DEFUN([GLIBCXX_CONFIGURE_DOCBOOK], [
 
-AC_MSG_CHECKING([for stylesheets used in generation of documentation])
+AC_MSG_CHECKING([for docbook stylesheets for documentation creation])
 glibcxx_stylesheets=no
 if test x${XSLTPROC} = xyes && echo '' | xsltproc --noout --nonet --xinclude http://docbook.sourceforge.net/release/xsl-ns/current/xhtml-1_1/docbook.xsl - 2>/dev/null; then
   glibcxx_stylesheets=yes
@@ -669,6 +669,18 @@ if test x"$glibcxx_local_stylesheets" = x"yes"; then
 else
   glibcxx_stylesheets=no
 fi
+
+# Check for epub3 dependencies.
+AC_MSG_CHECKING([for epub3 stylesheets for documentation creation])
+glibcxx_epub_stylesheets=no
+if test x"$glibcxx_local_stylesheets" = x"yes"; then
+   if test -f ${XSL_STYLE_DIR}/epub3/chunk.xsl; then
+  glibcxx_epub_stylesheets=yes
+   fi
+fi
+AC_MSG_RESULT($glibcxx_epub_stylesheets)
+AM_CONDITIONAL(BUILD_EPUB, test $glibcxx_epub_stylesheets= "yes")
+
 ])
 
 
diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
index 1c62aea..2429f04 100644
--- a/libstdc++-v3/configure.ac
+++ b/libstdc++-v3/configure.ac
@@ -380,15 +380,6 @@ AM_CONDITIONAL(BUILD_PDF,
 	   test $ac_cv_prog_DBLATEX = "yes" &&
 	   test $ac_cv_prog_PDFLATEX = "yes")
 
-# Check for epub dependencies.
-AC_CHECK_FILE(/usr/share/xml/docbook/stylesheet/docbook-xsl-ns/epub3/chunk.xsl,
-	  ac_cv_file_epub3_a=yes, ac_cv_file_epub3_a=no)
-AC_CHECK_FILE(/usr/share/sgml/docbook/xsl-ns-stylesheets/epub3/chunk.xsl,
-	  ac_cv_file_epub3_b=yes, ac_cv_file_epub3_b=no)
-AM_CONDITIONAL(BUILD_EPUB,
-	   test $ac_cv_file_epub3_a = "yes" ||
-	   test $ac_cv_file_epub3_b = "yes")
-
 
 # Propagate the target-specific source directories through the build chain.
 ATOMICITY_SRCDIR=config/${atomicity_dir}