You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by cm...@collab.net on 2001/01/27 06:36:45 UTC

[patch] added db win32 portability includes to build projects

* libsvn_fs.dsp, fs_test.dsp, skel_test.dsp: Added win32-specific Berkeley
                                             DB header path to includes


Index: subversion/libsvn_fs/libsvn_fs.dsp
===================================================================
RCS file: /cvs/subversion/subversion/libsvn_fs/libsvn_fs.dsp,v
retrieving revision 1.6
diff -u -r1.6 libsvn_fs.dsp
--- subversion/libsvn_fs/libsvn_fs.dsp  2000/12/21 23:09:32     1.6
+++ subversion/libsvn_fs/libsvn_fs.dsp  2001/01/27 05:57:05
@@ -41,7 +41,7 @@
 # PROP Intermediate_Dir "Release\obj"
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\include" /I "..\..\apr\include" /I "..\..\expat-lite" /I "$(SVN_DB3_WIN32)\include" /I "..\.." /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "_WINDOWS" /D alloca=_alloca /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\include" /I "..\..\apr\include" /I "..\..\expat-lite" /I "..\.." /I "$(SVN_DB3_WIN32)\include" /I "$(SVN_DB3_WIN32)\build_win32" /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "_WINDOWS" /D alloca=_alloca /FD /c
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x424 /d "NDEBUG"
 # ADD RSC /l 0x424 /d "NDEBUG"
@@ -65,7 +65,7 @@
 # PROP Intermediate_Dir "Debug\obj"
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\include" /I "..\..\apr\include" /I "..\..\expat-lite" /I "$(SVN_DB3_WIN32)\include" /I "..\.." /D "SVN_DEBUG" /D "_DEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "_WINDOWS" /D alloca=_alloca /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\include" /I "..\..\apr\include" /I "..\..\expat-lite" /I "..\.." /I "$(SVN_DB3_WIN32)\include" /I "$(SVN_DB3_WIN32)\build_win32" /D "SVN_DEBUG" /D "_DEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "_WINDOWS" /D alloca=_alloca /FD /GZ /c
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x424 /d "_DEBUG"
 # ADD RSC /l 0x424 /d "_DEBUG"
Index: subversion/libsvn_fs/tests/fs_test.dsp
===================================================================
RCS file: /cvs/subversion/subversion/libsvn_fs/tests/fs_test.dsp,v
retrieving revision 1.2
diff -u -r1.2 fs_test.dsp
--- subversion/libsvn_fs/tests/fs_test.dsp      2000/12/21 23:09:33     1.2
+++ subversion/libsvn_fs/tests/fs_test.dsp      2001/01/27 05:57:08
@@ -42,7 +42,7 @@
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I ".." /I "..\..\include" /I "..\..\..\apr\include" /I "$(SVN_DB3_WIN32)\include" /I "..\..\.." /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "_WINDOWS_CONSOLE" /D alloca=_alloca /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I ".." /I "..\..\include" /I "..\..\..\apr\include" /I "..\..\.." /I "$(SVN_DB3_WIN32)\include" /I "$(SVN_DB3_WIN32)\build_win32" /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "_WINDOWS_CONSOLE" /D alloca=_alloca /FD /c
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x424 /d "NDEBUG"
 # ADD RSC /l 0x424 /d "NDEBUG"
@@ -67,7 +67,7 @@
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I ".." /I "..\..\include" /I "..\..\..\apr\include" /I "$(SVN_DB3_WIN32)\include" /I "..\..\.." /D "SVN_DEBUG" /D "_DEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "_WINDOWS_CONSOLE" /D alloca=_alloca /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I ".." /I "..\..\include" /I "..\..\..\apr\include" /I "..\..\.." /I "$(SVN_DB3_WIN32)\include" /I "$(SVN_DB3_WIN32)\build_win32" /D "SVN_DEBUG" /D "_DEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "_WINDOWS_CONSOLE" /D alloca=_alloca /FD /GZ /c
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x424 /d "_DEBUG"
 # ADD RSC /l 0x424 /d "_DEBUG"
Index: subversion/libsvn_fs/tests/skel_test.dsp
===================================================================
RCS file: /cvs/subversion/subversion/libsvn_fs/tests/skel_test.dsp,v
retrieving revision 1.3
diff -u -r1.3 skel_test.dsp
--- subversion/libsvn_fs/tests/skel_test.dsp    2000/12/21 23:09:33     1.3
+++ subversion/libsvn_fs/tests/skel_test.dsp    2001/01/27 05:57:10
@@ -42,7 +42,7 @@
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I ".." /I "..\..\include" /I "..\..\..\apr\include" /I "$(SVN_DB3_WIN32)\include" /I "..\..\.." /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "_WINDOWS_CONSOLE" /D alloca=_alloca /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I ".." /I "..\..\include" /I "..\..\..\apr\include" /I "$(SVN_DB3_WIN32)\include" /I "$(SVN_DB3_WIN32)\build_win32" /I "..\..\.." /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "_WINDOWS_CONSOLE" /D alloca=_alloca /FD /c
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x424 /d "NDEBUG"
 # ADD RSC /l 0x424 /d "NDEBUG"
