You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Mark Phippard <ma...@gmail.com> on 2009/02/03 15:25:38 UTC

Fwd: Possible bug in build-system

Forwarding from users@


---------- Forwarded message ----------
From: Christian Fischer <Ch...@hood-group.com>
Date: Tue, Feb 3, 2009 at 6:05 AM
Subject: Possible bug in build-system
To: users@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

--
Christian Fischer
mobile: 0049 176 6100 3450
Christian.Fischer@HOOD-Group.com
http://www.HOOD-Group.com <http://www.hood-group.com/>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1096316

To unsubscribe from this discussion, e-mail:
[users-unsubscribe@subversion.tigris.org].



-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1097127

RE: Fwd: Possible bug in build-system

Posted by Bert Huijben <rh...@sharpsvn.net>.
> -----Original Message-----
> From: Julian Foad [mailto:julianfoad@btopenworld.com]
> Sent: dinsdag 3 februari 2009 17:00
> To: Hyrum K. Wright
> Cc: Mark Phippard; dev@subversion.tigris.org; Christian Fischer
> Subject: Re: Fwd: Possible bug in build-system


> > >
> > > 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.

lgo reported this issue yesterday (or the day before) on irc using the
'dash' shell.

	Bert

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1097445

Re: Fwd: Possible bug in build-system

Posted by Stefan Sperling <st...@elego.de>.
On Wed, Feb 04, 2009 at 05:44:55PM +0000, Stefan Sperling wrote:
> On Wed, Feb 04, 2009 at 05:31:44PM +0000, Stefan Sperling wrote:
> > On Wed, Feb 04, 2009 at 12:16:14AM +0000, Stefan Sperling wrote:
> > > On Wed, Feb 04, 2009 at 12:02:54AM +0000, Stefan Sperling wrote:
> > > > Would attached script do?
> > > 
> > > Here's the same thing as a patch for you to try, compiles fine here.
> > 
> > Updated patch, contains improvements suggested by Martin Furter
> > and Arfrever:
> 
> That patch was broken, sorry.
> 
> Here's one that does not break the build:

New one with fixes for Solaris 9 (thanks to Martin Furter for testing).
Patch is attached this time, requested by Arfrever.

Stefan

Re: Fwd: Possible bug in build-system

Posted by Stefan Sperling <st...@elego.de>.
On Wed, Feb 04, 2009 at 05:31:44PM +0000, Stefan Sperling wrote:
> On Wed, Feb 04, 2009 at 12:16:14AM +0000, Stefan Sperling wrote:
> > On Wed, Feb 04, 2009 at 12:02:54AM +0000, Stefan Sperling wrote:
> > > Would attached script do?
> > 
> > Here's the same thing as a patch for you to try, compiles fine here.
> 
> Updated patch, contains improvements suggested by Martin Furter
> and Arfrever:

That patch was broken, sorry.

Here's one that does not break the build:


Index: build/transform_sql.sh
===================================================================
--- build/transform_sql.sh	(revision 0)
+++ build/transform_sql.sh	(revision 0)
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+echo "/* This file is automatically generated from"
+echo " * $1"
+echo " * Do not edit it directly, but edit the source file "
+echo " * and rerun autogen.sh"
+echo " */"
+echo
+echo "#define REP_CACHE_DB_SQL \\"
+
+comment=false
+
+while read line; do
+  if [ "x$comment" = "xfalse" ] && echo "$line" | grep -F -q '/*'; then
+    comment=true
+  fi
+
+  if [ "x$comment" = "xtrue" ] && echo "$line" | grep -F -q '*/'; then
+    comment=false
+    continue
+  fi
+
+  if [ "x$comment" = "xtrue" ]; then
+    continue
+  fi
+
+  line="`echo -e "$line" | sed -e 's/"/\\"/g'`"
+  if [ -n "$line" ]; then
+    echo "    \"$line\" \\"
+  fi
+done
+
+echo '    ""'

Property changes on: build/transform_sql.sh
___________________________________________________________________
Added: svn:executable
   + *

Index: autogen.sh
===================================================================
--- autogen.sh	(revision 35671)
+++ autogen.sh	(working copy)
@@ -114,7 +114,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
-    $PYTHON build/transform_sql.py $file
+    ./build/transform_sql.sh $file < $file > $file.h
   fi
 done
 

Re: Fwd: Possible bug in build-system

Posted by Stefan Sperling <st...@elego.de>.
On Wed, Feb 04, 2009 at 12:16:14AM +0000, Stefan Sperling wrote:
> On Wed, Feb 04, 2009 at 12:02:54AM +0000, Stefan Sperling wrote:
> > Would attached script do?
> 
> Here's the same thing as a patch for you to try, compiles fine here.

Updated patch, contains improvements suggested by Martin Furter
and Arfrever:

