On Tue, 2009-02-03 at 17:55 +0100, Christian Fischer wrote:
> Julian Foad schrieb:
> > On Tue, 2009-02-03 at 09:38 -0600, Hyrum K. Wright wrote:
> >
> >> Mark Phippard wrote:
> >>
> >>> Forwarding from users@
> >>>
> >>>
> >>> ---------- Forwarded message ----------
> >>> From: Christian Fischer <Christian.Fischer_at_hood-group.com>
> >>> Date: Tue, Feb 3, 2009 at 6:05 AM
> >>> Subject: Possible bug in build-system
> >>> To: users_at_subversion.tigris.org
> >>>
> >>>
> >>> Hello all!
> >>>
> >>> I tried to co and compile the current subversion rev35640.
> >>> While running autogen.sh I discovered an error regarding a missing file:
> >>>
> >>> WARNING: "rep-cache-db.sql.h" header not found, file
> >>> subversion/libsvn_fs_fs/rep-cache.c
> >>>
> >>> As autogen.sh also ./configure does not fail explicitly. But make does.
> >>> So I tried a earlier revision and isolated revision 35542 (42..hrhr) as
> >>> first version throwing the error.
> >>>
> >>> BUT: You will never discover the bug, if you are updating your wc from
> >>> an earlier version (and run autogen.sh before) - here is why:
> >>> In autogen.sh those headerfile will be updated if the rep-cache-db.sql
> >>> file has changed.
> >>> Revisions =<35541 are also generating these header file - or simply
> >>> running always the responsible python scripts. (see below)
> >>>
> >>> I added "if not existent" and now it works like a charm!
> >>>
> >>> Sincerely
> >>> Christian Fischer
> >>>
> >>>
> >>>
> >>> Index: autogen.sh
> >>> ===================================================================
> >>> --- autogen.sh (revision 35541)
> >>> +++ autogen.sh (revision 35542)
> >>> @@ -112,7 +112,11 @@
> >>> fi
> >>>
> >>> # Transform sql files into header files
> >>> -$PYTHON build/transform_sql.py subversion/libsvn_fs_fs/rep-cache-db.sql
> >>> +for file in subversion/libsvn_fs_fs/rep-cache-db.sql; do
> >>> + if test $file -nt $file.h; then
> >>> + $PYTHON build/transform_sql.py $file
> >>> + fi
> >>> +done
> >>>
> >>>
> >>>
> >>> Index: autogen.sh
> >>> ===================================================================
> >>> --- autogen.sh (revision 35640)
> >>> +++ autogen.sh (working copy)
> >>> @@ -113,7 +113,7 @@
> >>>
> >>> # Transform sql files into header files
> >>> for file in subversion/libsvn_fs_fs/rep-cache-db.sql; do
> >>> - if test $file -nt $file.h; then
> >>> + if (test $file -nt $file.h) || !(test -e $file.h); then
> >>> $PYTHON build/transform_sql.py $file
> >>> fi
> >>> done
> >>>
> >> What shell are you using? I did a fresh checkout from trunk, ran autogen.sh and
> >> configure, and didn't have any problem. rep-cache.sql.h was created as expected.
> >>
> >> That being said, it don't think that it hurts to have this patch included.
> >>
> >
> > A bit of research...
> >
> > The "-nt" test is not standard in the "test" utility, according to
> > <http://www.qnxclub.net/files/articles/unix03/utilities/test.html>
> > (search for "-nt" on that page). Sorry about that: I put that there.
> >
> > It is commonly available as part of the "[ ... ]" shell built-in alias
> > for "test"... but I'm not sure how standard that is.
> >
> > However, when the "-nt" test is available, its definition (quoting from
> > my "Bash" manual) is:
> >
> > file1 -nt file2
> > True if file1 is newer (according to modification date)
> > than file2, or if file1 exists and file2 does not.
> >
> > So, if the test is wrongly failing on the original poster's system, I'm
> > not sure that the "or not exists..." patch is the right solution, even
> > though it works in the case where the file is missing.
> >
> > - Julian
> >
> > ------------------------------------------------------
> > http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1097431
> >
>
> Me again :)
>
> Please keep in mind, there are partial differences in the *sh
> implementation.
> Your quote is from bash. My "man sh" says:
>
> file1 -nt file2
> True if file1 and file2 exist and file1 is newer
> than file2.
Ah... OK, so the "-nt" operation is non-standard and variable.
Well, isn't the proper solution to use "make" to do this job, instead of
a manual step in "autogen"? (This is about re-making a target file from
a source file if it's out of date or doesn't yet exist, which is exactly
the purpose of "make".) Is there any reason this step needs to be done
so early in the build process?
> autogen.sh says #!/bin/sh
>
>
> In your case probably /bin/sh is a symlink to /bin/bash - so it works.
Yes.
- Julian
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1098507
Received on 2009-02-03 21:52:32 CET