@@ -67,7 +67,7 @@
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I ".." /I "..\..\include" /I "..\..\..\apr\include" /I "$(SVN_DB3_WIN32)\include" /I "..\..\.." /D "SVN_DEBUG" /D "_DEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "_WINDOWS_CONSOLE" /D alloca=_alloca /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I ".." /I "..\..\include" /I "..\..\..\apr\include" /I "$(SVN_DB3_WIN32)\include" /I "$(SVN_DB3_WIN32)\build_win32" /I "..\..\.." /D "SVN_DEBUG" /D "_DEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "_WINDOWS_CONSOLE" /D alloca=_alloca /FD /GZ /c
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x424 /d "_DEBUG"
 # ADD RSC /l 0x424 /d "_DEBUG"

Re: [patch] added db win32 portability includes to build projects

Posted by Branko Čibej <br...@xbc.nu>.
cmpilato@collab.net wrote:

> Branko =?ISO-8859-2?Q?=C8ibej?= <br...@xbc.nu> writes:
> 
>> And it goes on to say:
>> 
>>     Unpack the distribution, then set the environment variable
>>     SVN_DB3_WIN32 to the full path of the db-win32 directory (use the
>>     System control panel on WinNT/Win2k). MSVC will look for the include
>>     files in $(SVN_DB3_WIN32)\include, and the libraries in
>>     $(SVN_DB3_WIN32)\lib.
> 
> 
> Right.  It wasn't clear in the text that you expected a user to have
> to manipulate their directory structures in order to fit snugly into
> subversion's build system (when building their own DB code from
> source).  To someone unfamiliar with the problem, it reads as though
> one can simply unpack "the distribution" (with no clarification of
> that being a source or a binary one), set an environment variable, and
> off we go into blissful compilation.

I take a lot for granted, don't I. :-)

>> Oh, well. If sou think it's worth the trouble to change this and force 
>> everybody to compile their own version of DB3, go ahead. Personally I'd 
>> rather just put a note in HACKING that you have to copy the include 
>> files and libraries into the ...\include and ...\lib directories.
> 
> 
> And after talking to Karl about the issue, we agree that the note in
> HACKING is indeed the easiest solution to the problem.  If we get tons
> of complaints, we can spend the time to submit a patch to Berkeley
> that will create a useful directory structure, or perhaps someone else
> will do so.

O.K., I'll update HACKING to make it clearer.


But *first* I'm going to post a big complaint to the APR list for making 
APR_INCOMPLETE a (non-fatal) status code from apr_stat, instead of just 
setting a bit in the fileinfo.

(Yeah, GregS, your arguments in that thread were completely valid. I'm 
sorry now that I didn't join in to back you up. The damn thing breaks 
our client on Win32, and I'm not about to add code to handle incomplete 
stats in a zillion places. $*#@&!, if you'll pardon my French.)

> That said, I accept my rejected patch like a man. :-)

See, you don't have to join the army to find a character-building 
environment. :-))

Anyway, I committed you other patch, for "svn dir". I only forgot to 
mention you in the log, sorry, sorry ... Karl, could you please fix that ...


-- 
Brane �ibej
    home:   <br...@xbc.nu>             http://www.xbc.nu/brane/
    work:   <br...@hermes.si>   http://www.hermes-softlab.com/
     ACM:   <br...@acm.org>            http://www.acm.org/

Re: [patch] added db win32 portability includes to build projects

Posted by cm...@collab.net.
Branko =?ISO-8859-2?Q?=C8ibej?= <br...@xbc.nu> writes:

> And it goes on to say:
> 
>     Unpack the distribution, then set the environment variable
>     SVN_DB3_WIN32 to the full path of the db-win32 directory (use the
>     System control panel on WinNT/Win2k). MSVC will look for the include
>     files in $(SVN_DB3_WIN32)\include, and the libraries in
>     $(SVN_DB3_WIN32)\lib.

Right.  It wasn't clear in the text that you expected a user to have
to manipulate their directory structures in order to fit snugly into
subversion's build system (when building their own DB code from
source).  To someone unfamiliar with the problem, it reads as though
one can simply unpack "the distribution" (with no clarification of
that being a source or a binary one), set an environment variable, and
off we go into blissful compilation.

> Oh, well. If sou think it's worth the trouble to change this and force 
> everybody to compile their own version of DB3, go ahead. Personally I'd 
> rather just put a note in HACKING that you have to copy the include 
> files and libraries into the ...\include and ...\lib directories.

And after talking to Karl about the issue, we agree that the note in
HACKING is indeed the easiest solution to the problem.  If we get tons
of complaints, we can spend the time to submit a patch to Berkeley
that will create a useful directory structure, or perhaps someone else
will do so.