Index: build/transform_sql.sh
===================================================================
--- build/transform_sql.sh	(revision 0)
+++ build/transform_sql.sh	(revision 0)
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+echo "/* This file is automatically generated from"
+echo " * $1"
+echo " * Do not edit it directly, but edit the source file "
+echo " * and rerun autogen.sh"
+echo " */"
+echo
+echo "#define REP_CACHE_DB_SQL \\"
+
+comment=false
+
+while read line; do
+  if [ "x$comment" = "xfalse" ] && echo "$line" | grep -F -q '/*'; then
+    comment=true
+  fi
+
+  if [ "x$comment" = "xtrue" ] && echo "$line" | grep -F -q '*/'; then
+    comment=false
+    continue
+  fi
+
+  if [ "x$comment" = "xtrue" ]; then
+    continue
+  fi
+
+  line="`echo -e "$line" | sed -e 's/"/\\"/g'`"
+  if [ -n "$line" ]; then
+    echo "    \"$line\"\"\\"
+  fi
+done
+
+echo '    ""'

Property changes on: build/transform_sql.sh
___________________________________________________________________
Added: svn:executable
   + *

Index: autogen.sh
===================================================================
--- autogen.sh	(revision 35671)
+++ autogen.sh	(working copy)
@@ -114,7 +114,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
-    $PYTHON build/transform_sql.py $file
+    ./build/transform_sql.sh $file < $file > $file.h
   fi
 done
 

Re: Fwd: Possible bug in build-system

Posted by Stefan Sperling <st...@elego.de>.
On Wed, Feb 04, 2009 at 12:02:54AM +0000, Stefan Sperling wrote:
> Would attached script do?

Here's the same thing as a patch for you to try, compiles fine here.

Stefan

Index: build/transform_sql.sh
===================================================================
--- build/transform_sql.sh	(revision 0)
+++ build/transform_sql.sh	(revision 0)
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+echo "/* This file is automatically generated from"
+echo " * $1"
+echo " * Do not edit it directly, but edit the source file "
+echo " * and rerun autogen.sh"
+echo " */"
+echo
+echo "#define REP_CACHE_DB_SQL \\"
+
+comment=false
+
+while read line; do
+  if [ "x$comment" = "xfalse" ] && echo "$line" | grep -q '/\*'; then
+    comment=true
+  fi
+
+  if [ "x$comment" = "xtrue" ] && echo "$line" | grep -q '\*/'; then
+    comment=false
+    continue
+  fi
+
+  if [ "x$comment" = "xtrue" ]; then
+    continue
+  fi
+
+  line="`echo -e "$line" | tr -d '\n' | sed -e 's/"/\\"/g'`"
+  if [ -n "$line" ]; then
+    echo -n '    "'
+    echo -n "$line"
+    echo '"\\'
+  fi
+done
+
+echo '    ""'

Property changes on: build/transform_sql.sh
___________________________________________________________________
Added: svn:executable
   + *

Index: autogen.sh
===================================================================
--- autogen.sh	(revision 35662)
+++ autogen.sh	(working copy)
@@ -114,7 +114,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
-    $PYTHON build/transform_sql.py $file
+    ./build/transform_sql.sh $file < $file > $file.h
   fi
 done
 

Re: Fwd: Possible bug in build-system

Posted by Stefan Sperling <st...@elego.de>.
On Tue, Feb 03, 2009 at 05:06:28PM -0600, Hyrum K. Wright wrote:
> Stefan Sperling wrote:
> > On Tue, Feb 03, 2009 at 03:06:15PM -0600, Hyrum K. Wright wrote:
> >> Julian Foad wrote:
> >>> 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?
> >> Not a deal breaker, but gen-make.py will complain if the referenced header file 
> >> doesn't exist.  That's why I put this step in autogen.sh before gen-make.py is run.
> > 
> > So gen-make.py complains about something that is not a problem?
> > If so, making some fix to gen-make.py was not an option?
> > 
> > I'd also think having make sort this stuff out, if at all possible,
> > is a better solution. It's more portable.
> 
> One other caveat: the creation of the .h is currently done with a python script, 
> but we don't require people who build Subversion to have python installed, 
> though most probably do.  I did it with python because it was easiest for me, if 
> somebody with more sed/awk skillz wants to improve it, go ahead.

Would attached script do?

This is the output of transform_sql.py:

/* This file is automatically generated from rep-cache-db.sql.
 * Do not edit it directly, but edit the source file and rerun autogen.sh */

#define REP_CACHE_DB_SQL \
  "pragma auto_vacuum = 1;"\
  "create table rep_cache (hash text not null primary key,"\
  "                        revision integer not null,"\
  "                        offset integer not null,"\
  "                        size integer not null,"\
  "                        expanded_size integer not null);"\
  ""

This is the output from my script:

$ sh ./transform_sql.sh subversion/libsvn_fs_fs/rep-cache-db.sql < subversion/libsvn_fs_fs/rep-cache-db.sql
/* This file is automatically generated from
 * subversion/libsvn_fs_fs/rep-cache-db.sql
 * Do not edit it directly, but edit the source file
 * and rerun autogen.sh
 */

