logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


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

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Building & Member Downloads View previous topic :: View next topic
Reply to topic   Topic: Error when compiling Apache 2.4.10 with Visual Studio 2013
Author
Asim Omer



Joined: 15 Sep 2014
Posts: 4
Location: Khartoum, Sudan

PostPosted: Sun 21 Sep '14 21:20    Post subject: Error when compiling Apache 2.4.10 with Visual Studio 2013 Reply with quote

Hi,

I tried to compile Apache 2.4.10 with Visual Studio 2013 but with no luck.

I followed these steps from this forum (of course changing the paths as needed):

Code:

unpack httpd-2.4.3.tar.gz to C:\build\2.4.3
unpack httpd-2.4.3-deps.tar.gz to C:\build\2.4.3
unpack apr-iconv-1.2.1.tar.gz to C:\build\2.4.3\srclib\apr-iconv
unpack openssl-1.0.1c.tar.gz and C:\build\2.4.3\srclib\openssl
unpack zlib-1.2.7.tar.gz C:\build\2.4.3\srclib\zlib
unpack pcre-8.20.zip C:\build\2.4.3\srclib\pcre


command line
cd C:\build\2.4.3
srclib\apr\build\lineends.pl
srclib\apr\build\cvtdsp.pl -2005


cd srclib\zlib
nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF -I." OBJA="inffas32.obj match686.obj"
MT -manifest zlib1.dll.manifest -outputresource:zlib1.dll;2

cd ..\..\srclib\openssl
perl Configure VC-WIN32 --prefix=/Apache24 --openssldir=/Apache24/conf enable-camellia disable-idea
ms\do_nasm
nmake /f ms\ntdll.mak


Open Apache.dsw with Visual Studio and answer "Yes to All" to the "convert projects" question
Select relase win32

Now build InstallBin


The projects conversion went fine.

But when I arrive at the point when building with VS a lot of errors appear after the build.

I also tried using CMake but with no luck either. It says can't parse apr.h/apu.h in APR_INCLUDE_DIR.

I tried everything but nothing worked. Please help me!

Thank you! Asim
Back to top
glsmith
Moderator


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

PostPosted: Mon 22 Sep '14 2:04    Post subject: Reply with quote

Are we supposed to guess which errors you may or may not have gotten?
Back to top
Asim Omer



Joined: 15 Sep 2014
Posts: 4
Location: Khartoum, Sudan

PostPosted: Mon 22 Sep '14 22:22    Post subject: Reply with quote

Here are the error logs:

http://www.mediafire.com/?489s95tdz1g76o5
Back to top
glsmith
Moderator


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

PostPosted: Mon 22 Sep '14 22:59    Post subject: Reply with quote

1>apr_atomic.obj : error LNK2019: unresolved external symbol __InterlockedIncrement referenced in function _apr_atomic_inc32@4
1>apr_atomic.obj : error LNK2019: unresolved external symbol __InterlockedExchangeAdd referenced in function _apr_atomic_add32@8
1>apr_atomic.obj : error LNK2019: unresolved external symbol __InterlockedExchange referenced in function _apr_atomic_set32@8
1>apr_atomic.obj : error LNK2019: unresolved external symbol __InterlockedDecrement referenced in function _apr_atomic_dec32@4
1>apr_atomic.obj : error LNK2019: unresolved external symbol __InterlockedCompareExchange referenced in function _apr_atomic_cas32@12


I now remember seeing talk about this some time ago, looking back I see this email with a patch attached, you can try it.
http://marc.info/?l=apr-dev&m=138386228311375&w=2

Also, in srclib/apr-iconv/build/modules.mk.win search for and remove these:
/Yciconv.h
/Yuiconv.h

I'm not sure you need to do this step in VS 2010 and up, you may have to try both ways.
srclib\apr\build\cvtdsp.pl -2005
Back to top
Asim Omer



Joined: 15 Sep 2014
Posts: 4
Location: Khartoum, Sudan

PostPosted: Wed 24 Sep '14 20:08    Post subject: Reply with quote

