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: Edit CMakeLists and ApacheMonitor source code
Author
tanquang



Joined: 21 Mar 2020
Posts: 58
Location: Vietnam

PostPosted: Sat 25 Dec '21 11:52    Post subject: Edit CMakeLists and ApacheMonitor source code Reply with quote

In some previous HTTPD compiler guidelines, they have instructed:
Remove the # (remove comment) section below in CMakeLists.txt (from line 903 to 908):
Code:
...
# getting duplicate manifest error with ApacheMonitor
# ADD_EXECUTABLE(ApacheMonitor support/win32/ApacheMonitor.c support/win32/ApacheMonitor.rc)
# SET(install_targets ${install_targets} ApacheMonitor)
# SET(install_bin_pdb ${install_bin_pdb} $<TARGET_PDB_FILE:ApacheMonitor>)
# SET_TARGET_PROPERTIES(ApacheMonitor PROPERTIES WIN32_EXECUTABLE TRUE)
# SET_TARGET_PROPERTIES(ApacheMonitor PROPERTIES COMPILE_FLAGS "-DAPP_FILE -DLONG_NAME=ApacheMonitor -DBIN_NAME=ApacheMonitor.exe ${EXTRA_COMPILE_FLAGS}")
# TARGET_LINK_LIBRARIES(ApacheMonitor ${EXTRA_LIBS} ${HTTPD_SYSTEM_LIBS} comctl32 wtsapi32)
...

After that, put the following line into a comment in the support/win32/ApacheMonitor.rc file (line 29):
Code:
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST  "ApacheMonitor.manifest"

But that tutorial from too old versions, I don't know what its effect is? And is it still needed on the latest versions available? If it really causes an error, why does Apache have not removed and remedy this problem? Question
Back to top
tangent
Moderator


Joined: 16 Aug 2020
Posts: 348
Location: UK

PostPosted: Tue 28 Dec '21 20:34    Post subject: Reply with quote

The ApacheMonitor utility for Windows is a support component (albeit a very useful one), and as such is considered optional rather than a default build component. Apache developers are predictably more concerned with maintaining Apache security and evolving core functionality.

That's the reason why the various build tutorials on this site detail the need to uncomment the ApacheMonitor lines in CMakeLists.txt.

With regard to the manifest file, my guess is there might have been some issues with the corresponding RC script with earlier versions of Visual Studio, but when I came to the HTTPD "build party", I found no issues or need to comment out the manifest line reference in ApacheMonitor.rc.
Back to top
tanquang



Joined: 21 Mar 2020
Posts: 58
Location: Vietnam

PostPosted: Wed 29 Dec '21 3:41    Post subject: Reply with quote

Well, wearing that line in "ApacheMonitor.rc" does not have to comment, but in the previous construction guide, they instructed that line to comment before compiling.
I currently still follow that instructions, remove comments in CMakeLists.txt and comment that line in ApacheMonitor.rc before compiling, although it doesn't happen when compiling.
Back to top
tanquang



Joined: 21 Mar 2020
Posts: 58
Location: Vietnam

PostPosted: Thu 13 Apr '23 19:48    Post subject: Reply with quote

tangent wrote:
With regard to the manifest file, my guess is there might have been some issues with the corresponding RC script with earlier versions of Visual Studio, but when I came to the HTTPD "build party", I found no issues or need to comment out the manifest line reference in ApacheMonitor.rc.

Hello, do you remember the Visual Studio version you use when compiling?
Back to top
tangent
Moderator


Joined: 16 Aug 2020
Posts: 348
Location: UK

PostPosted: Thu 13 Apr '23 21:00    Post subject: Reply with quote

When I first started building Apache on Windows, I used Visual Studio 2019 (VS16 series). For all the CMake based builds referenced in my HowTo, I currently use Visual Studio 2022 (VS17 series).

Just to confirm, I've never needed to comment out that manifest line reference in ApacheMonitor.rc to build ApacheMonitor.exe. The ApacheMonitor.manifest file is present in the httpd source, but maybe it was missing in an earlier release referenced by your previous build guidelines. Hence the recommendation to comment out that line?

The following is the relevant ApacheMonitor.rc extract from my current build log, which shows no issues regarding the manifest file.

Code:
[100%] Building C object CMakeFiles/ApacheMonitor.dir/support/win32/ApacheMonitor.c.obj
ApacheMonitor.c
C:\Development\Apache24\src\httpd-2.4.56\support\win32\ApacheMonitor.c(296): warning C4996: 'GetVersionExA': was declared deprecated

[100%] Building RC object CMakeFiles/ApacheMonitor.dir/support/win32/ApacheMonitor.rc.res
Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384

Copyright (C) Microsoft Corporation.  All rights reserved.

C:\Development\Apache24\src\httpd-2.4.56\support\win32\ApacheMonitor.rc(21) : warning RC4005: 'LONG_NAME' : redefinition

[100%] Linking C executable ApacheMonitor.exe
[100%] Built target ApacheMonitor
Back to top
tanquang



Joined: 21 Mar 2020
Posts: 58
Location: Vietnam

PostPosted: Fri 14 Apr '23 15:47    Post subject: Reply with quote

Oh, thanks. I just wanted to confirm if you're using a newer or older version of Visual Studio than the one I used to build HTTPd, I also tried building using Visual Studio 2013 and didn't comment on that line and there are no error.
Have you tried compiling OpenSSL 3.0 with HTTPd? Is it similar to when compiling with OpenSSL 1.1.1?
Back to top


Reply to topic   Topic: Edit CMakeLists and ApacheMonitor source code View previous topic :: View next topic
Post new topic   Forum Index -> Building & Member Downloads