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 -> How-to's & Documentation & Tips View previous topic :: View next topic
Reply to topic   Topic: HOWTO: Building Apache and dependencies using CMake Page Previous  1, 2, 3
Author
tangent
Moderator


Joined: 16 Aug 2020
Posts: 365
Location: UK

PostPosted: Fri 06 Sep '24 20:10    Post subject: Reply with quote

Build dependency updates to match Steffen's latest HTTPD 2.4.62 release changes, including other package updates:

APR (1.7.5)
CURL (8.9.1)
LIBXML2 (2.13.3)
NGHTTP2 (1.63.0)
OPENSSL (3.1.7)

Note, the trunk fix patch r1919860 mentioned in the Apache 2.4.62 Changelog has not been applied. Should you wish to, Eric Coverner's patch to mod_rewrite.c (merge r1919860 from trunk), can be downloaded (see https://github.com/apache/httpd/pull/473/files), and applied to the Apache httpd source using a Windows version of the GNU patch utility.

Note concerning CURL 8.9.1 and idn2


CURL 8.9.1 has an updated CMakeLists.txt configuration that uses pkg-config (if available) to search for idn2 library support.
It turns out one is included with Strawberry Perl, but unfortunately that finds static libary libidn2.a in the Perl distribution, which is no use here. So for now the build batch file has been updated to explicitly exclude CURL support for idn2.

Other than that, there are no changes to the batch file build logic from before.

@ranemstsage: Thanks for your post, and reference to building with git sources directly. This was something I seriously considered when first putting this guide together, but decided the need to be able to build off-line was greater. Maybe you'd care to post your GIT build variant to the HowTo section?
Back to top
ranemstsage



Joined: 04 Sep 2024
Posts: 3
Location: Lennon, MI, United States

PostPosted: Wed 11 Sep '24 5:24    Post subject: Reply with quote

as soon as i get it fully ironed out. I have been running into some slight issues. I am trying to build it for SVN and redmine. and now it doesn't want to start with mod_dav Crying or Very sad
Back to top
tangent
Moderator


Joined: 16 Aug 2020
Posts: 365
Location: UK

PostPosted: Wed 13 Nov '24 18:56    Post subject: Reply with quote

Build dependency updates for various support packages:

CURL (8.11.0)
EXPAT (2.6.4)
LIBXML2 (2.13.5)
NGHTTP2 (1.64.0)

Also patch HTTPD mod_rewrite.c to apply Eric Coverner's trunk fix patch r1919860 as mentioned in the Apache Lounge 2.4.62 Changelog.

Finally, report result of the mklink command when creating APR related symbolic links, in case it fails. Previously, any output of this command was redirected to null, this problem being highlighted in post https://www.apachelounge.com/viewtopic.php?t=9271
Back to top
tangent
Moderator


Joined: 16 Aug 2020
Posts: 365
Location: UK

PostPosted: Fri 24 Jan '25 15:37    Post subject: Reply with quote

Build dependency updates to match Steffen's latest HTTPD 2.4.63 release changes:

CURL (8.11.1)
HTTPD (2.4.63)
OPENSSL (3.4.0)

Other than release version details, there are no changes to the batch file build logic from before.

Build commentary updated to note that since October 2024, Microsoft has suspended availability of their Windows 11 virtual machine images at https://developer.microsoft.com/en-us/windows/downloads/virtual-machines
Back to top
tanquang



Joined: 21 Mar 2020
Posts: 62
Location: Vietnam

PostPosted: Tue 25 Feb '25 20:36    Post subject: Reply with quote

With cURL 8.12.1, if the LibPSL library is not found and the
Code:
-DCURL_USE_LIBPSL=OFF
flag is not used when compiling with cmake, an error will be returned.
Back to top
tangent
Moderator


Joined: 16 Aug 2020
Posts: 365
Location: UK

PostPosted: Tue 25 Feb '25 21:59    Post subject: Reply with quote

Thanks for the update concerning libpsl with CURL.

I generally don't scan the build log file for warnings across all the packages, but can see there was a warning returned for this during the CURL 8.11.1 build, viz:
Code:
-- Could NOT find Libpsl (missing: LIBPSL_INCLUDE_DIR LIBPSL_LIBRARY)
CMake Warning at CMakeLists.txt:1162 (message):
  libpsl is enabled, but not found.

So it would seem they've changed the CMakeLists.txt file logic for release 8.12.1 to make this an error.

