Bug 192958 - building devel/doxygen fails with HTMLDOCS enabled
Summary: building devel/doxygen fails with HTMLDOCS enabled
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Many People
Assignee: Alexey Dokuchaev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-24 02:27 UTC by TsurutaniNaoki
Modified: 2014-08-25 16:59 UTC (History)
2 users (show)

See Also:


Attachments
doxygen-1.8.7_1,1.patch (420 bytes, patch)
2014-08-24 05:48 UTC, Naram Qashat
no flags Details | Diff
Patch for Makefile.in that adds a missing dependency (575 bytes, patch)
2014-08-25 08:28 UTC, Alexey Dokuchaev
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description TsurutaniNaoki 2014-08-24 02:27:11 UTC
building devel/doxygen with HTMLDOCS and/or PDFDOCS fails.

How-To-Repeat:
% make
	===>  License GPLv2 accepted by the user
	===>  Found saved configuration for doxygen-1.8.7_1,1
	===>   doxygen-1.8.7_1,1 depends on file: /usr/local/sbin/pkg - found
	===> Fetching all distfiles required by doxygen-1.8.7_1,1 for building
	===>  Extracting for doxygen-1.8.7_1,1
	=> SHA256 Checksum OK for doxygen-1.8.7.src.tar.gz.
	===>  Patching for doxygen-1.8.7_1,1
	===>  Applying FreeBSD patches for doxygen-1.8.7_1,1
	===>   doxygen-1.8.7_1,1 depends on executable: tmake - found
	===>   doxygen-1.8.7_1,1 depends on file: /usr/local/bin/flex - found
	===>   doxygen-1.8.7_1,1 depends on executable: dot - found
	===>   doxygen-1.8.7_1,1 depends on file: /usr/local/share/texmf-dist/README - found
	===>   doxygen-1.8.7_1,1 depends on file: /usr/local/share/texmf-var/web2c/tex/tex.fmt - found
	===>   doxygen-1.8.7_1,1 depends on executable: aleph - found
	===>   doxygen-1.8.7_1,1 depends on executable: dvipdfmx - found
	===>   doxygen-1.8.7_1,1 depends on executable: dvips - found
	===>   doxygen-1.8.7_1,1 depends on executable: jadetex - found
	===>   doxygen-1.8.7_1,1 depends on executable: luatex - found
	===>   doxygen-1.8.7_1,1 depends on executable: ptex - found
	===>   doxygen-1.8.7_1,1 depends on package: texlive-infra>=0 - found
	===>   doxygen-1.8.7_1,1 depends on executable: tlmgr - found
	===>   doxygen-1.8.7_1,1 depends on executable: weave - found
	===>   doxygen-1.8.7_1,1 depends on executable: xdvi - found
	===>   doxygen-1.8.7_1,1 depends on executable: xetex - found
	===>   doxygen-1.8.7_1,1 depends on executable: xmltex - found
	===>   doxygen-1.8.7_1,1 depends on executable: bison - found
	===>   doxygen-1.8.7_1,1 depends on executable: gmake - found
	===>   doxygen-1.8.7_1,1 depends on file: /usr/local/bin/python2.7 - found
	===>   doxygen-1.8.7_1,1 depends on executable: python2 - found
	===>   doxygen-1.8.7_1,1 depends on file: /usr/local/bin/perl5.16.3 - found
	===>   doxygen-1.8.7_1,1 depends on executable: gs - found
	===>   doxygen-1.8.7_1,1 depends on shared library: libpng15.so - found (/usr/local/lib/libpng15.so.15) - found (/usr/local/lib/libpng15.so.15)
	===>   doxygen-1.8.7_1,1 depends on shared library: libkpathsea.so - found (/usr/local/lib/libkpathsea.so.6.2.0) - found (/usr/local/lib/libkpathsea.so.6.2.0)
	===>   doxygen-1.8.7_1,1 depends on shared library: libptexenc.so - found (/usr/local/lib/libptexenc.so.1.3.2) - found (/usr/local/lib/libptexenc.so.1.3.2)
	===>   doxygen-1.8.7_1,1 depends on shared library: libiconv.so.3 - found (/usr/local/lib/libiconv.so.3) - found (/usr/local/lib/libiconv.so.3)
	===>  Configuring for doxygen-1.8.7_1,1
	  Autodetected platform freebsd-g++...
	  Checking for GNU make tool... using gmake
	  Checking for GNU install tool... using install
	  Checking for dot (part of GraphViz)... using /usr/local/bin/dot
	  Checking for python... using /usr/local/bin/python2
	  Checking for perl... using /usr/local/bin/perl
	  Checking for flex... using /usr/local/bin/flex
	  Checking for bison... using /usr/local/bin/bison
	  Generating generated_src/doxygen/version.cpp and VERSION...
	  Created doxygen.spec file, for rpm generation.
	  Created Makefile from Makefile.in...
	  Created qtools/Makefile from qtools/Makefile.in...
	  Created src/Makefile from src/Makefile.in...
	  Created examples/Makefile from examples/Makefile.in...
	  Created doc/Makefile from doc/Makefile.in...
	  Created addon/doxywizard/Makefile from addon/doxywizard/Makefile.in...
	  Created addon/doxmlparser/src/Makefile from addon/doxmlparser/src/Makefile.in...
	  Created addon/doxmlparser/test/Makefile from addon/doxmlparser/test/Makefile.in...
	  Created addon/doxmlparser/examples/metrics/Makefile from addon/doxmlparser/examples/metrics/Makefile.in...
	  Created addon/doxyapp/Makefile from addon/doxyapp/Makefile.in...
	  Created addon/doxysearch/Makefile from addon/doxysearch/Makefile.in...
	  Created qtools/qtools.pro from qtools/qtools.pro.in...
	  Created src/libdoxygen.pro from src/libdoxygen.pro.in...
	  Created src/libdoxycfg.pro from src/libdoxycfg.pro.in...
	  Created src/doxygen.pro from src/doxygen.pro.in...
	  Created addon/doxywizard/doxywizard.pro from addon/doxywizard/doxywizard.pro.in...
	  Created addon/doxmlparser/src/doxmlparser.pro from addon/doxmlparser/src/doxmlparser.pro.in...
	  Created addon/doxmlparser/test/xmlparse.pro from addon/doxmlparser/test/xmlparse.pro.in...
	  Created addon/doxmlparser/examples/metrics/metrics.pro from addon/doxmlparser/examples/metrics/metrics.pro.in...
	  Created addon/doxyapp/doxyapp.pro from addon/doxyapp/doxyapp.pro.in...
	  Created addon/doxysearch/doxysearch.pro from addon/doxysearch/doxysearch.pro.in...
	  Created addon/doxysearch/doxyindexer.pro from addon/doxysearch/doxyindexer.pro.in...
	  Generating generated_src/doxygen/lang_cfg.h...
	  Generating generated_src/doxygen/settings.h...
	  Finished
	===>  Building for doxygen-1.8.7_1,1
	gmake -C examples
	gmake[1]: Entering directory `/usr/ports/devel/doxygen/work/doxygen-1.8.7/examples'
	"/usr/ports/devel/doxygen/work/doxygen-1.8.7/bin/doxygen" class.cfg
	"/usr/ports/devel/doxygen/work/doxygen-1.8.7/bin/doxygen" define.cfg
	/usr/ports/devel/doxygen/work/doxygen-1.8.7/bin/doxygen: not found
	gmake[1]: *** [class/html/index.html] Error 127
	gmake[1]: *** Waiting for unfinished jobs..../usr/ports/devel/doxygen/work/doxygen-1.8.7/bin/doxygen: not found

	gmake[1]: *** [define/html/index.html] Error 127
	gmake[1]: Leaving directory `/usr/ports/devel/doxygen/work/doxygen-1.8.7/examples'
	gmake: *** [docs] Error 2
	===> Compilation failed unexpectedly.
	Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
	the maintainer.
	*** Error code 1
	 
	Stop in /usr/ports/devel/doxygen.
	*** Error code 1
	 
	Stop in /usr/ports/devel/doxygen.