That said, I accept my rejected patch like a man. :-)

Re: [patch] added db win32 portability includes to build projects

Posted by Branko Čibej <br...@xbc.nu>.
cmpilato@collab.net wrote:

> Branko =?ISO-8859-2?Q?=C8ibej?= <br...@xbc.nu> writes:
> 
>> Could you explain why this is necessary? The binary distribution of DB3 
>> I made available (see the HACKING file) has no build-win32 directory. 
>> That include dir is only in the sources.
>> 
>> In fact, this change breaks the build for me.
> 
> 
> This from the HACKING file:
> 
>     If you want to build the server components, you'll also need a 
>     copy of Berkeley DB, version 3.1.14 or newer. The sources are 
>     available at http://www.sleepycat.com, but you can download a 
>     binary distribution of version 3.1.17 libraries and tools from
> 
>        http://www.xbc.nu/svn/db3-win32.zip

And it goes on to say:

    Unpack the distribution, then set the environment variable
    SVN_DB3_WIN32 to the full path of the db-win32 directory (use the
    System control panel on WinNT/Win2k). MSVC will look for the include
    files in $(SVN_DB3_WIN32)\include, and the libraries in
    $(SVN_DB3_WIN32)\lib.

> Given the two options, I chose the former (grabbing the source from
> sleepycat.com).  In the tarball from sleepycat (db-3.1.17.tar.gz), the
> file db.h exists only in build_win32, build_vms, and build_vxworks
> directories.  In fact, upon building the DB code using the VS
> workspace in the build_win32 directory, libdb31s.lib is indeed
> created, but no /lib directory is created.  
> 
> Now, I'm perfectly willing to entertain the idea that the actual
> Berkeley source distribution doesn't automagically arrange its output
> in a fashion consistent with the binary distribution.  If this is
> case, however, we should decide on which of the two distributions is
> legitimate for the purposes of Subversion's build process, and then
> clarify such in the HACKING file--and my vote would fall for the
> source distribution.

O.K., we have to decide about that. Given that we use an installed DB3 
on Unix, I wanted to avoid using the source distribution on NT. That's 
one reason why I packaged the libraries, includes and docs in a 
moredately Unix-ish way; the other is that it's easier for people to 
just grab the binaries.

Oh, well. If sou think it's worth the trouble to change this and force 
everybody to compile their own version of DB3, go ahead. Personally I'd 
rather just put a note in HACKING that you have to copy the include 
files and libraries into the ...\include and ...\lib directories.


-- 
Brane �ibej
    home:   <br...@xbc.nu>             http://www.xbc.nu/brane/
    work:   <br...@hermes.si>   http://www.hermes-softlab.com/
     ACM:   <br...@acm.org>            http://www.acm.org/

Re: [patch] added db win32 portability includes to build projects

Posted by cm...@collab.net.
Branko =?ISO-8859-2?Q?=C8ibej?= <br...@xbc.nu> writes:

> Could you explain why this is necessary? The binary distribution of DB3 
> I made available (see the HACKING file) has no build-win32 directory. 
> That include dir is only in the sources.
> 
> In fact, this change breaks the build for me.

This from the HACKING file:

    If you want to build the server components, you'll also need a 
    copy of Berkeley DB, version 3.1.14 or newer. The sources are 
    available at http://www.sleepycat.com, but you can download a 
    binary distribution of version 3.1.17 libraries and tools from

       http://www.xbc.nu/svn/db3-win32.zip

Given the two options, I chose the former (grabbing the source from
sleepycat.com).  In the tarball from sleepycat (db-3.1.17.tar.gz), the
file db.h exists only in build_win32, build_vms, and build_vxworks
directories.  In fact, upon building the DB code using the VS
workspace in the build_win32 directory, libdb31s.lib is indeed
created, but no /lib directory is created.  

Now, I'm perfectly willing to entertain the idea that the actual
Berkeley source distribution doesn't automagically arrange its output
in a fashion consistent with the binary distribution.  If this is
case, however, we should decide on which of the two distributions is
legitimate for the purposes of Subversion's build process, and then
clarify such in the HACKING file--and my vote would fall for the
source distribution.

Re: [patch] added db win32 portability includes to build projects

Posted by Branko Čibej <br...@xbc.nu>.
cmpilato@collab.net wrote:

> * libsvn_fs.dsp, fs_test.dsp, skel_test.dsp: Added win32-specific Berkeley
>                                              DB header path to includes
> 
Could you explain why this is necessary? The binary distribution of DB3 
I made available (see the HACKING file) has no build-win32 directory. 
That include dir is only in the sources.

In fact, this change breaks the build for me.

-- 
Brane �ibej
    home:   <br...@xbc.nu>             http://www.xbc.nu/brane/
    work:   <br...@hermes.si>   http://www.hermes-softlab.com/
     ACM:   <br...@acm.org>            http://www.acm.org/