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, 4, 5  Next
Author
Jan-E



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

PostPosted: Sun 20 Jul '25 10:41    Post subject: Reply with quote

Like this:
Code:
N:\php-sdk\win64build.vc17\lib
$ dumpbin /EXPORTS libcurl_a.lib | grep InitSecurityInterface
                  InitSecurityInterfaceW
                  InitSecurityInterfaceA
The 'InitSecurityInterfaceA' has to be there, otherwise php_curl.dll and others will not compile in PHP 8.4.10.
Back to top
tangent
Moderator


Joined: 16 Aug 2020
Posts: 394
Location: UK

PostPosted: Sun 20 Jul '25 16:06    Post subject: Reply with quote

I've spent some time looking at the CMake build configuration with Curl, and due to its complexity confess I don't fully understand some of the setup. However, the BUILD_STATIC_LIBS option creates a libcurl.lib file (not libcurl_a.lib), whilst the BUILD_SHARED_LIBS option creates a libcurl.dll file along with an import library file libcurl_imp.lib. There's also a BUILD_STATIC_CURL option, which I've tried setting.
Code:
[ 77%] Building C object lib/CMakeFiles/libcurl_object.dir/curlx/winapi.c.obj
winapi.c
[ 77%] Built target libcurl_object
[ 77%] Linking C static library libcurl.lib
[ 77%] Built target libcurl_static
[ 77%] Building C object lib/CMakeFiles/libcurl_shared.dir/dllmain.c.obj
dllmain.c
...
...
[ 80%] Linking C shared library libcurl.dll
[ 80%] Built target libcurl_shared
[ 80%] Generating tool_hugehelp.c
[ 80%] Building C object src/CMakeFiles/curl.dir/config2setopts.c.obj
config2setopts.c
...
...
-- Installing: C:/Apache24/lib/libcurl.lib
-- Installing: C:/Apache24/lib/libcurl_imp.lib
-- Installing: C:/Apache24/bin/libcurl.dll
-- Installing: C:/Apache24/bin/curl.exe
-- Installing: C:/Apache24/bin/curl-config

Dumpbin output from libcurl.lib /exports is minimal:
Code:
C:\Development\apache24\build>dumpbin /exports c:\Apache24\lib\libcurl.lib
Microsoft (R) COFF/PE Dumper Version 14.44.35207.1
Copyright (C) Microsoft Corporation.  All rights reserved.

Dump of file c:\Apache24\lib\libcurl.lib

File Type: LIBRARY

  Summary

         3F9 .bss
       1A418 .chks64
         A21 .data
        73E8 .debug$S
        20C7 .drectve
        9E88 .pdata
       19869 .rdata
       9BEB2 .text$mn
           E .voltbl
        EEFC .xdata

However, if I use the /symbols option, it does pick up this external reference (UNICODE not ANSI):
Code:
C:\Development\apache24\build>dumpbin /symbols c:\Apache24\lib\libcurl.lib | grep -i InitSecurity
015 00000000 UNDEF  notype       External     | __imp_InitSecurityInterfaceW

Similarly for libcurl.dll
Code:
C:\Development\apache24\build>dumpbin /imports c:\Apache24\bin\libcurl.dll | grep -i InitSecurity
                          20 InitSecurityInterfaceW

and understand this is provided by Secur32.lib/Secur32.dll. There is no reference to InitSecurityInterfaceA (ANSI)

Looking at the CMake configuration for HTTPD, by default it picks up on the Curl import library:
Code:
--   Curl include directory........... : C:/Apache24/include
--   Curl libraries .................. : C:/Apache24/lib/libcurl_imp.lib

However, it's only mod_md.so that requires Curl, and by default it seems to link to libcurl.dll (confirmed using dependencies.exe tool).

