Hi Sylvestre,

Thank you for the ping!  Reply follows below.

On Mon, Feb 26, 2018 at 11:02:25PM +0100, Sylvestre Ledru wrote:
> 
> Le 26/02/2018 à 22:51, Nicholas D Steeves a écrit :
> > Hi Sylvestre,
> >
> > On Sun, Feb 11, 2018 at 09:32:17AM +0100, Sylvestre Ledru wrote:
> >> Le 11/02/2018 à 03:17, Nicholas D Steeves a écrit :
> >>> On Sat, Feb 10, 2018 at 09:42:29AM +0100, Sylvestre Ledru wrote:
> >>>> This is caused by a recent change in gold I think.
> >>>>
> >>>> Just add a ; XFAIL: * at in the test to silent it.
> >>>>
> >>>> BTW, in the future, please don't attach the full build log:
> >>>> We just need the error message.
> >>>>
> >>>>
> >>>> S
> >>>>
> >>>>
> >>> Thank you for the tip!  With the two attached patches I'm able to
> >>> continue working towards solving this bug. (really just implementing
> >>> your suggestion, plus a patch refresh)
> >>>
> >>> Oh, and I xzipped them to try to atone for sending uncompressed build
> >>> logs ;-) I'll send only what I suspect are the relevant portions
> >>> (errors) in the future.
> >> Thanks but they were already merged upstream...
> >>
> >> Sylvestre
> > I've been able to solve this by patching various Doxyfile, conf.py,
> > and doxygen.cfg.in.  Before I did that I also:
> >
> > -html_static_path = []
> > +html_static_path = ['_static']
> >
> > for the affected sections.
> >
> > Do you approve of this approach and should I work on patching rules to
> > not fail with this new configuration or would you prefer another
> > approach?
> 
> Sounds good. What are you concerns about this solution?

I'm concerned that it's difficult to debug, and also that the
build-doc target doesn't work...that's one reason why progress has
been so slow!  I've tried a number of methods and I can't get the
llvm-toolchain-5.0 to build at all right now; it hangs indefinitely in
self-tests and dmesg shoes a bunch of segfaults...so I've decided to
just attach my patches for the docs.  IIRC d/rules still needs some
more work to accommodate
d/patches/0048-Set-html_static_path-_static-everywhere.patch

IIRC this patch is part of the commit represented by:
0002-Add-patches-to-use-static-docs-using-Debian-provided.patch


Sincerely,
Nicholas
From e1cb74ef6331b8633589751bea5a9a53eb0d1707 Mon Sep 17 00:00:00 2001
From: Nicholas D Steeves <nstee...@gmail.com>
Date: Sat, 10 Feb 2018 20:26:49 -0500
Subject: [PATCH 1/3] Add libjs-mathjax to Build-Depends and to clang-x.y-doc
 Depends.

Signed-off-by: Nicholas D Steeves <nstee...@gmail.com>
---
 debian/control | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 31dea016..b83de924 100644
--- a/debian/control
+++ b/debian/control
@@ -10,6 +10,7 @@ Build-Depends: debhelper (>= 11~), flex, bison, dejagnu, tcl, expect,
     libjsoncpp-dev, pkg-config,
     lcov, procps, help2man, zlib1g-dev,
     g++-multilib [amd64 i386 kfreebsd-amd64 mips mips64 mips64el mipsel powerpc ppc64 s390 s390x sparc sparc64 x32],
+    libjs-mathjax
 #    ocaml-nox [amd64 arm64 armel armhf i386],
 #    ocaml-findlib [amd64 arm64 armel armhf i386],
 #    libctypes-ocaml-dev [amd64 arm64 armel armhf i386],
@@ -84,7 +85,7 @@ Description: clang-based C++ linter tool
 Package: clang-5.0-doc
 Architecture: all
 Section: doc
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}, libjs-mathjax
 Description: C, C++ and Objective-C compiler - Documentation
  Clang project is a C, C++, Objective C and Objective C++ front-end
  based on the LLVM compiler. Its goal is to offer a replacement to the
-- 
2.14.2

