Windows Compile Help

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Windows Compile Help

Troy Curtis Jr
I'm hoping someone can point me in the right direction with an issue I'm having compiling Subversion on Windows 10 using Visual Studio 2015 tools.

I decided to break out of my comfort zone a bit and see if I could get the changes in for the py3c dependency added on the Windows side, but I am *not* a Windows dev.  I've done a lot of learning, which as been fun, but I can't figure this last error out.  I've attached the error log, and my WIP visual studio script that basically got me this far.

It seems to complain the it can't find a handful of symbols related to zlib, but if I look at the static archive I see those names (though there are all those different calling conventions on windows, so maybe that is related to my issue?).

Anyway, I've run out of ideas and was hoping for a little nudge.


Troy

vs-build.txt (11K) Download Attachment
svnbuilderr.txt (429K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Windows Compile Help

Nathan Hartman
On Jan 27, 2018, at 11:44 PM, Troy Curtis Jr <[hidden email]> wrote:

>
> I'm hoping someone can point me in the right direction with an issue I'm having compiling Subversion on Windows 10 using Visual Studio 2015 tools.
>
> I decided to break out of my comfort zone a bit and see if I could get the changes in for the py3c dependency added on the Windows side, but I am *not* a Windows dev.  I've done a lot of learning, which as been fun, but I can't figure this last error out.  I've attached the error log, and my WIP visual studio script that basically got me this far.
>
> It seems to complain the it can't find a handful of symbols related to zlib, but if I look at the static archive I see those names (though there are all those different calling conventions on windows, so maybe that is related to my issue?).
>
> Anyway, I've run out of ideas and was hoping for a little nudge.
> …
>
>
> Troy
> <vs-build.txt>
> <svnbuilderr.txt>

There seems to be a mix of relative and absolute paths with respect to zlib in the build script. I'm writing this on my phone so I can't look at the script while writing this but the ZLIBPROJ variable (if memory serves) is assigned a relative path; the library binaries are copied from there to another relative path location; but the --with-zlib= for building Subversion uses an absolute path starting with C:\ -- perhaps you have a different zlib there? If so then you're building one zlib in this script but using a different zlib when building Subversion, perhaps one built with mingw instead of MSVC or something. That would explain the linker errors. Unless I'm missing something else :-)

Hope this helps
Reply | Threaded
Open this post in threaded view
|

Re: Windows Compile Help

Nathan Hartman
In reply to this post by Troy Curtis Jr
On Jan 27, 2018, at 11:44 PM, Troy Curtis Jr <[hidden email]> wrote:

I'm hoping someone can point me in the right direction with an issue I'm having compiling Subversion on Windows 10 using Visual Studio 2015 tools.

I decided to break out of my comfort zone a bit and see if I could get the changes in for the py3c dependency added on the Windows side, but I am *not* a Windows dev.  I've done a lot of learning, which as been fun, but I can't figure this last error out.  I've attached the error log, and my WIP visual studio script that basically got me this far.

It seems to complain the it can't find a handful of symbols related to zlib, but if I look at the static archive I see those names (though there are all those different calling conventions on windows, so maybe that is related to my issue?).

Anyway, I've run out of ideas and was hoping for a little nudge.


Troy
<vs-build.txt>
<svnbuilderr.txt>

Forgive the second reply but on further study of the build log and some googling around, I think the absolute/relative paths are not the culprit, and that your suspicion about calling conventions may be correct.


Which led to:


To summarize, CDECL is default and therefore probably what Subversion is building with, but zlib may be building with STDCALL.

I would check if the zlib project defines ZLIB_WINAPI and if so, remove it and retry the build.
Reply | Threaded
Open this post in threaded view
|

Re: Windows Compile Help

Troy Curtis Jr


On Sun, Jan 28, 2018 at 12:21 AM Nathan Hartman <[hidden email]> wrote:
On Jan 27, 2018, at 11:44 PM, Troy Curtis Jr <[hidden email]> wrote:

I'm hoping someone can point me in the right direction with an issue I'm having compiling Subversion on Windows 10 using Visual Studio 2015 tools.

I decided to break out of my comfort zone a bit and see if I could get the changes in for the py3c dependency added on the Windows side, but I am *not* a Windows dev.  I've done a lot of learning, which as been fun, but I can't figure this last error out.  I've attached the error log, and my WIP visual studio script that basically got me this far.