Since CURL is not the prime target of this HOWTO, rather than try to add logic to build LIBPSL, during the next update I'll revise the build script CMake options for CURL to disable looking for LIBPSL.

I can see LIBPSL does mention building with Visual Studio (NMake), but it also requires Python, ICU libraries, etc. Hence the decision to stick with core packages, the primary requirement being to include those needed to match the binary builds released by the Apache Lounge.
Back to top
tanquang



Joined: 21 Mar 2020
Posts: 62
Location: Vietnam

PostPosted: Wed 26 Feb '25 13:03    Post subject: Reply with quote

tangent wrote:
Thanks for the update concerning libpsl with CURL.

I generally don't scan the build log file for warnings across all the packages, but can see there was a warning returned for this during the CURL 8.11.1 build, viz:
Code:
-- Could NOT find Libpsl (missing: LIBPSL_INCLUDE_DIR LIBPSL_LIBRARY)
CMake Warning at CMakeLists.txt:1162 (message):
  libpsl is enabled, but not found.

So it would seem they've changed the CMakeLists.txt file logic for release 8.12.1 to make this an error.

Since CURL is not the prime target of this HOWTO, rather than try to add logic to build LIBPSL, during the next update I'll revise the build script CMake options for CURL to disable looking for LIBPSL.

I can see LIBPSL does mention building with Visual Studio (NMake), but it also requires Python, ICU libraries, etc. Hence the decision to stick with core packages, the primary requirement being to include those needed to match the binary builds released by the Apache Lounge.


I created an issue related to the libpsl library on the cURL repository: libpsl should not be marked REQUIRED in CMakeLists.txt

As explained by cURL members, libpsl is needed for secure cookie handling, but compiling it is currently quite complicated and conflicts with some other libraries when compiling Apache so temporarily use -DCURL_USE_LIBPSL=OFF to ignore it until it supports MSVC and cmake or there is another build with less conflicts.

In addition to libpsl, two libraries, Zstandard (zstd) and libssh2, are also required when building cURL. These two libraries will not return an error when not found like libpsl (since it is not marked as REQUIRED in CMakeLists.txt) and these two libraries support building with cmake.

I tried compiling these two libraries and was successful in just 4 / 6 lines of command:

Code:
*******************
** LibSSH2 Build **
*******************
CD /D C:\httpd\srclib\libssh2-1.11.1
CMAKE -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=\Apache -DCMAKE_BUILD_TYPE=Release -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=ON
NMAKE && NMAKE INSTALL

*********************
** Zstandard Build **
*********************
CD /D C:\httpd\srclib\zstd-1.5.7\build\cmake
CMAKE -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=\Apache -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON
NMAKE && NMAKE INSTALL

... cURL build


So you might consider adding them in the next release, before compiling cURL.
Back to top
tanquang



Joined: 21 Mar 2020
Posts: 62
Location: Vietnam

PostPosted: Wed 26 Feb '25 13:15    Post subject: Reply with quote

There is a small note with your OpenSSL build code. OpenSSL uses the (case-sensitive) argument --release (default) or --debug for release/debug builds.

tangent wrote:

Code:
@echo off

...
  set OPENSSL_CONFIGURE_OPTS=--prefix=%PREFIX% --libdir=lib --openssldir=%PREFIX%\conf --with-zlib-include=%PREFIX%\include shared zlib-dynamic enable-camellia no-idea no-mdc2
...


So if you don't specify an argument, it will always build a release build by default.
Back to top
admin
Site Admin


Joined: 15 Oct 2005
Posts: 701

PostPosted: Thu 27 Feb '25 10:32    Post subject: Reply with quote

Yes, the policy at Apache Lounge is that we ship dependencies only with for HTTP needed, so no libpsl, python. icu.
Back to top
tanquang



Joined: 21 Mar 2020
Posts: 62
Location: Vietnam

PostPosted: Fri 28 Feb '25 13:38    Post subject: Reply with quote

admin wrote:
Yes, the policy at Apache Lounge is that we ship dependencies only with for HTTP needed, so no libpsl, python. icu.


Yes, especially with python, I once made the mistake of installing python before compiling the dependencies and Apache and then had a headache trying to figure out how to fix dozens of errors that appeared afterwards. In the end the quickest solution was to uninstall python and everything was back to normal!
Back to top


Reply to topic   Topic: HOWTO: Building Apache and dependencies using CMake View previous topic :: View next topic
Post new topic   Forum Index -> How-to's & Documentation & Tips Page Previous  1, 2, 3