From 26cc1ca675872273c4732f35854c58ccfc3e000a Mon Sep 17 00:00:00 2001
From: Nicholas D Steeves <nstee...@gmail.com>
Date: Sat, 10 Feb 2018 21:07:21 -0500
Subject: [PATCH 2/3] Add patches to use static docs using Debian-provided
 MathJax

Signed-off-by: Nicholas D Steeves <nstee...@gmail.com>
---
 ...8-Set-html_static_path-_static-everywhere.patch |  63 +++++++++++
 ...49-Use-Debian-provided-MathJax-everywhere.patch | 122 +++++++++++++++++++++
 debian/patches/series                              |   3 +
 3 files changed, 188 insertions(+)
 create mode 100644 debian/patches/0048-Set-html_static_path-_static-everywhere.patch
 create mode 100644 debian/patches/0049-Use-Debian-provided-MathJax-everywhere.patch

diff --git a/debian/patches/0048-Set-html_static_path-_static-everywhere.patch b/debian/patches/0048-Set-html_static_path-_static-everywhere.patch
new file mode 100644
index 00000000..10663a82
--- /dev/null
+++ b/debian/patches/0048-Set-html_static_path-_static-everywhere.patch
@@ -0,0 +1,63 @@
+From: Nicholas D Steeves <nstee...@gmail.com>
+Date: Sat, 10 Feb 2018 21:00:55 -0500
+Subject: Set html_static_path = ['_static'] everywhere.
+
+---
+ clang-tools-extra/docs/conf.py | 2 +-
+ clang/docs/analyzer/conf.py    | 2 +-
+ clang/docs/conf.py             | 2 +-
+ polly/docs/conf.py             | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/clang-tools-extra/docs/conf.py b/clang-tools-extra/docs/conf.py
+index e872c55..69f425a 100644
+--- a/clang-tools-extra/docs/conf.py
++++ b/clang-tools-extra/docs/conf.py
+@@ -121,7 +121,7 @@ html_theme = 'haiku'
+ # Add any paths that contain custom static files (such as style sheets) here,
+ # relative to this directory. They are copied after the builtin static files,
+ # so a file named "default.css" will overwrite the builtin "default.css".
+-html_static_path = []
++html_static_path = ['_static']
+ 
+ # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+ # using the given strftime format.
+diff --git a/clang/docs/analyzer/conf.py b/clang/docs/analyzer/conf.py
+index c40af7a..666308d 100644
+--- a/clang/docs/analyzer/conf.py
++++ b/clang/docs/analyzer/conf.py
+@@ -121,7 +121,7 @@ html_theme = 'haiku'
+ # Add any paths that contain custom static files (such as style sheets) here,
+ # relative to this directory. They are copied after the builtin static files,
+ # so a file named "default.css" will overwrite the builtin "default.css".
+-html_static_path = []
++html_static_path = ['_static']
+ 
+ # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+ # using the given strftime format.
+diff --git a/clang/docs/conf.py b/clang/docs/conf.py
+index a9861cd..d125dc6 100644
+--- a/clang/docs/conf.py
++++ b/clang/docs/conf.py
+@@ -121,7 +121,7 @@ html_theme = 'haiku'
+ # Add any paths that contain custom static files (such as style sheets) here,
+ # relative to this directory. They are copied after the builtin static files,
+ # so a file named "default.css" will overwrite the builtin "default.css".
+-html_static_path = []
++html_static_path = ['_static']
+ 
+ # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+ # using the given strftime format.
+diff --git a/polly/docs/conf.py b/polly/docs/conf.py
+index 64d3968..aa854ad 100644
+--- a/polly/docs/conf.py
++++ b/polly/docs/conf.py
+@@ -127,7 +127,7 @@ except ImportError:
+ # Add any paths that contain custom static files (such as style sheets) here,
+ # relative to this directory. They are copied after the builtin static files,
+ # so a file named "default.css" will overwrite the builtin "default.css".
+-html_static_path = []
++html_static_path = ['_static']
+ 
+ # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+ # using the given strftime format.
diff --git a/debian/patches/0049-Use-Debian-provided-MathJax-everywhere.patch b/debian/patches/0049-Use-Debian-provided-MathJax-everywhere.patch
new file mode 100644
index 00000000..dce925ee
--- /dev/null
+++ b/debian/patches/0049-Use-Debian-provided-MathJax-everywhere.patch
@@ -0,0 +1,122 @@
+From: Nicholas D Steeves <nstee...@gmail.com>
+Date: Sat, 10 Feb 2018 21:02:17 -0500
+Subject: Use Debian-provided MathJax everywhere.
+
+---
+ clang-tools-extra/docs/Doxyfile       | 2 +-
+ clang-tools-extra/docs/conf.py        | 3 +++
+ clang-tools-extra/docs/doxygen.cfg.in | 2 +-
+ clang/docs/analyzer/conf.py           | 3 +++
+ clang/docs/conf.py                    | 3 +++
+ clang/docs/doxygen.cfg.in             | 2 +-
+ docs/doxygen.cfg.in                   | 2 +-
+ polly/docs/doxygen.cfg.in             | 2 +-
+ 8 files changed, 14 insertions(+), 5 deletions(-)
+
+diff --git a/clang-tools-extra/docs/Doxyfile b/clang-tools-extra/docs/Doxyfile
+index d674390..1bf4f72 100644
+--- a/clang-tools-extra/docs/Doxyfile
++++ b/clang-tools-extra/docs/Doxyfile
+@@ -1206,7 +1206,7 @@ USE_MATHJAX            = NO
+ # MathJax, but it is strongly recommended to install a local copy of MathJax
+ # before deployment.
+ 
+-MATHJAX_RELPATH        = http://www.mathjax.org/mathjax
++MATHJAX_RELPATH        = /usr/share/javascript/mathjax
+ 
+ # The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
+ # names that should be enabled during MathJax rendering.
+diff --git a/clang-tools-extra/docs/conf.py b/clang-tools-extra/docs/conf.py
+index 69f425a..46f8eea 100644
+--- a/clang-tools-extra/docs/conf.py
++++ b/clang-tools-extra/docs/conf.py
+@@ -123,6 +123,9 @@ html_theme = 'haiku'
+ # so a file named "default.css" will overwrite the builtin "default.css".
+ html_static_path = ['_static']
+ 
++# Use Debian-provided MathJax
++mathjax_path = '/usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML'
++
+ # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+ # using the given strftime format.
+ #html_last_updated_fmt = '%b %d, %Y'
+diff --git a/clang-tools-extra/docs/doxygen.cfg.in b/clang-tools-extra/docs/doxygen.cfg.in
+index 6dbf6db..da44cfc 100644
+--- a/clang-tools-extra/docs/doxygen.cfg.in
++++ b/clang-tools-extra/docs/doxygen.cfg.in
+@@ -1438,7 +1438,7 @@ MATHJAX_FORMAT         = HTML-CSS
+ # The default value is: http://cdn.mathjax.org/mathjax/latest.
+ # This tag requires that the tag USE_MATHJAX is set to YES.
+ 
+-MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
++MATHJAX_RELPATH        = /usr/share/javascript/mathjax
+ 
+ # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+ # extension names that should be enabled during MathJax rendering. For example
+diff --git a/clang/docs/analyzer/conf.py b/clang/docs/analyzer/conf.py
+index 666308d..2881bcc 100644
+--- a/clang/docs/analyzer/conf.py
++++ b/clang/docs/analyzer/conf.py
+@@ -123,6 +123,9 @@ html_theme = 'haiku'
+ # so a file named "default.css" will overwrite the builtin "default.css".
+ html_static_path = ['_static']
+ 
++# Use Debian-provided MathJax
++mathjax_path = '/usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML'
++
+ # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+ # using the given strftime format.
+ #html_last_updated_fmt = '%b %d, %Y'
+diff --git a/clang/docs/conf.py b/clang/docs/conf.py
+index d125dc6..2ce1a91 100644
+--- a/clang/docs/conf.py
++++ b/clang/docs/conf.py
+@@ -123,6 +123,9 @@ html_theme = 'haiku'
+ # so a file named "default.css" will overwrite the builtin "default.css".
+ html_static_path = ['_static']
+ 
++# Use Debian-provided MathJax
++mathjax_path = '/usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML'
++
+ # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+ # using the given strftime format.
+ #html_last_updated_fmt = '%b %d, %Y'
+diff --git a/clang/docs/doxygen.cfg.in b/clang/docs/doxygen.cfg.in
+index 13ed722..77bed6e 100644
+--- a/clang/docs/doxygen.cfg.in
++++ b/clang/docs/doxygen.cfg.in
+@@ -1432,7 +1432,7 @@ MATHJAX_FORMAT         = HTML-CSS
+ # The default value is: http://cdn.mathjax.org/mathjax/latest.
+ # This tag requires that the tag USE_MATHJAX is set to YES.
+ 
+-MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
++MATHJAX_RELPATH        = /usr/share/javascript/mathjax
+ 
+ # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+ # extension names that should be enabled during MathJax rendering. For example
+diff --git a/docs/doxygen.cfg.in b/docs/doxygen.cfg.in
+index e3c7f47..dcdade1 100644
+--- a/docs/doxygen.cfg.in
++++ b/docs/doxygen.cfg.in
+@@ -1433,7 +1433,7 @@ MATHJAX_FORMAT         = HTML-CSS
+ # The default value is: http://cdn.mathjax.org/mathjax/latest.
+ # This tag requires that the tag USE_MATHJAX is set to YES.
+ 
+-MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
++MATHJAX_RELPATH        = /usr/share/javascript/mathjax
+ 
+ # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+ # extension names that should be enabled during MathJax rendering. For example
+diff --git a/polly/docs/doxygen.cfg.in b/polly/docs/doxygen.cfg.in
+index 36786aa..26a8984 100644
+--- a/polly/docs/doxygen.cfg.in
++++ b/polly/docs/doxygen.cfg.in
+@@ -1433,7 +1433,7 @@ MATHJAX_FORMAT         = HTML-CSS
+ # The default value is: http://cdn.mathjax.org/mathjax/latest.
+ # This tag requires that the tag USE_MATHJAX is set to YES.
+ 
+-MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
++MATHJAX_RELPATH        = /usr/share/javascript/mathjax
+ 
+ # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+ # extension names that should be enabled during MathJax rendering. For example
diff --git a/debian/patches/series b/debian/patches/series
index df49ba03..badf1eb7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -49,3 +49,6 @@ update-cuda-search-path.patch
 
 test-keep-alive.diff
 libfuzzer-path.diff
