Bug 186410 - textproc/xmlto fails to build on 10.0amd64
Summary: textproc/xmlto fails to build on 10.0amd64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Bryan Drewery
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-03 14:20 UTC by rainer
Modified: 2014-05-03 16:20 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rainer 2014-02-03 14:20:01 UTC
I'm trying to build xmlto with poudriere on a FreeBSD10-amd64 hosts

This is what's in the build-log




===>   Returning to build of xmlto-0.0.25_2
===>   xmlto-0.0.25_2 depends on file: /usr/local/share/xml/docbook/4.2/docbookx.dtd - found
===>   xmlto-0.0.25_2 depends on file: /usr/local/bin/ccache - not found
===>    Verifying install for /usr/local/bin/ccache in /usr/ports/devel/ccache
===>   Installing existing package /packages/All/ccache-3.1.9_4.txz
Installing ccache-3.1.9_4...Create compiler links...
create symlink for cc
create symlink for cc (world)
create symlink for c++
create symlink for c++ (world)
 done
NOTE:
Please read /usr/local/share/doc/ccache/ccache-howto-freebsd.txt for 
information on using ccache with FreeBSD ports and src.
===>   Returning to build of xmlto-0.0.25_2
===========================================================================
=======================<phase: lib-depends    >============================
===========================================================================
=======================<phase: configure      >============================
===>  Configuring for xmlto-0.0.25_2
===>   FreeBSD 10 autotools fix applied to /wrkdirs/usr/ports/textproc/xmlto/work/xmlto-0.0.25/aclocal.m4
===>   FreeBSD 10 autotools fix applied to /wrkdirs/usr/ports/textproc/xmlto/work/xmlto-0.0.25/configure
configure: loading site script /usr/ports/Templates/config.site
checking for a BSD-compatible install... /usr/bin/install -c -o root -g wheel
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... (cached) /bin/mkdir -p
checking for gawk... (cached) /usr/bin/awk
checking whether make sets $(MAKE)... yes
checking for gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of cc... gcc3
checking whether cc understands -c and -o together... yes
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... -lfl
checking whether yytext is a pointer... yes
checking for mktemp... mktemp
checking for find... find 
checking for bash... /usr/local/bin/bash
checking for getopt... /usr/local/bin/getopt
checking for long options support in /usr/local/bin/getopt... yes
checking for paperconf... /usr/local/bin/paperconf
checking for locale... /usr/bin/locale
checking for xmllint... /usr/local/bin/xmllint
checking for xsltproc... /usr/local/bin/xsltproc
checking for dblatex... dblatex
checking for fop... fop
checking for xmltex... xmltex
checking for pdfxmltex... /usr/local/bin/pdftex
checking for default backend... DEFAULT
checking for lynx... lynx
checking for links... links
checking for w3m... /usr/local/bin/w3m
checking for tail... /usr/bin/tail
checking for grep... (cached) /usr/bin/grep
checking for cp... /bin/cp
checking for zip... zip
checking for default web browser... w3m
configure: creating ./config.status
config.status: creating Makefile
config.status: creating xmlto
config.status: creating xmlto.spec
config.status: creating config.h
config.status: executing depfiles commands
===========================================================================
=======================<phase: build          >============================
===>  Building for xmlto-0.0.25_2
/usr/bin/make  all-am
depbase=`echo xmlif/xmlif.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; cc -DHAVE_CONFIG_H -I.      -O2 -pipe -fno-strict-aliasing -MT xmlif/xmlif.o -MD -MP -MF $depbase.Tpo -c -o xmlif/xmlif.o xmlif/xmlif.c && mv -f $depbase.Tpo $depbase.Po
ccache: failed to create /dev/null/.ccache (Not a directory)
*** Error code 1

Stop.
make[2]: stopped in /wrkdirs/usr/ports/textproc/xmlto/work/xmlto-0.0.25
*** Error code 1

Stop.
make[1]: stopped in /wrkdirs/usr/ports/textproc/xmlto/work/xmlto-0.0.25
*** Error code 1

Stop.
make: stopped in /usr/ports/textproc/xmlto
===>  Cleaning for xmlto-0.0.25_2
build of /usr/ports/textproc/xmlto ended at Mon Feb  3 14:41:11 CET 2014
build time: 00:00:10

Fix: 

Don't know.
Sorry.
How-To-Repeat: Don't know.
Sorry.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-02-03 14:20:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->mandree

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Matthias Andree freebsd_committer freebsd_triage 2014-02-03 19:10:57 UTC
Looks like a malformed poudriere/ccache configuration,
/dev/null/.ccache cannot possibly work.  Not xmlto's fault.

If poudriere sets that /dev/null path for ccache, please file a copy of
this bug report, with the same log, against poudriere.  Please also add
details on your configurations of poudriere and ccache, and a copy of
your /etc/make.conf.

Poudriere builds of xmlto succeeded for me without ccache when I checked
xmlto in last time, closing this problem report.
Comment 3 Matthias Andree freebsd_committer freebsd_triage 2014-02-03 19:11:16 UTC
State Changed
From-To: open->closed

invalid
Comment 4 miguelmclara 2014-04-23 17:51:32 UTC
I just bumped into this while doing portmaster -a dbus update fails in
xmlto due to this.

I noticed this in the Makefile:

MAKE_ENV+=      HOME=/dev/null

By default CCACHE will use $HOME/.ccache, so this is why I get the failure.

So it does look like the "bug" is caused by this port + using ccache.



Removing the MAKE_ENV line or setting it to something else works around the
issue, another way would be to point CCACHE_DIR to other than the default
($HOME/.ccache).


I'm not sure however "who's" worng here, because more ports set "$HOME" to
/dev/null, and this will clearly break ccache build if using defaults, so
either ports that do this need to change the behavior or maybe ccache needs
a different default?

Granted that the user can change the default but it should work with
defaults!

Cheers,

Miguel
Comment 5 Bryan Drewery freebsd_committer freebsd_triage 2014-04-29 21:30:52 UTC
Responsible Changed
From-To: mandree->bdrewery

I'll handle this.
Comment 6 Bryan Drewery freebsd_committer freebsd_triage 2014-04-29 22:26:15 UTC
Here is a Mk patch to fix the issue:

http://people.freebsd.org/~bdrewery/patches/ccache-mangled-home.diff

Still testing it.

-- 
Regards,
Bryan Drewery
Comment 7 dfilter service freebsd_committer freebsd_triage 2014-05-03 16:11:05 UTC
Author: bdrewery
Date: Sat May  3 15:11:01 2014
New Revision: 352918
URL: http://svnweb.freebsd.org/changeset/ports/352918
QAT: https://qat.redports.org/buildarchive/r352918/

Log:
  - Fix WITH_CCACHE_BUILD support (fix build) with ports that use
    HOME=/dev/null to avoid staging violations. This will force
    CCACHE_DIR=/root/.ccache when running as root, and otherwise
    will force CCACHE_DIR to be manually set.
  
  With hat:	portmgr
  PR:		ports/186410 [textproc/xmlto build]
  Reported by:	mandree, Rainer Duffner <rainer@ultra-secure.de>
  MFH:		2014Q2

Modified:
  head/Mk/bsd.port.mk

Modified: head/Mk/bsd.port.mk
==============================================================================
--- head/Mk/bsd.port.mk	Sat May  3 14:55:30 2014	(r352917)
+++ head/Mk/bsd.port.mk	Sat May  3 15:11:01 2014	(r352918)
@@ -2125,6 +2125,19 @@ BUILD_FAIL_MESSAGE+=	Try to set MAKE_JOB
 .endif
 
 # ccache support
+
+# Try to set a default CCACHE_DIR to workaround HOME=/dev/null and
+# HOME=${WRKDIR}/* staging fixes
+.if defined(WITH_CCACHE_BUILD) && !defined(CCACHE_DIR) && \
+    (!defined(HOME) || ${HOME} == /dev/null || ${HOME:S/^${WRKDIR}//} != ${HOME})
+.  if defined(USER) && ${USER} == root
+CCACHE_DIR=	/root/.ccache
+.  else
+NO_CCACHE=	yes
+WARNING+=	WITH_CCACHE_BUILD support disabled, please set CCACHE_DIR.
+.  endif
+.endif
+
 # Support NO_CCACHE for common setups, require WITH_CCACHE_BUILD, and
 # don't use if ccache already set in CC
 .if !defined(NO_CCACHE) && defined(WITH_CCACHE_BUILD) && !${CC:M*ccache*} && \
@@ -2138,12 +2151,15 @@ _CCACHE_PATH=	${LOCALBASE}/libexec/ccach
 
 # Prepend the ccache dir into the PATH and setup ccache env
 PATH:=	${_CCACHE_PATH}:${PATH}
+#.MAKEFLAGS:		PATH=${PATH}
 .if !${MAKE_ENV:MPATH=*} && !${CONFIGURE_ENV:MPATH=*}
 MAKE_ENV+=			PATH=${PATH}
 CONFIGURE_ENV+=		PATH=${PATH}
 .endif
 
+# Ensure this is always in subchild environments
 .	if defined(CCACHE_DIR)
+#.MAKEFLAGS:		CCACHE_DIR=${CCACHE_DIR}
 MAKE_ENV+=		CCACHE_DIR="${CCACHE_DIR}"
 CONFIGURE_ENV+=	CCACHE_DIR="${CCACHE_DIR}"
 .	endif
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 8 Bryan Drewery freebsd_committer freebsd_triage 2014-05-03 16:11:11 UTC
Fix committed to bsd.port.mk.

-- 
Regards,
Bryan Drewery