You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Philip Martin <ph...@codematters.co.uk> on 2005/05/06 16:20:22 UTC

gen-make dependency generation bug

If I modify the 'subversion/libsvn_fs_base/fs.h' header and run 'make'
nothing gets compiled, even though several source files include the
modified header.  Looking at build-outputs.mk I see things like:

$ grep base/uuid.c build-outputs.mk 
subversion/libsvn_fs_base/uuid.lo: subversion/libsvn_fs_base/uuid.c subversion/include/svn_delta.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_io.h subversion/include/svn_props.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_version.h subversion/libsvn_fs/fs-loader.h subversion/libsvn_fs_base/bdb/uuids-table.h subversion/libsvn_fs_base/trail.h subversion/libsvn_fs_base/uuid.h subversion/libsvn_fs_fs/err.h subversion/libsvn_fs_fs/fs.h

Note the dependency on the fs_fs version of fs.h instead of the
fs_base version, it appears that gen-make fails to implement the
#include rules correctly.

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: gen-make dependency generation bug

Posted by Branko Čibej <br...@xbc.nu>.
Max Bowsher wrote:

> Branko Čibej wrote:
>
>> Philip Martin wrote:
>>
>>> I've had a quick look at the gen_base.py code and it appears to rely
>>> on all the header files having different names and makes no attempt to
>>> implement C's #include rules.  A simple fix is to rename the header
>>> files to avoid the clashes.
>>>
>> Let me look at the dependency generation first. If I can't fix it by
>> tomorrow night, then let's rename the files. I'd rather fix the bug than
>> use a horrible workaround, since we're bound to be bitten by it again
>> sooner or later.
>
>
> I hope I haven't duplicated effort here, but I got curious and went to 
> look at what the problem was, and then I got intrigued, and couldn't 
> put the problem aside, and now I have a fix ready for commit.
>
> I'm just waiting for svn.collab.net to come back online, to do so.

Ah! You beat me to the line then. Probably a different fix than mine, 
but as long as it works, it's fine. :)

-- Brane


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: gen-make dependency generation bug

Posted by Max Bowsher <ma...@ukf.net>.
Branko Čibej wrote:
> Philip Martin wrote:
>
>> I've had a quick look at the gen_base.py code and it appears to rely
>> on all the header files having different names and makes no attempt to
>> implement C's #include rules.  A simple fix is to rename the header
>> files to avoid the clashes.
>>
> Let me look at the dependency generation first. If I can't fix it by
> tomorrow night, then let's rename the files. I'd rather fix the bug than
> use a horrible workaround, since we're bound to be bitten by it again
> sooner or later.

I hope I haven't duplicated effort here, but I got curious and went to look 
at what the problem was, and then I got intrigued, and couldn't put the 
problem aside, and now I have a fix ready for commit.

I'm just waiting for svn.collab.net to come back online, to do so.

Max.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: gen-make dependency generation bug

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
Branko Čibej wrote:

> Let me look at the dependency generation first. If I can't fix it by 
> tomorrow night, then let's rename the files. I'd rather fix the bug than 
> use a horrible workaround, since we're bound to be bitten by it again 
> sooner or later.

If it isn't simple to fix the dependency generation and you decide to go 
with renaming the files, I'd suggest also teaching the script to notice 
when there's more than one file with the same name, and turning it into 
a fatal error, so we can't be bitten by it again.  Better to fail loudly 
than to silently do the wrong thing.

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: gen-make dependency generation bug

Posted by Branko Čibej <br...@xbc.nu>.
Philip Martin wrote:

>Philip Martin <ph...@codematters.co.uk> writes:
>
>  
>
>>If I modify the 'subversion/libsvn_fs_base/fs.h' header and run 'make'
>>nothing gets compiled, even though several source files include the
>>modified header.  Looking at build-outputs.mk I see things like:
>>
>>$ grep base/uuid.c build-outputs.mk 
>>subversion/libsvn_fs_base/uuid.lo: subversion/libsvn_fs_base/uuid.c subversion/include/svn_delta.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_io.h subversion/include/svn_props.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_version.h subversion/libsvn_fs/fs-loader.h subversion/libsvn_fs_base/bdb/uuids-table.h subversion/libsvn_fs_base/trail.h subversion/libsvn_fs_base/uuid.h subversion/libsvn_fs_fs/err.h subversion/libsvn_fs_fs/fs.h
>>
>>Note the dependency on the fs_fs version of fs.h instead of the
>>fs_base version, it appears that gen-make fails to implement the
>>#include rules correctly.
>>    
>>
>
>I've had a quick look at the gen_base.py code and it appears to rely
>on all the header files having different names and makes no attempt to
>implement C's #include rules.  A simple fix is to rename the header
>files to avoid the clashes.
>
>libsvn_fs_base and libsvn_fs_fs are the directories that contain
>header files that clash, namely: dag.h, err.h, fs.h, id.h, key-gen.h,
>lock.h, revs-txns.h and tree.h.  We could do double renames
>
>   libsvn_fs_fs/dag.h   -> libsvn_fs_fs/dag-fs.h
>   libsvn_fs_base/dag.h -> libsvn_fs_base/dag-base.h
>
>although obviously once one of the files is renamed the problem is
>solved.  Thoughts?
>  
>
Let me look at the dependency generation first. If I can't fix it by 
tomorrow night, then let's rename the files. I'd rather fix the bug than 
use a horrible workaround, since we're bound to be bitten by it again 
sooner or later.

-- Brane


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: gen-make dependency generation bug

Posted by Philip Martin <ph...@codematters.co.uk>.
Philip Martin <ph...@codematters.co.uk> writes:

> If I modify the 'subversion/libsvn_fs_base/fs.h' header and run 'make'
> nothing gets compiled, even though several source files include the
> modified header.  Looking at build-outputs.mk I see things like:
>
> $ grep base/uuid.c build-outputs.mk 
> subversion/libsvn_fs_base/uuid.lo: subversion/libsvn_fs_base/uuid.c subversion/include/svn_delta.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_io.h subversion/include/svn_props.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_version.h subversion/libsvn_fs/fs-loader.h subversion/libsvn_fs_base/bdb/uuids-table.h subversion/libsvn_fs_base/trail.h subversion/libsvn_fs_base/uuid.h subversion/libsvn_fs_fs/err.h subversion/libsvn_fs_fs/fs.h
>
> Note the dependency on the fs_fs version of fs.h instead of the
> fs_base version, it appears that gen-make fails to implement the
> #include rules correctly.

I've had a quick look at the gen_base.py code and it appears to rely
on all the header files having different names and makes no attempt to
implement C's #include rules.  A simple fix is to rename the header
files to avoid the clashes.

libsvn_fs_base and libsvn_fs_fs are the directories that contain
header files that clash, namely: dag.h, err.h, fs.h, id.h, key-gen.h,
lock.h, revs-txns.h and tree.h.  We could do double renames

   libsvn_fs_fs/dag.h   -> libsvn_fs_fs/dag-fs.h
   libsvn_fs_base/dag.h -> libsvn_fs_base/dag-base.h

although obviously once one of the files is renamed the problem is
solved.  Thoughts?

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org