You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Bert Huijben <B....@competence.biz> on 2007/09/21 08:37:02 UTC

[Patch] Allow x64 compilation on windows

	Hi,

The attached patch allows compiling subversion for Win64/x64. Windows
defines WIN64 as an extended WIN32, so I had to update the crash
handler. 

To update the crash handler I replaced our use of the 32 bit debug api
with the 64 bit api's which are available on all 32 and 64 bit Windows
versions since dbghelp 5.1 (Our crash handler already checked for
version 6.6.7.5, so I don't think this is a problem)

I added an x64 platform to the solutions and project files for x64 (and
fixed several of the vc.net templates to use the platform definition
correctly).

The new projects won't allow cross compilation for different platforms
using the same working copy at this time. (The dependencies are not
tracked per platform by the python scripting)

[[[
* build/generator/gen_win.py
   Added 'x64' platform

* build/generator/neon.vcproj.ezt
* build/generator/serf.vcproj.ezt
* build/generator/svn_config.vcproj.ezt
* build/generator/svn_locale.vcproj.ezt
* build/generator/zlib.vcproj.ezt
  Added 'x64'  debug and release configurations
* build/generator/vcnet_vcproj.ezt
  Fixed platform configuration generation to use [platforms] macro
instead of 'Win32'
* subversion/libsvn_subr/win32_crashrpt_dll.h
* subversion/libsvn_subr/win32_crashrpt.c
  Use 5.1+ DbgHelp api to enable the crash handler on non x86 cpu's

Patch by: Bert Huijben <bh...@competence.biz>
]]]

I needed to compile a x64 version of subversion to include in the x64
version of my .Net subversion library (see
http://code.google.com/p/sharpsvn/), which should be available shortly
after the release of subversion 1.5.

	Bert


RE: RE: [Patch] Allow x64 compilation on windows

Posted by Paul Burba <pb...@collab.net>.
I don't have a Win64 machine to try this patch out on, but FWIW I did
apply it to my Win32 setup and can confirm it doesn't have any ill
effects there.

Paul 

> -----Original Message-----
> From: Bert Huijben [mailto:bert@vmoo.com] 
> Sent: Friday, September 21, 2007 5:41 AM
> To: dev@subversion.tigris.org
> Subject: RE: [Patch] Allow x64 compilation on windows
> 
> > -----Original Message-----
> > From: Bert Huijben [mailto:B.Huijben@competence.biz]
> > 
> > 	Hi,
> > 
> > The attached patch allows compiling subversion for 
> Win64/x64. Windows 
> > defines WIN64 as an extended WIN32, so I had to update the crash 
> > handler.
> 
> The new attached patch (v02) allows clean compilation on non 
> win64 targets.
> (Microsoft typedefed some 32 bit types to the 64 bit versions 
> on 64 bit builds).
> 
> 	Bert
> 
> 
> 

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


RE: [Patch] Allow x64 compilation on windows

Posted by Bert Huijben <be...@vmoo.com>.
> I think the patch has a problem.
> 
> The patch uses 64bit version APIs and data structures on X86 too.

The api without the 64 suffix is the old api for 32-bit only systems. Since
dbghelp 5.1 Microsoft implemented these 64 bit api on both 64 and 32 bit
operating systems to allow the same code to work on all their 'current'
operating systems and even documents the old api as only a wrapper around
the new version. (See
http://msdn2.microsoft.com/en-us/library/ms681408.aspx)

The subversion code always checked whether dbghelp.dll has at least version
6.6.7.5 before using any of the dbghelp.dll functions. So this does not
change the outside dependencies for us.
(I wrote about this in my original e-mail)

	Bert

>    SymGetLineFromAddr64
>    StackWalk64
>    SymFunctionTableAccess64
>    SymGetModuleBase64
>    IMAGEHLP_LINE64
>    STACKFRAME64
> 
> Regards.
> Masaru
> 
> 2007/9/29, D.J. Heap <dj...@gmail.com>:
> > On 9/21/07, Bert Huijben <be...@vmoo.com> wrote:
> > > > -----Original Message-----
> > > > From: Bert Huijben [mailto:B.Huijben@competence.biz]
> > > >
> > > >       Hi,
> > > >
> > > > The attached patch allows compiling subversion for Win64/x64.
Windows
> > > > defines WIN64 as an extended WIN32, so I had to update the crash
> > > > handler.
> > >
> > > The new attached patch (v02) allows clean compilation on non win64
targets.
> > > (Microsoft typedefed some 32 bit types to the 64 bit versions on 64
bit
> > > builds).
> > >
> >
> >
> > I'll try to get setup to build and test this over the weekend -- if I
> > don't see any issues and no one objects, I'll commit it in a few days.
> >
> > Thanks!
> >
> > DJ

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

Re: [Patch] Allow x64 compilation on windows

Posted by masaru tsuchiyama <m....@gmail.com>.
Hello

I think the patch has a problem.

The patch uses 64bit version APIs and data structures on X86 too.
   SymGetLineFromAddr64
   StackWalk64
   SymFunctionTableAccess64
   SymGetModuleBase64
   IMAGEHLP_LINE64
   STACKFRAME64

Regards.
Masaru

2007/9/29, D.J. Heap <dj...@gmail.com>:
> On 9/21/07, Bert Huijben <be...@vmoo.com> wrote:
> > > -----Original Message-----
> > > From: Bert Huijben [mailto:B.Huijben@competence.biz]
> > >
> > >       Hi,
> > >
> > > The attached patch allows compiling subversion for Win64/x64. Windows
> > > defines WIN64 as an extended WIN32, so I had to update the crash
> > > handler.
> >
> > The new attached patch (v02) allows clean compilation on non win64 targets.
> > (Microsoft typedefed some 32 bit types to the 64 bit versions on 64 bit
> > builds).
> >
>
>
> I'll try to get setup to build and test this over the weekend -- if I
> don't see any issues and no one objects, I'll commit it in a few days.
>
> Thanks!
>
> DJ
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
>

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

Re: [Patch] Allow x64 compilation on windows

Posted by "D.J. Heap" <dj...@gmail.com>.
On 9/29/07, Bert Huijben <be...@vmoo.com> wrote:
[snip]
> I fixed this issue in the attached patch.
>
> (In my own subversion build for Sharpsvn I had used a similar patch which
> moved the intermediate files also to an x64 subdirectory to build x64 and
> win32 versions in the same working copy; but I forgot about the test
> framework requirements.)


Commited in r26854.

Thanks!

DJ

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

RE: [Patch] Allow x64 compilation on windows

Posted by Bert Huijben <be...@vmoo.com>.
> -----Original Message-----
> From: D.J. Heap [mailto:djheap@gmail.com]
> Sent: zaterdag 29 september 2007 17:41
> To: Bert Huijben
> Cc: dev@subversion.tigris.org
> Subject: Re: [Patch] Allow x64 compilation on windows
> 
> On 9/28/07, D.J. Heap <dj...@gmail.com> wrote:
> [snip]
> >
> > I'll try to get setup to build and test this over the weekend -- if I
> > don't see any issues and no one objects, I'll commit it in a few days.
> 
> 
> There is one issue that I think needs to be fixed -- the final
> binaries are being put in x64\Release rather than just Release which
> means the tests can't find them.  Putting them back manually let me
> run the tests to completion.

I fixed this issue in the attached patch.

(In my own subversion build for Sharpsvn I had used a similar patch which
moved the intermediate files also to an x64 subdirectory to build x64 and
win32 versions in the same working copy; but I forgot about the test
framework requirements.)

> Can you tweak the patch to keep the binaries in the Release
> subdirectory so the tests can find them?

The attached patch removes the following block from the previous patch (and
is now against trunk@ 26851 instead of trunk@26726)

--- build/generator/vcnet_vcproj.ezt	(revision 26726)
+++ build/generator/vcnet_vcproj.ezt	(working copy)
@@ -10,7 +10,7 @@
 	<Configurations>
 [for platforms][for configs]		<Configuration
 			Name="[configs.name]|[platforms]"
-
OutputDirectory="..\..\..\[configs.name]\[target.output_dir]"
+			OutputDirectory="..\..\..\[is platforms
"Win32"][else][platforms]\[end][configs.name]\[target.output_dir]"
 
IntermediateDirectory="..\..\..\[configs.name]\[target.intermediate_dir]"
 			ConfigurationType="[target_type]"[is configs.name
"Release"]
 			WholeProgramOptimization="FALSE"[end]>


	Bert

> 
> Thanks!
> 
> DJ

Re: [Patch] Allow x64 compilation on windows

Posted by "D.J. Heap" <dj...@gmail.com>.
On 9/28/07, D.J. Heap <dj...@gmail.com> wrote:
[snip]
>
> I'll try to get setup to build and test this over the weekend -- if I
> don't see any issues and no one objects, I'll commit it in a few days.


There is one issue that I think needs to be fixed -- the final
binaries are being put in x64\Release rather than just Release which
means the tests can't find them.  Putting them back manually let me
run the tests to completion.

Can you tweak the patch to keep the binaries in the Release
subdirectory so the tests can find them?

Thanks!

DJ

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

Re: [Patch] Allow x64 compilation on windows

Posted by "D.J. Heap" <dj...@gmail.com>.
On 9/21/07, Bert Huijben <be...@vmoo.com> wrote:
> > -----Original Message-----
> > From: Bert Huijben [mailto:B.Huijben@competence.biz]
> >
> >       Hi,
> >
> > The attached patch allows compiling subversion for Win64/x64. Windows
> > defines WIN64 as an extended WIN32, so I had to update the crash
> > handler.
>
> The new attached patch (v02) allows clean compilation on non win64 targets.
> (Microsoft typedefed some 32 bit types to the 64 bit versions on 64 bit
> builds).
>


I'll try to get setup to build and test this over the weekend -- if I
don't see any issues and no one objects, I'll commit it in a few days.

Thanks!

DJ

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

RE: [Patch] Allow x64 compilation on windows

Posted by Bert Huijben <be...@vmoo.com>.
> -----Original Message-----
> From: Bert Huijben [mailto:B.Huijben@competence.biz]
> 
> 	Hi,
> 
> The attached patch allows compiling subversion for Win64/x64. Windows
> defines WIN64 as an extended WIN32, so I had to update the crash
> handler.

The new attached patch (v02) allows clean compilation on non win64 targets.
(Microsoft typedefed some 32 bit types to the 64 bit versions on 64 bit
builds).

	Bert