It seems to complain the it can't find a handful of symbols related to zlib, but if I look at the static archive I see those names (though there are all those different calling conventions on windows, so maybe that is related to my issue?).

Anyway, I've run out of ideas and was hoping for a little nudge.


Troy
<vs-build.txt>
<svnbuilderr.txt>

Forgive the second reply but on further study of the build log and some googling around, I think the absolute/relative paths are not the culprit, and that your suspicion about calling conventions may be correct.


Which led to:


To summarize, CDECL is default and therefore probably what Subversion is building with, but zlib may be building with STDCALL.

I would check if the zlib project defines ZLIB_WINAPI and if so, remove it and retry the build.

Thanks so much for taking the time to look at this Nathan! You were right on.  I had gotten close earlier but went the wrong way.  At one point I *added* ZLIB_WINAPI to the config header, but of course it complained about a redefinition.   It didn't click that I needed to *remove* it.  Pulling that out of the build configuration finally got me linking (well, after added /safeseh to the asm build in zlib as well).

Now to add swig to the mix and maybe eventually actually adding the change I want to test! XD

Thanks again!

Troy
Reply | Threaded
Open this post in threaded view
|

Re: Windows Compile Help

Nathan Hartman
On Sun, Jan 28, 2018 at 10:23 AM, Troy Curtis Jr <[hidden email]> wrote:


On Sun, Jan 28, 2018 at 12:21 AM Nathan Hartman <[hidden email]> wrote:
On Jan 27, 2018, at 11:44 PM, Troy Curtis Jr <[hidden email]> wrote:

I'm hoping someone can point me in the right direction with an issue I'm having compiling Subversion on Windows 10 using Visual Studio 2015 tools.

I decided to break out of my comfort zone a bit and see if I could get the changes in for the py3c dependency added on the Windows side, but I am *not* a Windows dev.  I've done a lot of learning, which as been fun, but I can't figure this last error out.  I've attached the error log, and my WIP visual studio script that basically got me this far.

It seems to complain the it can't find a handful of symbols related to zlib, but if I look at the static archive I see those names (though there are all those different calling conventions on windows, so maybe that is related to my issue?).

Anyway, I've run out of ideas and was hoping for a little nudge.


Troy
<vs-build.txt>
<svnbuilderr.txt>

Forgive the second reply but on further study of the build log and some googling around, I think the absolute/relative paths are not the culprit, and that your suspicion about calling conventions may be correct.


Which led to:


To summarize, CDECL is default and therefore probably what Subversion is building with, but zlib may be building with STDCALL.

I would check if the zlib project defines ZLIB_WINAPI and if so, remove it and retry the build.

Thanks so much for taking the time to look at this Nathan! You were right on.  I had gotten close earlier but went the wrong way.  At one point I *added* ZLIB_WINAPI to the config header, but of course it complained about a redefinition.   It didn't click that I needed to *remove* it.  Pulling that out of the build configuration finally got me linking (well, after added /safeseh to the asm build in zlib as well).

Now to add swig to the mix and maybe eventually actually adding the change I want to test! XD

Thanks again!

Troy

 
Glad I could help. Out of curiosity is this a 64-bit build and did you have to do anything out of the ordinary because of that?
Reply | Threaded
Open this post in threaded view
|

Re: Windows Compile Help

Troy Curtis Jr


[..snip..]


Glad I could help. Out of curiosity is this a 64-bit build and did you have to do anything out of the ordinary because of that?

I'm basically taking defaults, and considering the zlib asm I built was x86 and not x64 (and linking finally worked), I'm guessing it is a 32-bit build :) 

Troy
Reply | Threaded
Open this post in threaded view
|

RE: Windows Compile Help

Bert Huijben-5
In reply to this post by Troy Curtis Jr

If you build ZLib with the Windows specific assembly optimizations you introduce known issues. Please make sure that you run the Subversion test that was designed to show you this problem.

 

These assembly optimizations to zlib are a non-supported contributed package to zlib and not supported by the zlib authors. And as such they weren’t kept up to date over the last few releases.

 