Fix:
here is a patch.


--- Makefile.orig	2014-08-23 02:10:20.000000000 +0900
+++ Makefile	2014-08-24 11:17:53.000000000 +0900
@@ -26,6 +26,7 @@
 CONFIGURE_ARGS=	--prefix ${PREFIX} --perl ${PERL} --make ${MAKE_CMD} \
 		--install "${INSTALL}" --flex ${LOCALBASE}/bin/flex
 REINPLACE_ARGS=	-i ''
+MAKE_JOBS_UNSAFE=	yes
 
 EXTRACT_AFTER_ARGS=	--exclude '*/libmd5' \
 			--exclude '*/libpng' \
@@ -51,7 +52,7 @@
 QT4_CONFIGURE_ON=	--with-doxywizard
 QT4_PLIST_FILES=	bin/doxywizard
 
-HTMLDOCS_ALL_TARGET=	docs
+HTMLDOCS_ALL_TARGET=	all docs
 HTMLDOCS_BUILD_DEPENDS=	dot:${PORTSDIR}/graphics/graphviz
 
 PDFDOCS_ALL_TARGET=	pdf
Comment 1 Naram Qashat 2014-08-24 05:48:04 UTC
Created attachment 146201 [details]
doxygen-1.8.7_1,1.patch

Actually, I'd prefer the attached patch. I don't know why the last committer removed the ALL_TARGET definition from my previous patch, but it is required to be there in order for the HTMLDOCS_ALL_TARGET to not completely clobber it. I don't want to have to re-add MAKE_JOBS_UNSAFE because of this, I've had it being added/removed way too many times as is, and the port does build fine with parallel building, as long as this is set correctly.
Comment 2 John Marino freebsd_committer freebsd_triage 2014-08-24 08:29:32 UTC
I get this:
> -HTMLDOCS_ALL_TARGET=	docs
> +HTMLDOCS_ALL_TARGET=	all docs