After a lot of work I minimized the number of errors from 139 to just 25.

I have tried both ways with cvtdsp.pl and without it.

And I have tried everything you said to me.

Here are the new logs:

https://www.mediafire.com/?adas5dyflo95d74
Back to top
gijs



Joined: 27 Apr 2012
Posts: 189
Location: The Netherlands

PostPosted: Thu 25 Sep '14 12:47    Post subject: Reply with quote

If you get it to work with VS 2013 can you upload your project files, I'd like to try some other compilers to compile Apache.
Back to top
glsmith
Moderator


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

PostPosted: Fri 26 Sep '14 10:30    Post subject: Reply with quote

Your last 7zip archive was corrupted, but I'd rather not be going to mediafire. This is what pastebin.com is for.

Now this is typical of M$ in the past few years, I'm at update 3 and it still cannot keep track of what it's doing.

------ Build started: Project: libapriconv, Configuration: Release Win32 ------
iconv.c
iconv_ces.c
iconv_ces_euc.c
iconv_ces_iso2022.c
iconv_int.c
iconv_module.c
iconv_uc.c
Generating Code...
LINK : fatal error LNK1181: cannot open input file 'E:\httpd-2.4.10-vs12\srclib\apr\Debug\libapr-1.lib'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I am building a Release build but it is looking in the Debug builds directories to get the libs to link against. It's not a problem of the conversion because the projects properties for Release build are correct. It's simply a bug in VS12 itself or possibly have something to do with this;

please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).

Versions prior to 2010 were much more forgiving I guess.

I've found a kludge for this, you cannot remove the Debug build but you can disable it. It takes time to uncheck all 150 projects but it seems to be working for me.

The ApacheMonitor is a problem I need to look into, that is the only thing that failed to build.

I did not however build all the extra modules that require 3rd party dependencies (mods deflate, lua, proxy_html, ssl, xml2enc and abs.exe). I wanted to sink my teeth into it first. I play with this more tomorrow and see what I come up with.

http://pastebin.com/S6FzjudR
Back to top
glsmith
Moderator


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

PostPosted: Fri 26 Sep '14 22:52    Post subject: Reply with quote

ApacheMonitor is as simple as changing the property for Embed Manifest to no.
Back to top
Asim Omer



Joined: 15 Sep 2014
Posts: 4
Location: Khartoum, Sudan

PostPosted: Mon 29 Sep '14 0:18    Post subject: Reply with quote

I have successfully compiled Apache With Visual Studio 2013 thank you glsmith for your assistance Very Happy .

Here are the project files:

https://www.dropbox.com/s/dfb7noxntu3u3sy/httpd-2.4.10.zip?dl=0

Here are the binaries if any one is interested:

https://www.dropbox.com/s/5vjz9npqpe8w2ry/httpd-2.4.10-win32-VC12.zip?dl=0

Note:

The binaries and the project files use the following:

IPv6 and Crypto enabled, apr-1.5.1 apr-util-1.5.4 apr-iconv-1.2.1 openssl-1.0.1i zlib-1.2.8 pcre-8.35 libxml2-2.9.1 lua-5.1.5 expat-2.1.0

So they are pretty much updated and have a newer version of apr-util than the binaries provided here in Apache Lounge and more importantly built with Visual Studio 2013 Update 3.

To use the binaries be sure you have installed the Visual C++ Redistributable for Visual Studio 2013 Update 3.

Download and install, if you not have it already, from:

http://www.microsoft.com/en-us/download/details.aspx?id=40784

P.S:

If any one want the 64-bit version I am ready to do it.
Back to top
elav83



Joined: 10 Nov 2014
Posts: 17
Location: India

PostPosted: Thu 20 Nov '14 11:53    Post subject: Reply with quote

Hello Asim Omer,

Can u please share the procedure for building Apache 2.4.10 with VS2013 in 64bit windows machine?
Back to top


Reply to topic   Topic: Error when compiling Apache 2.4.10 with Visual Studio 2013 View previous topic :: View next topic
Post new topic   Forum Index -> Building & Member Downloads