In some cases this may corrupt your data when transferred via ra-serf. This is how we found and reported the now-known problem to the zlib authors. They are currently not interested in fixing this issue, as the optimizations are non-supported and out of date anyway.

 

              Bert

 

From: Troy Curtis Jr [mailto:[hidden email]]
Sent: zondag 28 januari 2018 16:23
To: Nathan Hartman <[hidden email]>
Cc: Subversion Development <[hidden email]>
Subject: Re: Windows Compile Help

 

 

On Sun, Jan 28, 2018 at 12:21 AM Nathan Hartman <[hidden email]> wrote:

On Jan 27, 2018, at 11:44 PM, Troy Curtis Jr <[hidden email]> wrote:

 

I'm hoping someone can point me in the right direction with an issue I'm having compiling Subversion on Windows 10 using Visual Studio 2015 tools.

I decided to break out of my comfort zone a bit and see if I could get the changes in for the py3c dependency added on the Windows side, but I am *not* a Windows dev.  I've done a lot of learning, which as been fun, but I can't figure this last error out.  I've attached the error log, and my WIP visual studio script that basically got me this far.

It seems to complain the it can't find a handful of symbols related to zlib, but if I look at the static archive I see those names (though there are all those different calling conventions on windows, so maybe that is related to my issue?).

Anyway, I've run out of ideas and was hoping for a little nudge.

 

 

Troy

<vs-build.txt>

<svnbuilderr.txt>

 

Forgive the second reply but on further study of the build log and some googling around, I think the absolute/relative paths are not the culprit, and that your suspicion about calling conventions may be correct.

 

 

Which led to:

 

 

To summarize, CDECL is default and therefore probably what Subversion is building with, but zlib may be building with STDCALL.

 

I would check if the zlib project defines ZLIB_WINAPI and if so, remove it and retry the build.

 

Thanks so much for taking the time to look at this Nathan! You were right on.  I had gotten close earlier but went the wrong way.  At one point I *added* ZLIB_WINAPI to the config header, but of course it complained about a redefinition.   It didn't click that I needed to *remove* it.  Pulling that out of the build configuration finally got me linking (well, after added /safeseh to the asm build in zlib as well).

 

Now to add swig to the mix and maybe eventually actually adding the change I want to test! XD

 

Thanks again!

 

Troy

Reply | Threaded
Open this post in threaded view
|

Re: Windows Compile Help

Jan Ehrhardt
Bert Huijben in gmane.comp.version-control.subversion.devel (Mon, 29 Jan
2018 14:43:15 +0100):
>If you build ZLib with the Windows specific assembly optimizations you
>introduce known issues. Please make sure that you run the Subversion
>test that was designed to show you this problem.
>
>These assembly optimizations to zlib are a non-supported contributed
>package to zlib and not supported by the zlib authors. And as such they
>weren’t kept up to date over the last few releases.

The code is still there, although the ZLib authors say it has been
removed. Ref:
https://www.apachelounge.com/viewtopic.php?p=36321#36321
https://github.com/madler/zlib/issues/293#issue-253089104

Bad habit to leave unsupported code on github.
--
Jan

Reply | Threaded
Open this post in threaded view
|

Re: Windows Compile Help

Troy Curtis Jr


On Tue, Jan 30, 2018 at 5:49 AM Jan Ehrhardt <[hidden email]> wrote:
Bert Huijben in gmane.comp.version-control.subversion.devel (Mon, 29 Jan
2018 14:43:15 +0100):
>If you build ZLib with the Windows specific assembly optimizations you
>introduce known issues. Please make sure that you run the Subversion
>test that was designed to show you this problem.
>
>These assembly optimizations to zlib are a non-supported contributed
>package to zlib and not supported by the zlib authors. And as such they
>weren’t kept up to date over the last few releases.

The code is still there, although the ZLib authors say it has been
removed. Ref:
https://www.apachelounge.com/viewtopic.php?p=36321#36321
https://github.com/madler/zlib/issues/293#issue-253089104

Bad habit to leave unsupported code on github.
--
Jan


Thanks for the info guys! I built the asm since it was in the vc6-build.bat file that
I was using as a guide.  I'll shortly be proposing an updated version of the script
based on the my "adventures", after a bit of clean up, so I'll be sure to leave that part out.

Troy