If I change the CMakeLists.txt file to choose libcurl.lib over libcurl_imp.lib, then the HTTPD build of mod_md.so fails:
Code:
[ 65%] Linking C shared library mod_md.so
LINK: command "C:\PROGRA~2\MICROS~2\2022\BUILDT~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\mod_md.dir\objects1.rsp /out:mod_md.so /implib:mod_md.lib /pdb:C:\Development\apache24\build\httpd\mod_md.pdb /dll /version:0.0 /base:@C:/Development/apache24/build/httpd/BaseAddr.ref,mod_md.so /machine:x64 /INCREMENTAL:NO C:\Apache24\lib\libssl.lib C:\Apache24\lib\libcrypto.lib C:\Apache24\lib\libcurl.lib C:\Apache24\lib\jansson.lib mod_watchdog.lib libhttpd.lib C:\Apache24\lib\libapr-1.lib C:\Apache24\lib\libaprutil-1.lib C:\Apache24\lib\apr_ldap-1.lib ws2_32.lib mswsock.lib C:\Apache24\lib\pcre2-8.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST:EMBED,ID=2" failed (exit code 1120) with the following output:
   Creating library mod_md.lib and object mod_md.exp
md_curl.c.obj : error LNK2019: unresolved external symbol __imp_curl_global_init referenced in function md_curl_init
etc...

so the CMake build of HTTPD is evidently geared around using shared libraries...

Either way, overall, I'm guessing this confirms your concerns over the latest Curl static library.
Back to top
Jan-E



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

PostPosted: Sun 20 Jul '25 16:48    Post subject: Reply with quote

Thanks. Some versions of dumpbin do not support /exports anymore. And apparently CMake creates the static and shared lib's for libcurl with different names.
Could you check the libs for curl 8.14.1 to see if something changed with respect to the InitSecurityInterface definitions?
Back to top
tangent
Moderator


Joined: 16 Aug 2020
Posts: 394
Location: UK

PostPosted: Sun 20 Jul '25 19:31    Post subject: Reply with quote

They have changed.

The InitSecurityInterface entry for libcurl.lib differs, whilst there isn't one in libcurl.dll.
Code:
C:\Development\apache24\build>c:\Apache24\bin\curl -V
curl 8.14.1 (Windows) libcurl/8.14.1 (OpenSSL/3.5.1) Schannel zlib/1.3.1 brotli/1.1.0 nghttp2/1.66.0
Release-Date: 2025-06-04
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS brotli HSTS HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz MultiSSL NTLM SPNEGO SSL SSPI threadsafe TLS-SRP Unicode UnixSockets

