logo
Apache Lounge
Webmasters

 


About

Forum Index Downloads Search Register Log in  RSS Apache Lounge
 



Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.



VS2008: missing expat with apr-util 1.6

 
Post new topic   Reply to topic    Apache Forum Index -> Apache Building & Member Downloads



View previous topic :: View next topic  
Author Message
mec4



Joined: 20 Nov 2017
Posts: 5
Location: UK

PostPosted: Mon 20 Nov '17 14:07    Post subject: VS2008: missing expat with apr-util 1.6 Reply with quote

I am trying to build apache 2.4.29 and subversion with VS2008 to support python 2.7 and am having trouble with apr-util 1.6. In [thread=35509]another thread[/thread] I read about copying the expat source into the apr-util tree but now I have issues with the library not linking.
"glsmith" said
Quote:
Once I added the expat source it built fine in x86
but I cannot find how to do this.

Can anyone point me to any docs to explain how to get the build to work? It looks like I am missing two environment variables (XML_PARSER and XML_OPTIONS) but am not sure what these need to be nor if I need to build expat first.

I have already fixed the line endings and built openssl and pcre. Then I ran
Code:
cvtdsp -2005 -ossl11
before opening the DSW and letting VS2008 convert the projects.

Thanks for any help!
Back to top
mec4



Joined: 20 Nov 2017
Posts: 5
Location: UK

PostPosted: Tue 21 Nov '17 10:37    Post subject: Some progress... Reply with quote

Looks like expat no longer provides a VS2008 compatible project file (and the VS2013 files cannot be downgraded). Instead I made a new VS2008 solution and include just the `expat` project files to build into the "srclib\expat\win32\release" folder.
Code:
set XML_PARSER=libexpat
in the command prompt before starting the solution file then linked libaprutil OK.

I still get a warning about missing "XML_OPTIONS" but I do not know what I should set these to, can anyone help?
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 794
Location: Amsterdam, NL, EU

PostPosted: Tue 21 Nov '17 22:26    Post subject: Re: Some progress... Reply with quote

mec4 wrote:
Looks like expat no longer provides a VS2008 compatible project file (and the VS2013 files cannot be downgraded).

Actually, the project files can be downgraded. Just replace every 'v141' in the *.vcxproj files with 'v90'. Open the expat.sln in VC14 or VC15 and it will compile OK.

mec4 wrote:
I still get a warning about missing "XML_OPTIONS" but I do not know what I should set these to, can anyone help?

I was wondering the same. In the end I removed the XML_OPTIONS from the preprocessor definitions of libaprutil.
Back to top
mec4



Joined: 20 Nov 2017
Posts: 5
Location: UK

PostPosted: Wed 22 Nov '17 10:39    Post subject: Reply with quote

I know I can downgrade the toolset but the project files will not open in VC2008, the structure of the files has changed too much.

Thanks for the info ref XML_OPTIONS. I have left it for now as it is "only" a warning and does not stop compilation.
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 794
Location: Amsterdam, NL, EU

PostPosted: Wed 22 Nov '17 10:47    Post subject: Reply with quote

mec4 wrote:
I know I can downgrade the toolset but the project files will not open in VC2008, the structure of the files has changed too much.

True. Apart from OpenSSL and PCRE you have to build Expat now separately as well. Or make you own *.vcproj.
Back to top
mec4



Joined: 20 Nov 2017
Posts: 5
Location: UK

PostPosted: Wed 22 Nov '17 11:33    Post subject: Reply with quote

Do you know where in the httpd tree I should copy the built libexpat files? At the moment I am editing the httpd projects to add the expat\win32\Release folder to the search paths but I would rather copy files than edit projects!

I tried running `cvtdsp.pl -apr16` but that only updated one file and the text displayed referenced openssl 1.1.0!
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2123
Location: Sun Diego, USA

PostPosted: Fri 24 Nov '17 21:18    Post subject: Reply with quote

cvtdsp.pl -apr16 was created before this which is why it doesn't help and who did this new expat mess didn't think to fix, even though he was told about it.

In Theory:

Expat can be anywhere. But they've really complicated things. Here's how I understand it but haven't tested it.

Open a VCx x86 command line console in httpd-x.x.x (source root).
Type in these commands.

set XML_PARCER=libexpat
set LIB=%LIB%;/path/to/expat/win32/bin
set INCLUDE=%INCLUDE%;/path/to/expat/lib

devenv /useenv apache.dsw

convert
build Win32 target

One problem with this however is that free versions of Visual Studio do not have devenv, at least VC9 & 10 don't.
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 794
Location: Amsterdam, NL, EU

PostPosted: Fri 24 Nov '17 22:50    Post subject: Reply with quote

glsmith wrote:
One problem with this however is that free versions of Visual Studio do not have devenv, at least VC9 & 10 don't.

VC11 does not have devenv either.

For x64:
Code:
wdexpress Apache.sln /Build "Release|x64" /useenv

Disadvantage: wdexpress on the command line does not show any output.

For Win32 try:
Code:
msbuild Apache.sln /p:configuration=Release /p:platform=Win32

msbuild does not have a /useenv parameter. I do not know if it uses the environment, because I entered all the settings in the vcxproj files.

Edit: VC10 has vcexpress and msbuild. I do not know the equivalent for VC9
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2123
Location: Sun Diego, USA

PostPosted: Sat 25 Nov '17 0:34    Post subject: Reply with quote

Or,

Just put it all back the way it was in 1.6.0 mostly. With this no need to use cvtdsp.pl -apr16.

Get Apache24 source with the apr, apr-util & apr-iconv sources in srclib set up.

Put other dependencies like pcre in the srclib folder.

Put the "expat" folder from inside the libexpat-R_2_2_5.zip download in srclib/apr-util/xml

Download patch at https://www.apachehaus.net/patches/aprutilx4h.patch and put in httpd's top source folder.

Open a command window and type: patch -p0 -b -i aprutilx4h.patch

then: perl srclib/apr/build/cvtdsp -2005

Open Apache.dsw in the Visual Studio 9 IDE, convert and build InstallBin.

Works for me, command line too which I use for every version other than VC9.

Patch will probably NOT work in 2.4.30 and up, I expect change here for the command line build as it's still looking for apr 1.6.0 files which have been removed.
Back to top
mec4



Joined: 20 Nov 2017
Posts: 5
Location: UK

PostPosted: Mon 27 Nov '17 10:30    Post subject: Reply with quote

glsmith wrote:
Or,

Just put it all back the way it was in 1.6.0 mostly. With this no need to use cvtdsp.pl -apr16.
...

Thanks very much for this, will give it a go and report back (may take a day or two now).
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 794
Location: Amsterdam, NL, EU

PostPosted: Mon 27 Nov '17 11:47    Post subject: Reply with quote

That should have been:
Quote:
VC11 Express does not have devenv either.
Back to top


Post new topic   Reply to topic    Apache Forum Index -> Apache Building & Member Downloads
Page 1 of 1