I don't get this:
> +MAKE_JOBS_UNSAFE=	yes


Can you explain why you marked this jobs unsafe?  The previous commit specifically intended to fix that.
Comment 3 TsurutaniNaoki 2014-08-24 08:35:53 UTC
I failed to build it with my patch without MAKE_JOBS_UNSAFE=yes.
Comment 4 John Marino freebsd_committer freebsd_triage 2014-08-24 08:37:41 UTC
Let's let danfe have the first crack that this then.
Comment 5 Naram Qashat 2014-08-24 17:12:33 UTC
The patch I attached to this bug is intended to really fix it without adding MAKE_JOBS_UNSAFE to the port again. The problem is because ALL_TARGET was removed from the Makefile. It needs to be there because of HTMLDOCS_ALL_TARGET.
Comment 6 TsurutaniNaoki 2014-08-25 04:58:14 UTC
I still have a problem with Naram's patch if MAKE_JOBS_UNSAFE=yes is not set.
Comment 7 Alexey Dokuchaev freebsd_committer freebsd_triage 2014-08-25 06:46:01 UTC
(In reply to John Marino from comment #2)
> I get this:
> > -HTMLDOCS_ALL_TARGET=	docs
> > +HTMLDOCS_ALL_TARGET=	all docs
> 
> I don't get this:
> > +MAKE_JOBS_UNSAFE=	yes
> 
> Can you explain why you marked this jobs unsafe?  The previous commit
> specifically intended to fix that.

Right, unsafeness is caused by two-fold ALL_TARGET (and those two subtargets are not independent, e.g. docs obviously requires bin/doxygen being already done, but since they start in parallel, yet it takes more time to build doxygen binary, the whole thing not work).

As this happens in HTMLDOCS case (which I didn't test thoroughly), it was not detected earlier.  Let me see if I can fix it correctly.
Comment 8 Alexey Dokuchaev freebsd_committer freebsd_triage 2014-08-25 08:28:03 UTC
Created attachment 146245 [details]
Patch for Makefile.in that adds a missing dependency

Would you guys test newly added patch for Makefile.in?  It ensures that "docs" (and thus "pdf") targets depend on the "all" target, thus forcing correct build order in -jX case without putting multiple targets in HTMLDOCS_ALL_TARGET and PDFDOCS_ALL_TARGET.
Comment 9 TsurutaniNaoki 2014-08-25 09:38:42 UTC
looks fine to me.
Comment 10 commit-hook freebsd_committer freebsd_triage 2014-08-25 16:57:32 UTC
A commit references this bug:

Author: danfe
Date: Mon Aug 25 16:57:28 UTC 2014
New revision: 366097
URL: http://svnweb.freebsd.org/changeset/ports/366097

Log:
  Unbreak the build with HTMLDOCS or PDFDOCS options enabled.

  PR:		192958
  Submitted by:	Tsurutani Naoki
  Approved by:	maintainer

Changes:
  head/devel/doxygen/files/patch-Makefile.in
Comment 11 Alexey Dokuchaev freebsd_committer freebsd_triage 2014-08-25 16:59:42 UTC
Committed as r366097 after receiving maintainer's approval.

http://svnweb.freebsd.org/ports?view=revision&revision=366097