#define REP_CACHE_DB_SQL \
    "pragma auto_vacuum = 1;"\
    "create table rep_cache (hash text not null primary key,"\
    "revision integer not null,"\
    "offset integer not null,"\
    "size integer not null,"\
    "expanded_size integer not null);"\
    ""

No idea why the tabs are being zapped, but doesn't make a
difference, does it?

Stefan

Re: Fwd: Possible bug in build-system

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
Stefan Sperling wrote:
> On Tue, Feb 03, 2009 at 03:06:15PM -0600, Hyrum K. Wright wrote:
>> Julian Foad wrote:
>>> 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?
>> Not a deal breaker, but gen-make.py will complain if the referenced header file 
>> doesn't exist.  That's why I put this step in autogen.sh before gen-make.py is run.
> 
> So gen-make.py complains about something that is not a problem?
> If so, making some fix to gen-make.py was not an option?
> 
> I'd also think having make sort this stuff out, if at all possible,
> is a better solution. It's more portable.

One other caveat: the creation of the .h is currently done with a python script, 
but we don't require people who build Subversion to have python installed, 
though most probably do.  I did it with python because it was easiest for me, if 
somebody with more sed/awk skillz wants to improve it, go ahead.

-Hyrum

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1099164

Re: Fwd: Possible bug in build-system

Posted by David James <ja...@gmail.com>.
On Tue, Feb 3, 2009 at 3:02 PM, Stefan Sperling <st...@elego.de> wrote:

> On Tue, Feb 03, 2009 at 03:06:15PM -0600, Hyrum K. Wright wrote:
> > Julian Foad wrote:
> > > 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?
> >
> > Not a deal breaker, but gen-make.py will complain if the referenced
> header file
> > doesn't exist.  That's why I put this step in autogen.sh before
> gen-make.py is run.
>
> So gen-make.py complains about something that is not a problem?
> If so, making some fix to gen-make.py was not an option?
>
> I'd also think having make sort this stuff out, if at all possible,
> is a better solution. It's more portable.


gen_make.py only complains about a header file being missing if gen_make.py
doesn't know that the file is built by 'make'. Adding the header file to
'private-built-includes' in 'build.conf' should resolve the issue and allow
you to generate the header file normally using make.

Cheers,

David

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1099543

Re: Fwd: Possible bug in build-system

Posted by Stefan Sperling <st...@elego.de>.
On Tue, Feb 03, 2009 at 03:06:15PM -0600, Hyrum K. Wright wrote:
> Julian Foad wrote:
> > 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?
> 
> Not a deal breaker, but gen-make.py will complain if the referenced header file 
> doesn't exist.  That's why I put this step in autogen.sh before gen-make.py is run.

So gen-make.py complains about something that is not a problem?
If so, making some fix to gen-make.py was not an option?

I'd also think having make sort this stuff out, if at all possible,
is a better solution. It's more portable.

Stefan

Re: Fwd: Possible bug in build-system

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
Julian Foad wrote:
> 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 <Ch...@hood-group.com>
>>>>> Date: Tue, Feb 3, 2009 at 6:05 AM
>>>>> Subject: Possible bug in build-system
>>>>> To: users@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?

Not a deal breaker, but gen-make.py will complain if the referenced header file 
doesn't exist.  That's why I put this step in autogen.sh before gen-make.py is run.

-Hyrum

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1098599

Re: Fwd: Possible bug in build-system

Posted by Julian Foad <ju...@btopenworld.com>.
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 <Ch...@hood-group.com>
> >>> Date: Tue, Feb 3, 2009 at 6:05 AM
> >>> Subject: Possible bug in build-system
> >>> To: users@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

Re: Fwd: Possible bug in build-system

Posted by Christian Fischer <Ch...@HOOD-Group.com>.
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 <Ch...@hood-group.com>
>>> Date: Tue, Feb 3, 2009 at 6:05 AM
>>> Subject: Possible bug in build-system
>>> To: users@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.

autogen.sh says #!/bin/sh


In your case probably /bin/sh is a symlink to /bin/bash - so it works.

Sincerely

-- 
Christian Fischer
mobile: 0049 176 6100 3450
Christian.Fischer@HOOD-Group.com
http://www.HOOD-Group.com <http://www.hood-group.com/>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1097611

Re: Fwd: Possible bug in build-system

Posted by Julian Foad <ju...@btopenworld.com>.
On Tue, 2009-02-03 at 09:38 -0600, Hyrum K. Wright wrote:
> Mark Phippard wrote:
> > Forwarding from users@
> > 
> > 
> > ---------- Forwarded message ----------
> > From: Christian Fischer <Ch...@hood-group.com>
> > Date: Tue, Feb 3, 2009 at 6:05 AM
> > Subject: Possible bug in build-system
> > To: users@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

Re: Fwd: Possible bug in build-system

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
Mark Phippard wrote:
> Forwarding from users@
> 
> 
> ---------- Forwarded message ----------
> From: Christian Fischer <Ch...@hood-group.com>
> Date: Tue, Feb 3, 2009 at 6:05 AM
> Subject: Possible bug in build-system
> To: users@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.

-Hyrum

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1097179