[tlbuild] OpenBSD build fails on todays SVN
Edd Barrett
vext01 at gmail.com
Tue Jun 30 16:32:58 CEST 2009
Hi,
On Tue, Jun 30, 2009 at 11:48:08AM +0200, Peter Breitenlohner wrote:
> After 'svn up', did you continue the previous build or start a new one from
> scractch.
Fresh. Make clean, then build.
>
> >.deps/hbf2gf.Tpo -c -o hbf2gf.o
> >../../.././../texk/cjkutils/hbf2gf/hbf2gf.c
> >In file included from
> >/usr/ports/obj/texlive_base-2009/source/Work/texk/kpathsea/kpathsea.h:35,
> > from hbf2gf.w:2490:
> >/usr/ports/obj/texlive_base-2009/source/texk/kpathsea/mingw32.h:9:21:
> >windows.h: No such file or directory
>
> The generated file kpathsea/kpathsea.h should not include mingw32.h, so
> something went wrong here (or OpenBSD has a badly broken grep). Are you
> sure kpathsea/Makefile.{am,in} are up to date? Please have a look at the
> code that generates kpathsea.h!
The offending code is here in kpathsea/Makefile.in:
---8<---
kpathsea.h: Makefile paths.h
rm -f $@
echo '/* This is a generated file */' >$@
echo '/* collecting all kpathsea headers. */' >>$@
echo '#include <kpathsea/config.h>' >>$@
echo '#include <kpathsea/c-auto.h>' >>$@
echo '#include <kpathsea/paths.h>' >>$@
(cd $(srcdir) && ls -1 *.h) \
| grep -v '\(config\|paths\|kpathsea\|mingw32\|win32lib\)\.h'
\
| sed -e 's,^,#include <kpathsea/,' -e s',$$,>,' >>$@
---8<---
I have never seen grep usage like this before, it seems to be specific
to ggrep, as it does not work on Solaris grep or OpenBSD grep. Here are
some simple tests showing the discrepancy between ggrep and other
versions of grep:
OPENBSD:
---8<---
puff% uname -a
OpenBSD puff.home 4.5 GENERIC.MP#8 i386
puff% pwd
/home/tl/source/texk/kpathsea
puff% ls -1 *.h | grep -v
'\(config\|paths\|kpathsea\|mingw32\|win32lib\)\.h' > /tmp/GREP
puff% ls -1 *.h | ggrep -v
'\(config\|paths\|kpathsea\|mingw32\|win32lib\)\.h' > /tmp/GGREP
puff% diff -u /tmp/GREP /tmp/GGREP
--- /tmp/GREP Tue Jun 30 13:01:48 2009
+++ /tmp/GGREP Tue Jun 30 13:01:57 2009
@@ -15,7 +15,6 @@
c-unistd.h
cnf.h
concatn.h
-config.h
db.h
debug.h
default.h
@@ -27,7 +26,6 @@
lib.h
line.h
magstep.h
-mingw32.h
pathsearch.h
proginit.h
progname.h
---8<---
SOLARIS-10:
---8<---
blade% uname -a
SunOS blade 5.10 Generic_141414-01 sun4u sparc SUNW,Sun-Blade-1000
blade% pwd
/export/home/edd/kpathsea
blade% ls -1 *.h | grep -v
'\(config\|paths\|kpathsea\|mingw32\|win32lib\)\.h' >/tmp/GREP
blade% ls -1 *.h | ggrep -v
'\(config\|paths\|kpathsea\|mingw32\|win32lib\)\.h' >/tmp/GGREP
blade% diff -u /tmp/GREP /tmp/GGREP
--- /tmp/GREP Sun Jul 12 13:14:58 2009
+++ /tmp/GGREP Sun Jul 12 13:15:05 2009
@@ -15,7 +15,6 @@
c-unistd.h
cnf.h
concatn.h
-config.h
db.h
debug.h
default.h
@@ -27,7 +26,6 @@
lib.h
line.h
magstep.h
-mingw32.h
pathsearch.h
proginit.h
progname.h
---8<---
I had a play with the various versions of grep trying to get something
portable and could only come up with chaining a load of greps together
(solaris grep has no -e or -E and so cannot take multiple expressions in
that way). As this was nasty I decided to use awk instead.
This seems to work and should be portable:
--- Makefile.in.prebsd Tue Jun 30 13:24:06 2009
+++ Makefile.in Tue Jun 30 13:45:11 2009
@@ -1678,8 +1678,8 @@
echo '#include <kpathsea/c-auto.h>' >>$@
echo '#include <kpathsea/paths.h>' >>$@
(cd $(srcdir) && ls -1 *.h) \
- | grep -v '\(config\|paths\|kpathsea\|mingw32\|win32lib\)\.h' \
- | sed -e 's,^,#include <kpathsea/,' -e s',$$,>,' >>$@
+ | awk '!/^(config|paths|kpathsea|mingw32|win32lib)\.h$$/ \
+ {print "#include <kpathsea/" $$1 ">"}' >> $@
What do you think?
--
Best Regards
Edd Barrett
(Freelance software developer / technical writer / open-source developer)
http://students.dec.bmth.ac.uk/ebarrett
More information about the tlbuild
mailing list