+
+0048-Set-html_static_path-_static-everywhere.patch
+0049-Use-Debian-provided-MathJax-everywhere.patch
-- 
2.14.2

From f44b11b362dde6ec0262251bdff57622aa9bf680 Mon Sep 17 00:00:00 2001
From: Nicholas D Steeves <nstee...@gmail.com>
Date: Sat, 10 Feb 2018 22:40:49 -0500
Subject: [PATCH 3/3] Fix build_doc failure due to nonexistent directory.

Signed-off-by: Nicholas D Steeves <nstee...@gmail.com>
---
 debian/rules | 1 +
 1 file changed, 1 insertion(+)

diff --git a/debian/rules b/debian/rules
index 74a56572..6bccce47 100755
--- a/debian/rules
+++ b/debian/rules
@@ -338,6 +338,7 @@ build_doc:
 		cd $$d && rm -f underscore.js && ln -s /usr/share/javascript/underscore/underscore.js && cd -; \
 	done
 
+	mkdir -p debian/man/
 	help2man --version-string=$(LLVM_VERSION) clang/tools/scan-view/bin/scan-view > debian/man/scan-view-$(LLVM_VERSION).1
 	help2man --version-string=$(LLVM_VERSION) clang/tools/clang-format/clang-format-diff.py > debian/man/clang-format-diff-$(LLVM_VERSION).1
 
-- 
2.14.2

Attachment: signature.asc
Description: PGP signature

Reply via email to