You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2026/02/17 00:19:24 UTC
[Bug 69954] New: mod_md is no longer compatible with APR-1.7.6
https://bz.apache.org/bugzilla/show_bug.cgi?id=69954
Bug ID: 69954
Summary: mod_md is no longer compatible with APR-1.7.6
Product: Apache httpd-2
Version: 2.4.66
Hardware: All
OS: All
Status: NEW
Severity: blocker
Priority: P2
Component: Build
Assignee: bugs@httpd.apache.org
Reporter: baobaoxich@gmail.com
Target Milestone: ---
In the latest version 2.4.66, the mod_md compilation process encounters the
following error:
[ 40%] Linking C shared library mod_md.so
LINK: command
"C:\PROGRA~2\MICROS~2\2019\BUILDT~1\VC\Tools\MSVC\1429~1.301\bin\Hostx86\x86\link.exe
/nologo @CMakeFiles\mod_md.dir\objects1.rsp /out:mod_md.so /implib:mod_md.lib
/pdb:C:\httpd\mod_md.pdb /dll /version:0.0
/base:@C:/httpd/BaseAddr.ref,mod_md.so /machine:X86 /INCREMENTAL:NO
\phpStudy\Apache\lib\libssl.lib \phpStudy\Apache\lib\libcrypto.lib
\phpStudy\Apache\lib\libcurl_imp.lib \phpStudy\Apache\lib\jansson.lib
mod_watchdog.lib libhttpd.lib \phpStudy\Apache\lib\libapr-1.lib
\phpStudy\Apache\lib\libaprutil-1.lib \phpStudy\Apache\lib\apr_ldap-1.lib
ws2_32.lib mswsock.lib \phpStudy\Apache\lib\pcre.lib ws2_32.lib mswsock.lib
kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib
oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST
/MANIFESTFILE:mod_md.so.manifest" failed (exit code 1120) with the following
output:
Creating library mod_md.lib and object mod_md.exp
md_util.c.obj : error LNK2001: unresolved external symbol _apr_natcasecmp
mod_md_config.c.obj : error LNK2001: unresolved external symbol _apr_natcasecmp
md_curl.c.obj : error LNK2001: unresolved external symbol _apr_natcasecmp
md_crypt.c.obj : error LNK2001: unresolved external symbol _apr_natcasecmp
md_reg.c.obj : error LNK2001: unresolved external symbol _apr_natcasecmp
md_store.c.obj : error LNK2001: unresolved external symbol _apr_natcasecmp
md_acme.c.obj : error LNK2001: unresolved external symbol _apr_natcasecmp
md_acme_authz.c.obj : error LNK2001: unresolved external symbol _apr_natcasecmp
md_acmev2_drive.c.obj : error LNK2001: unresolved external symbol
_apr_natcasecmp
md_core.c.obj : error LNK2001: unresolved external symbol _apr_natcasecmp
mod_md.so : fatal error LNK1120: 1 unresolved externals
This bug appeared to have been fixed in Commit 8d1c300 and did not reappear in
version 2.4.65, but it returned in version 2.4.66.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 69954] mod_md is no longer compatible with APR-1.7.6
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69954
--- Comment #2 from Tần Quảng <ba...@gmail.com> ---
To be sure, I re-downloaded the latest APR 1.7.6 source code from the download
page. This error is indeed due to the use of "apr_natcasecmp".
In version 1.7.6, there is no function named "apr_natcasecmp" declared, but
there is a function named "apr_cstr_casecmp" declared in the file
"apr-1.7.6\strings\apr_cstr.c".
As for Commit 8d1c300:
#if APR_VERSION_AT_LEAST(1,6,0)
#include <apr_cstr.h> // Expected: Use the "apr_natcasecmp" function?
// Actual: Only the "apr_cstr_casecmp" function is
present.
#else
/* Define a (poor) backward-compatibility entry point for
* apr_cstr_casecmp() from APR 1.6. */
#define apr_cstr_casecmp apr_natcasecmp // declare the "apr_cstr_casecmp"
function as "apr_natcasecmp"
#endif
If so, it is correct that mod_md must use the "apr_cstr_casecmp" function on
all new APR versions.
But to be sure, I tested it on Apr 1.5.2 (checking the #else branch).
Surprisingly, there are no functions named "apr_natcasecmp" or
"apr_cstr_casecmp" in this version, but the file
"apr-1.5.2\strings\apr_strnatcmp.c" contains a declaration for the function
"apr_strnatcasecmp".
In short, Commit 8d1c300 incorrectly declared "modules/md/md_util.h":
https://github.com/apache/httpd/commit/8d1c300644314d5011b647d589a7f51814e9d8d7#diff-be7c432d2dff884e7227f0ee69b8d94239ebf1d8fd0ea340ab15e338f34aa448
It should be:
#if APR_VERSION_AT_LEAST(1,6,0)
#include <apr_cstr.h> // ok, use apr_cstr_casecmp
#else
/* Define a (poor) backwards-compatibility entry point for
* apr_cstr_casecmp() from APR 1.6. */
#define apr_cstr_casecmp apr_strnatcasecmp // apr_strnatcasecmp not
apr_natcasecmp
#endif
Then, "apr_cstr_casecmp" should be used for mod_md.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 69954] mod_md is no longer compatible with APR-1.7.6
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69954
--- Comment #11 from Tần Quảng <ba...@gmail.com> ---
That's right, it was my mistake, I confused apr_strnatcasecmp with
apr_natcasecmp.
This bug has been fixed by Commit d8db1f8:
https://github.com/apache/httpd/commit/d8db1f875514d47e7830471f2aae9d21671811c8
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 69954] mod_md is no longer compatible with APR-1.7.6
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69954
Ruediger Pluem <rp...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |FixedInTrunk,
| |PatchAvailable
--- Comment #3 from Ruediger Pluem <rp...@apache.org> ---
Thanks for the fix. Committed to trunk as r1931911.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 69954] mod_md is no longer compatible with APR-1.7.6
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69954
--- Comment #4 from Ruediger Pluem <rp...@apache.org> ---
The corresponding git link to r1931911 is
https://github.com/apache/httpd/commit/d8db1f875514d47e7830471f2aae9d21671811c8.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 69954] mod_md is no longer compatible with APR-1.7.6
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69954
--- Comment #5 from Joe Orton <jo...@redhat.com> ---
Sorry Stefan my bad :(
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 69954] mod_md is no longer compatible with APR-1.7.6
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69954
--- Comment #8 from Tần Quảng <ba...@gmail.com> ---
And check with mod_autoindex as well; I see it's also using
"apr_strnatcasecmp":
https://github.com/apache/httpd/blob/trunk/modules/generators/mod_autoindex.c#L2004C22-L2004C40
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 69954] mod_md is no longer compatible with APR-1.7.6
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69954
--- Comment #6 from Stefan Eissing <st...@eissing.org> ---
All fine, Joe.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 69954] mod_md is no longer compatible with APR-1.7.6
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69954
--- Comment #1 from Stefan Eissing <st...@eissing.org> ---
It seems your build sees old ARP header files. The code in mod_md does:
#if APR_VERSION_AT_LEAST(1,6,0)
#include <apr_cstr.h>
#else
/* Define a (poor) backwards-compatibility entry point for
* apr_cstr_casecmp() from APR 1.6. */
#define apr_cstr_casecmp apr_natcasecmp
#endif
Since the symbol apr_natcasecmp turns up in the module, the APR version check
saw the wrong version?
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 69954] mod_md is no longer compatible with APR-1.7.6
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69954
Tần Quảng <ba...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #9 from Tần Quảng <ba...@gmail.com> ---
Fixed by Commit d8db1f8:
https://github.com/apache/httpd/commit/d8db1f875514d47e7830471f2aae9d21671811c8
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 69954] mod_md is no longer compatible with APR-1.7.6
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69954
Tần Quảng <ba...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|Build |mod_md
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 69954] mod_md is no longer compatible with APR-1.7.6
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69954
--- Comment #7 from Tần Quảng <ba...@gmail.com> ---
Please remember to update the mod_md source code to use "apr_cstr_casecmp".
"apr_natcasecmp" (typo?) / "apr_strnatcasecmp" is not available on apr 1.6.0+.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 69954] mod_md is no longer compatible with APR-1.7.6
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69954
--- Comment #10 from Joe Orton <jo...@redhat.com> ---
(In reply to Tần Quảng from comment #8)
> And check with mod_autoindex as well; I see it's also using
> "apr_strnatcasecmp":
> https://github.com/apache/httpd/blob/trunk/modules/generators/mod_autoindex.
> c#L2004C22-L2004C40
This is exactly the case which apr_strnatcasecmp() exists for - natural sort
order of filenames in the UI.
And for penance I'm adding CI test build against the older APR which correctly
fails if that commit is reverted as per
https://github.com/apache/httpd/actions/runs/22304542693/job/64520378411#step:11:3804
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org