C:\Development\apache24\build>dumpbin /symbols c:\Apache24\lib\libcurl.lib | grep -i InitSecurity
05A 00000000 SECT18 notype       External     | ??_C@_0BH@DCJCBOGF@InitSecurityInterfaceW@ (`string')

C:\Development\apache24\build>dumpbin /imports c:\Apache24\bin\libcurl.dll | grep -i InitSecurity

The code has evidently changed in the curl_sspi.c module.

Curl 8.14.1
Code:
C:\Development\apache24\src\curl-8.14.1>c:\bin\find . -type f -exec grep -i InitSecurityInterface {} ; -ls
typedef PSecurityFunctionTable (APIENTRY *INITSECURITYINTERFACE_FN)(VOID);
#    define SECURITYENTRYPOINT L"InitSecurityInterfaceW"
#    define SECURITYENTRYPOINT "InitSecurityInterfaceW"
#  define SECURITYENTRYPOINT "InitSecurityInterfaceA"
  INITSECURITYINTERFACE_FN pInitSecurityInterface;
    /* Get address of the InitSecurityInterfaceA function from the SSPI dll */
    pInitSecurityInterface =
      CURLX_FUNCTION_CAST(INITSECURITYINTERFACE_FN,
    if(!pInitSecurityInterface)
    Curl_pSecFn = pInitSecurityInterface();
 16409    8 -rw-rw-rw-   1 user     group        7191 Jun 04 06:42 .\\lib\\curl_sspi.c

Curl 8.15.0
Code:
C:\Development\apache24\src\curl-8.15.0>c:\bin\find . -type f -exec grep -i InitSecurityInterface {} ; -ls
    Curl_pSecFn = InitSecurityInterfaceW();
    Curl_pSecFn = InitSecurityInterface();
 31550    6 -rw-rw-rw-   1 user     group        5778 Jul 16 07:22 .\\lib\\curl_sspi.c
Back to top
Jan-E



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

PostPosted: Mon 21 Jul '25 0:16    Post subject: Reply with quote

The ‘find’ you are using in the previous post ignores the ifdef’s around the statements. See the changes in curl_sspi.c int this commit:
https://github.com/curl/curl/commit/0d71b18153c8edb996738f8a362373fc72d0013b
In the description of the commit:
Quote:
- replace dynamic `InitSecurityInterface()` call with early binding and
link `secur32` system DLL.
The library and function are available in all supported curl Windows
targets, meaning WinXP or newer. Add small hack for mingw32ce to
make it build.

The library and function are available in secur32.lib. Without including that lib in a VS-project you will runinro link errors.
Back to top
tangent
Moderator


Joined: 16 Aug 2020
Posts: 394
Location: UK

PostPosted: Fri 25 Jul '25 15:54    Post subject: Reply with quote

Build dependency updates to include latest HTTPD 2.4.65 release:

CURL (8.15.0))
HTTPD (2.4.65)
LIBXML2 (2.14.5)

Other than release version details, there are no changes to the batch file build logic from before.
Back to top
Jan-E



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

PostPosted: Fri 25 Jul '25 16:18    Post subject: Reply with quote

Could you share the generated static and shared files (lib. dll, pdb if any) for curl 8.15.0, so I can test if they work for PHP?
Back to top
tangent
Moderator


Joined: 16 Aug 2020
Posts: 394
Location: UK

PostPosted: Fri 25 Jul '25 17:25    Post subject: Reply with quote

I've zipped up the following three curl 8.15.0 files, built with the CMake script, as curl-8.15.0-libs.zip

23/07/2025 20:27 762,368 libcurl.dll
23/07/2025 20:27 3,566,236 libcurl.lib
23/07/2025 20:27 21,338 libcurl_imp.lib

The file is downloadable from Limewire at https://limewire.com/d/dsdMz#UsuGPrtThH (this link will expire in 7 days).

Note, the CMake build HowTo currently doesn't create PDB files.

I'd be surprised if the static library works for you, as you say, because in Curl 8.15.0 the developers have chosen to rework the InitSecurityInterface() functionality to need secur32.lib.

I did try hacking the HTTPD CMakeLists.txt file, to link mod_md.so statically with libcurl.lib, and although that seemed to work, dumpbin shows the CMake build process still insists on including libcurl.dll, presumably through the import library.

Basically, the CMake build process for Windows favours a shared library approach.
Back to top
Jan-E



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

PostPosted: Fri 25 Jul '25 18:02    Post subject: Reply with quote

Thanks. Downloaded.
Back to top
tanquang



Joined: 21 Mar 2020
Posts: 73
Location: Vietnam

PostPosted: Mon 04 Aug '25 19:59    Post subject: Reply with quote

Can you add the wintty.exe build code?
Back to top
tangent
Moderator


Joined: 16 Aug 2020
Posts: 394
Location: UK

PostPosted: Wed 06 Aug '25 22:10    Post subject: Reply with quote

I've duly updated the build script to support wintty.exe, by patching the CMakeLists.txt file to include suitable build directives.

The HTTPD file set does include a Windows make file for wintty.exe, but this is incompatible with the CMake build (APR) file locations.
Back to top
tanquang



Joined: 21 Mar 2020
Posts: 73
Location: Vietnam

PostPosted: Thu 07 Aug '25 17:44    Post subject: Reply with quote

tangent wrote:
I've duly updated the build script to support wintty.exe, by patching the CMakeLists.txt file to include suitable build directives.

The HTTPD file set does include a Windows make file for wintty.exe, but this is incompatible with the CMake build (APR) file locations.


This script code:

Code:
...
  rem Patch CMakeLists.txt to add LUA_COMPAT_5_3 to compile options.
  rem
  perl -pi.bak -e ^" ^
    s~( LUA_BUILD_AS_DLL ^)(^\^)^)~${1}LUA_COMPAT_5_3 ${2}~; ^
    ^" CMakeLists.txt
...


As far as I understand it seems to be trying to replace "LUA_COMPAT_ALL" with "LUA_COMPAT_5_3" in this line of code:

Code:
...
target_compile_definitions ( libluadll PRIVATE _CRT_SECURE_NO_WARNINGS LUA_BUILD_AS_DLL LUA_COMPAT_ALL )
...


But it seems to have a syntax error so the replacement fails, in fact it still uses "LUA_COMPAT_ALL" when compiling.

P/s: I tried with both files "CMakeLists.txt for LUA 5.3" and "CMakeLists.txt for LUA 5.4", all failed to be replaced.
Back to top
tangent
Moderator


Joined: 16 Aug 2020
Posts: 394
Location: UK

PostPosted: Thu 07 Aug '25 22:14    Post subject: Reply with quote

Thanks for pointing this out.

This edit entry is a hangover from previous versions of CMakeLists.txt that were used to build older versions of LUA.

In fact the edit is trying to change the line:
    target_compile_definitions ( libluadll PRIVATE _CRT_SECURE_NO_WARNINGS LUA_BUILD_AS_DLL )
to
    target_compile_definitions ( libluadll PRIVATE _CRT_SECURE_NO_WARNINGS LUA_BUILD_AS_DLL LUA_COMPAT_5_3 )
which now fails since both CMakeLists.txt files referenced on PASTEBIN contain the line
    target_compile_definitions ( libluadll PRIVATE _CRT_SECURE_NO_WARNINGS LUA_BUILD_AS_DLL LUA_COMPAT_ALL )
Since the entry is benign, I'll remove it from the LUA build section next time the CMake HowTo gets updated.

Similarly, there's still an edit in the HTTPD section specifically for version 2.4.62, which is now several releases behind the curve. That will get removed at some point too...
Back to top
tanquang



Joined: 21 Mar 2020
Posts: 73
Location: Vietnam

PostPosted: Fri 08 Aug '25 1:05    Post subject: Reply with quote

tangent wrote:
Thanks for pointing this out.

This edit entry is a hangover from previous versions of CMakeLists.txt that were used to build older versions of LUA.

In fact the edit is trying to change the line:
    target_compile_definitions ( libluadll PRIVATE _CRT_SECURE_NO_WARNINGS LUA_BUILD_AS_DLL )
to
    target_compile_definitions ( libluadll PRIVATE _CRT_SECURE_NO_WARNINGS LUA_BUILD_AS_DLL LUA_COMPAT_5_3 )
which now fails since both CMakeLists.txt files referenced on PASTEBIN contain the line
    target_compile_definitions ( libluadll PRIVATE _CRT_SECURE_NO_WARNINGS LUA_BUILD_AS_DLL LUA_COMPAT_ALL )
Since the entry is benign, I'll remove it from the LUA build section next time the CMake HowTo gets updated.

Similarly, there's still an edit in the HTTPD section specifically for version 2.4.62, which is now several releases behind the curve. That will get removed at some point too...


As far as I checked in the source code of lua 5.4.8, LUA_COMPAT_ALL is no longer declared/used anywhere in the source code, while LUA_COMPAT_5_3 is still found in the luaconf.h file. So I'm not sure if LUA_COMPAT_ALL is still supported on lua 5.4.8 (but it doesn't cause errors when compiling).
Back to top
tanquang



Joined: 21 Mar 2020
Posts: 73
Location: Vietnam

PostPosted: Fri 08 Aug '25 1:12    Post subject: Reply with quote

This code:

Code:
...
  if /i "%CURL_USE_OPENSSL%" == "ON" (
    rem Patch lib\url.c to force use of native CA store on Windows.
    rem
    perl -pi.bak -0777 -Mopen=OUT,:raw -e ^" ^
    s~(return result;\n#endif$^)\n  }~${1} \n#if defined(USE_WIN32_CRYPTO^)\n^
    /* Mandate Windows CA store to be used */\n^
    if(\x21set-\x3Essl.primary.CAfile \x26\x26 \x21set-\x3Essl.primary.CApath^) {\n^
      /* User and environment did not specify any CA file or path.\n^
       */\n^
      set-\x3Essl.native_ca_store = TRUE;\n^
    }\n#endif\n  }~smg; ^
    ^" lib\url.c
  ) else (
    rem Remove above lib\url.c patch if present.
    rem
    perl -pi.bak -0777 -Mopen=OUT,:raw -e ^" ^
    s~(return result;\n#endif^) \n.+native_ca_store = TRUE;\n    }\n#endif\n~${1}\n~smg; ^
    ^" lib\url.c
  )
...


Also didn't work as expected, it didn't insert the code behind as expected (of course when "%CURL_USE_OPENSSL%" == "ON").

And this code:

Code:
...
  if /i "%CURL_USE_OPENSSL%" == "ON" if /i "%CURL_DEFAULT_SSL_BACKEND%" == "SCHANNEL" (
    rem Patch CMakeLists.txt to add a compiler definition for a default SSL backend of Schannel.
    rem
    perl -pi.bak -e ^" ^
      s~(USE_OPENSSL ON\^)^)\n~${1} \n  add_definitions(-DCURL_DEFAULT_SSL_BACKEND=\x22schannel\x22^)\n~m; ^
      ^" CMakeLists.txt
  ) else (
    rem Remove above CMakeLists.txt patch if present.
    rem
    perl -pi.bak -e ^" ^
      s~(USE_OPENSSL ON\^)^) \n~${1}\n~m; ^
      s~[ ]+add_definitions.+CURL_DEFAULT_SSL_BACKEND=.*\n~~m; ^
      ^" CMakeLists.txt
  )
...


Then it worked "beyond" the expected level. It inserted:
Code:

add_definitions(-DCURL_DEFAULT_SSL_BACKEND="schannel")

Incorrectly into AMIGA. I did a different comparison here.
Back to top
tangent
Moderator


Joined: 16 Aug 2020
Posts: 394
Location: UK

PostPosted: Sat 09 Aug '25 13:14    Post subject: Reply with quote

Many thanks for your observations.

When dependent packages are updated, I generally don't have time to review all the code changes, and normally just check that the CMake build process completes without error, and that Apache runs ok. It's only when issues crop up that I'll try and investigate further. To that end...

Re the LUA issue, checking back through previous versions it would seem LUA_COMPAT_ALL was used in the 5.2 series code, whilst LUA_COMPAT_5_1 and LUA_COMPAT_5_2 were used in the 5.3 series. LUA_COMPAT_5_3 appears in the 5.4 series.

Since the presence of these macros causes a number of compatibility features to be built, it makes sense to include these options, so I've updated the CMakeLists.txt edit to produce the line:
Code:
target_compile_definitions ( libluadll PRIVATE _CRT_SECURE_NO_WARNINGS LUA_BUILD_AS_DLL LUA_COMPAT_ALL LUA_COMPAT_5_1 LUA_COMPAT_5_2 LUA_COMPAT_5_3 )

This pedantic approach should cover compiling LUA 5.2, 5.3 and 5.4 series code.

Next CURL, which due to the complexity of the product has always been troublesome.

I've only created patches for specific issues, when they arise against a given release. I try to make patches unique, so if the edit no longer works due to revised code, to me that's a good thing, the result being benign.

The first CURL edit relates to patching lib\url.c to support using the native CA store on Windows with OpenSSL (as originally discussed in topic: https://www.apachelounge.com/viewtopic.php?p=39886 some 4 years ago). It would seem they've updated this code somewhat, by adding another #endif block nearby, so defeating the patch and break using the native CA store on Windows with OpenSSL. I've revised the patch accordingly.

Similarly, regarding the second patch relating to using SCHANNEL as the default SSL backend, the layout of the CURL CMakeLists.txt file has changed substantially since this patch was initially produced (against CURL release 7.74). Again, I've updated the patch accordingly.

Although I suspect most people will be using SCHANNEL on Windows, I always wanted this build of CURL to work cleanly with either SCHANNEL or OpenSSL, in support of mod_md.so (which requires CURL). Indeed, if both these SSL backends are available, then by default CURL chooses OpenSSL; hence the move to define a CURL_DEFAULT_SSL_BACKEND.

Note, with the patches in place both the following requests for a secure connection to letsencrypt should work:
Code:
C:\Apache24\bin>set CURL_SSL_BACKEND=schannel
C:\Apache24\bin>curl https://acme-v02.api.letsencrypt.org/directory
C:\Apache24\bin>set CURL_SSL_BACKEND=openssl
C:\Apache24\bin>curl https://acme-v02.api.letsencrypt.org/directory

I'll endeavour to test this area more carefully, with future updates to CURL.
Back to top
tanquang



Joined: 21 Mar 2020
Posts: 73
Location: Vietnam

PostPosted: Sun 10 Aug '25 13:35    Post subject: Reply with quote

Since you have compiled ZLIB before, when compiling LIBXML2 you should add:

Code:
-DLIBXML2_WITH_ZLIB=ON


To the CMAKE command line to enable ZLIB for LIBXML2 (this option is disabled by default as shown in the CMakeLists.txt of LIBXML2).

In addition, LIBXML2 also has an option LIBXML2_WITH_DEBUG which is enabled by default. Also add whether to enable this option like this:

Code:
IF /i "%BUILD_TYPE%" == "Release" (
   SET LIBXML2_DEBUG_MODULE=OFF
) ELSE (
   SET LIBXML2_DEBUG_MODULE=ON
)
CMAKE... -DLIBXML2_WITH_DEBUG=!LIBXML2_DEBUG_MODULE!


And in some previous versions, it seems that the LIBXML2_WITH_LZMA option was enabled by default (and it would cause compilation errors if liblzma was not present). But as far as I checked, on libxml2 2.14.5, this option is disabled by default.
It's better to add the option:
Code:
-DLIBXML2_WITH_LZMA=OFF

When compiling to ensure it's always disabled.

Quote:
Since the official liblzma doesn't seem to support compilation with cmake, if you want to enable this option, you might want to consider using an unofficial version of ImageMagick or ShiftMediaProject.
Back to top
tanquang



Joined: 21 Mar 2020
Posts: 73
Location: Vietnam

PostPosted: Sun 10 Aug '25 14:12    Post subject: Reply with quote

This logic code:
Code:
...
  rem Check if we're building APR-UTIL 1.6.3
  rem
  if not x%APR-UTIL:1.6.3=%==x:%APR-UTIL% (
        ...
  )
...


As long as the APR-UTIL variable is declared and not empty, it will always be true.

Why don't you use find (fast, for simple string) or findstr (for complex strings)?

P/s: This will probably also be true for the HTTPD logic code below:

Code:
...
if not x%HTTPD:2.4.62=%==x:%HTTPD% (
...


Quote:
I really don't think anyone is still using httpd 2.4.62 and earlier, so this patch should also be considered removed.


Last edited by tanquang on Sun 10 Aug '25 15:13; edited 3 times in total
Back to top
tanquang



Joined: 21 Mar 2020
Posts: 73
Location: Vietnam

PostPosted: Sun 10 Aug '25 15:08    Post subject: Reply with quote

By the way, I highly recommend editing this code:

Code:
...
  if /i "%CURL_USE_OPENSSL%" == "ON" (
    rem Patch lib\url.c to force use of native CA store on Windows.
    rem
    perl -pi.bak -0777 -Mopen=OUT,:raw -e ^" ^
    s~(return result;\n#endif\n#endif$^)\n  }~${1} \n#if defined(USE_WIN32_CRYPTO^)\n^
    /* Mandate Windows CA store to be used */\n^
    if(\x21set-\x3Essl.primary.CAfile \x26\x26 \x21set-\x3Essl.primary.CApath^) {\n^
      /* User and environment did not specify any CA file or path.\n^
       */\n^
      set-\x3Essl.native_ca_store = TRUE;\n^
    }\n#endif\n  }~smg; ^
    ^" lib\url.c
  )
...


Put the comments in this code on the same line (like the way the file used to):

Code:
...
  if /i "%CURL_USE_OPENSSL%" == "ON" (
    rem Patch lib\url.c to force use of native CA store on Windows.
    rem
    perl -pi.bak -0777 -Mopen=OUT,:raw -e ^" ^
    s~(return result;\n#endif\n#endif$^)\n  }~${1} \n#if defined(USE_WIN32_CRYPTO^)\n^
    /* Mandate Windows CA store to be used */\n^
    if(\x21set-\x3Essl.primary.CAfile \x26\x26 \x21set-\x3Essl.primary.CApath^) {\n^
      /* User and environment did not specify any CA file or path */\n^
      set-\x3Essl.native_ca_store = TRUE;\n^
    }\n#endif\n  }~smg; ^
    ^" lib\url.c
  )
...
Back to top
tanquang



Joined: 21 Mar 2020
Posts: 73
Location: Vietnam

PostPosted: Sun 10 Aug '25 20:04    Post subject: Reply with quote

When I compile to httpd I see it shows:

Code:
...
--   Modules not built:
--     mod_socache_dc
--     mod_charset_lite
...


With mod_socache_dc, I see in CMakeList.txt marked as AN_UNIMPLEMENTED_SUPPORT_LIBRARY_REQUIREMENT, so ignore it.

But with mod_charset_lite it seems to be requiring APR_HAS_XLATE? I haven't tried compiling this so don't know how it is. Could you consider adding it (if simple)?
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, 4, 5  Next