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 2021/09/28 11:10:51 UTC

[Bug 65602] New: Failed linking C shared library mod_md.so

https://bz.apache.org/bugzilla/show_bug.cgi?id=65602

            Bug ID: 65602
           Summary: Failed linking C shared library mod_md.so
           Product: Apache httpd-2
           Version: 2.4.49
          Hardware: PC
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: Build
          Assignee: bugs@httpd.apache.org
          Reporter: baobaoxich@gmail.com
  Target Milestone: ---

This bug comes from at least version 2.4.48, but to the current version is
still not fixed.
Before compiling Apache httpd-2, I have successfully compiled (also compile
order) before using CMAKE (3.21.3): zlib (1.2.11), PCRE (8.45), Expat ( 2.4.1),
OpenSSL (1.1.1l), libxml2 (2.9.12), jansson (2.14), Brotli (1.0.9), Lua
(5.4.3), APR (1.7.0), APR-Util (1.6) .1), Nghttp2 (1.45.1), cURL (7.79.1).
With cURL, I compiled both dynamic libraries (before) and static libraries
(after).
But when comes to Apache httpd-2 compile:

...
--
-- Summary of feature detection:
--
-- LIBXML2_FOUND ............ : TRUE
-- LUA51_FOUND .............. : TRUE
-- NGHTTP2_FOUND ............ : TRUE
-- OPENSSL_FOUND ............ : TRUE
-- ZLIB_FOUND ............... : TRUE
-- BROTLI_FOUND ............. : TRUE
-- CURL_FOUND ............... : TRUE
-- JANSSON_FOUND ............ : TRUE
-- APR_HAS_LDAP ............. : TRUE
-- APR_HAS_XLATE ............ : FALSE
-- APU_HAVE_CRYPTO .......... : TRUE
--
...
--
--
-- Apache httpd configuration summary:
--
--   Build type ...................... : Release
--   Install .pdb (if available)...... : OFF
--   Install manual .................. : ON
--   Install prefix .................. : /phpStudy/Apache
--   C compiler ...................... : C:/Program Files (x86)/Microsoft
Visual Studio 12.0/VC/bin/cl.exe
--   APR include directory ........... : /phpStudy/Apache/include
--   APR libraries ................... :
/phpStudy/Apache/lib/libapr-1.lib;/phpStudy/Apache/lib/libaprutil-1.lib;/phpStudy/Apache/lib/apr_ldap1.lib
--   OpenSSL include directory ....... : /phpStudy/Apache/include
--   OpenSSL libraries ............... :
/phpStudy/Apache/lib/libssl.lib;/phpStudy/Apache/lib/libcrypto.lib
--   PCRE include directory .......... : /phpStudy/Apache/include
--   PCRE libraries .................. : /phpStudy/Apache/lib/pcre.lib
--   libxml2 iconv prereq include dir. :
--   libxml2 iconv prereq libraries .. :
--   Brotli include directory......... : /phpStudy/Apache/include
--   Brotli libraries ................ :
/phpStudy/Apache/lib/brotlienc.lib;/phpStudy/Apache/lib/brotlicommon.lib
--   Curl include directory........... :
--   Jansson libraries ............... : /phpStudy/Apache/lib/jansson.lib
--   Extra include directories ....... :
--   Extra compile flags ............. :
--   Extra libraries ................. :

Then I use nmake:

...
[ 40%] Building C object CMakeFiles/mod_md.dir/modules/md/mod_md_ocsp.c.obj
mod_md_ocsp.c
[ 40%] Building RC object CMakeFiles/mod_md.dir/build/win32/httpd.rc.res
Microsoft (R) Windows (R) Resource Compiler Version 6.3.9600.17336
Copyright (C) Microsoft Corporation.  All rights reserved.

[ 40%] Linking C shared library mod_md.so
LINK: command "C:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\bin\link.exe /nologo @CMakeFiles\mod_md.dir\objects1.rsp /out:mod_md.so
/implib:mod_md.lib /pdb:C:\httpd\bin\mod_md.pdb /dll /version:0.0
/base:@C:/httpd/bin/BaseAddr.ref,mod_md.so /machine:X86 /INCREMENTAL:NO
\phpStudy\Apache\lib\libssl.lib \phpStudy\Apache\lib\libcrypto.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_curl.c.obj : error LNK2019: unresolved external symbol
__imp__curl_global_init referenced in function _md_curl_init
md_curl.c.obj : error LNK2019: unresolved external symbol
__imp__curl_slist_append referenced in function _curlify_headers
md_curl.c.obj : error LNK2019: unresolved external symbol
__imp__curl_slist_free_all referenced in function _md_curl_req_cleanup
md_curl.c.obj : error LNK2019: unresolved external symbol
__imp__curl_easy_strerror referenced in function _md_curl_perform
md_curl.c.obj : error LNK2019: unresolved external symbol
__imp__curl_easy_initreferenced in function _internals_setup
md_curl.c.obj : error LNK2019: unresolved external symbol
__imp__curl_easy_setopt referenced in function _internals_setup
md_curl.c.obj : error LNK2019: unresolved external symbol
__imp__curl_easy_perform referenced in function _md_curl_perform
md_curl.c.obj : error LNK2019: unresolved external symbol
__imp__curl_easy_cleanup referenced in function _md_curl_req_cleanup
md_curl.c.obj : error LNK2019: unresolved external symbol
__imp__curl_easy_getinfo referenced in function _md_curl_perform
md_curl.c.obj : error LNK2019: unresolved external symbol
__imp__curl_multi_init referenced in function _md_curl_multi_perform
md_curl.c.obj : error LNK2019: unresolved external symbol
__imp__curl_multi_add_handle referenced in function _md_curl_multi_perform
md_curl.c.obj : error LNK2019: unresolved external symbol
__imp__curl_multi_remove_handle referenced in function _md_curl_multi_perform
md_curl.c.obj : error LNK2019: unresolved external symbol
__imp__curl_multi_wait referenced in function _md_curl_multi_perform
md_curl.c.obj : error LNK2019: unresolved external symbol
__imp__curl_multi_perform referenced in function _md_curl_multi_perform
md_curl.c.obj : error LNK2019: unresolved external symbol
__imp__curl_multi_cleanup referenced in function _md_curl_multi_perform
md_curl.c.obj : error LNK2019: unresolved external symbol
__imp__curl_multi_info_read referenced in function _md_curl_multi_perform
md_curl.c.obj : error LNK2019: unresolved external symbol
__imp__curl_multi_strerror referenced in function _md_curl_multi_perform
mod_md.so : fatal error LNK1120: 17 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files\CMake\bin\cmake.exe"' : return
code '0xffffffff'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.

I started getting this error from version 2.4.48 until now, version 2.4.46
before this error does not occur.

-- 
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 65602] Failed linking C shared library mod_md.so

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65602

--- Comment #9 from Stefan Eissing <ic...@apache.org> ---
Another thing you might try:

Make a local cmake project of your own, some simple hello world thing that
links libcurl. See if you can get that working on your system.

Then we can analyse the differences in your CMakeLists.txt and the one in
Apache.

-- 
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 65602] Failed linking C shared library mod_md.so

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65602

Tần Quảng <ba...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INFORMATIONPROVIDED
             Status|NEW                         |RESOLVED

--- Comment #10 from Tần Quảng <ba...@gmail.com> ---
(In reply to Stefan Eissing from comment #9)
> Another thing you might try:
> 
> Make a local cmake project of your own, some simple hello world thing that
> links libcurl. See if you can get that working on your system.
> 
> Then we can analyse the differences in your CMakeLists.txt and the one in
> Apache.

Hello, I tried to create a topic according to your instructions on Apache
Lounge. Topic link here: https://www.apachelounge.com/viewtopic.php?p=41211
First, I don't know the syntax used in CMake, so I will use the syntax in Java
to explain.
The cause of the error is due to the CURL_INCLUDE_DIR and CURL_LIBRARIES
variables in CMakeLists.txt file which are declared but not have been
initialized. That is why CMake has not been able to find the directory and
library file of cURL (Unless you manually indicate the path by
-DCURL_INCLUDE_DIR and -DCURL_LIBRARY like the way of nono303).
I tried to change a bit, namely the value SET for CURL_INCLUDE_DIR and
CURL_LIBRARIES variables inside the CMakeLists.txt file (please see the
difference between the default version and the version I changed here:
https://www.diffchecker.com/Jre9F4Gr). And praiseworthy, it found cURL and
conducted normal compilation!
Anyway, I hope you can update this change to fix the problem with cURL in the
next versions.

-- 
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 65602] Failed linking C shared library mod_md.so

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65602

--- Comment #5 from Tần Quảng <ba...@gmail.com> ---
Created attachment 38050
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=38050&action=edit
Here is the CURLConfig.cmake file after I compiled 2 times (Dynamic and Static
Libraries).

Here is the CURLConfig.cmake file after I compiled 2 times (Dynamic and Static
Libraries).

-- 
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 65602] Failed linking C shared library mod_md.so

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65602

--- Comment #4 from Stefan Eissing <ic...@apache.org> ---
Something is fishy.

What does the file '/phpStudy/Apache/lib/cmake/CURL/CURLConfig.cmake' contain?

-- 
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 65602] Failed linking C shared library mod_md.so

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65602

Stefan Eissing <ic...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
             Status|NEW                         |NEEDINFO

--- Comment #1 from Stefan Eissing <ic...@apache.org> ---
In the call to 'link.exe' I see all libraries except libcurl. Does this somehow
not get picked up by cmake correctly? I am unware of any changes.

-- 
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 65602] Failed linking C shared library mod_md.so

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65602

Tần Quảng <ba...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P4
            Version|2.4.49                      |2.4.53

-- 
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 65602] Failed linking C shared library mod_md.so

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65602

--- Comment #7 from Tần Quảng <ba...@gmail.com> ---
The latest version (2.4.52) has not fixed this error yet, I tried to build on
this version, it (seemingly) has not detected the curl path.

-- 
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 65602] Failed linking C shared library mod_md.so

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65602

--- Comment #8 from Stefan Eissing <ic...@apache.org> ---
I am not a cmake export, but if you look at your logs, you see that '
jansson.lib' is appearing, but there is no 'curl.lib' anywhere to be seen.

If the linking is called without any curl.lib, it will fail obviously as you
describe with missing curl symbols.

Looking at CMakeList.txt, the linking of mod_md is defined with

SET(mod_md_extra_libs                ${OPENSSL_LIBRARIES} ${CURL_LIBRARIES}
${JANSSON_LIBRARIES} mod_watchdog)

so it seems that the Cmake variable $CURL_LIBRARIES is empty on your system.


As you mentioned, you seem to get this somewhat working by adding libcurl
*explicitly*:

#470 SET(mod_md_extra_libs                              ${OPENSSL_LIBRARIES}
${CURL_LIBRARIES} ${JANSSON_LIBRARIES} mod_watchdog libcurl)
...

Which means that you curl cmake setup is somehow wrong. This looks like a
problem on your system. It does not look like a bug in the Apache httpd
software.

If stackoverflow is not helpful, maybe you can find other cmake users on
https://www.apachelounge.com

-- 
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 65602] Failed linking C shared library mod_md.so

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65602

Tần Quảng <ba...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|INFORMATIONPROVIDED         |---
             Status|RESOLVED                    |REOPENED

--- Comment #11 from Tần Quảng <ba...@gmail.com> ---
Hello, I tried compiling the latest version (2.4.57), but this error still
occurs.
As I reported earlier, the cURL variables in the "CMakeLists.txt" file were
declared but not assigned values, which led to this bug.
I've made some changes to the "CMakeLists.txt" file that automatically finds
and assigns values to cURL variables to resolve compilation errors related to
this bug (without having to recompile cURL again during HTTPd compilation).
Here is the link to the file "CMakeLists.txt" after I edited and successfully
fixed this bug: https://pastebin.com/kCTmeUyv
I also created a pull request on GitHub, if you're a maintainer, can you test
and merge it? Link to pull request: https://github.com/apache/httpd/pull/356
Thank you.

-- 
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 65602] Failed linking C shared library mod_md.so

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65602

Tần Quảng <ba...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #6 from Tần Quảng <ba...@gmail.com> ---
Well, I asked create a question about this on StackOverflow, no in-depth
solution was given. But there is a solution like this:

At line #46 of the CMakeLists.txt file add:
...
#46 add_subdirectory(srclib/curl)
...
At line #470 of the CMakeLists.txt file add "libcurl":
...
#470 SET(mod_md_extra_libs                              ${OPENSSL_LIBRARIES}
${CURL_LIBRARIES} ${JANSSON_LIBRARIES} mod_watchdog libcurl)
...
However, as noted above, this is not a good solution because doing so cURL will
be rebuilt again (even though it has been compiled twice before) during HTTPD
compilation.

-- 
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 65602] Failed linking C shared library mod_md.so

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65602

--- Comment #3 from Tần Quảng <ba...@gmail.com> ---
(In reply to Tần Quảng from comment #2)
> (In reply to Stefan Eissing from comment #1)
> > In the call to 'link.exe' I see all libraries except libcurl. Does this
> > somehow not get picked up by cmake correctly? I am unware of any changes.
> 
> I don't know why, I'll upload my compiled command line. When compiling to
> Apache HTTPD, even though the command prompt shows the path to cURL has been
> found:
> 
> -- The C compiler identification is MSVC 18.0.40629.0
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual
> Studio 12.0/VC/bin/cl.exe - skipped
> -- Detecting C compile features
> -- Detecting C compile features - done
> CMake Deprecation Warning at CMakeLists.txt:20 (CMAKE_MINIMUM_REQUIRED):
>   Compatibility with CMake < 2.8.12 will be removed from a future version of
>   CMake.
> 
>   Update the VERSION argument <min> value or use a ...<max> suffix to tell
>   CMake that the project does not need compatibility with older versions.
> 
> 
> -- Found LibXml2: /phpStudy/Apache/lib/libxml2.lib (found version "2.9.12")
> -- Found Lua51: /phpStudy/Apache/lib/lua.lib (found version "")
> -- Found OpenSSL: /phpStudy/Apache/lib/libcrypto.lib (found version "1.1.1l")
> -- Found ZLIB: /phpStudy/Apache/lib/zlib.lib (found version "1.2.11")
> -- Found CURL: /phpStudy/Apache/lib/cmake/CURL/CURLConfig.cmake (found
> version "7.79.1")
> -- Looking for APR_HAS_XLATE
> -- Looking for APR_HAS_XLATE - found
> -- Performing Test APR_HAS_XLATE
> -- Performing Test APR_HAS_XLATE - Failed
> -- Looking for APU_HAVE_CRYPTO
> -- Looking for APU_HAVE_CRYPTO - found
> -- Performing Test APU_HAVE_CRYPTO
> -- Performing Test APU_HAVE_CRYPTO - Success
> -- Performing Test APR_HAS_LDAP
> -- Performing Test APR_HAS_LDAP - Success
> --
> -- Summary of feature detection:
> --
> -- LIBXML2_FOUND ............ : TRUE
> -- LUA51_FOUND .............. : TRUE
> -- NGHTTP2_FOUND ............ : TRUE
> -- OPENSSL_FOUND ............ : TRUE
> -- ZLIB_FOUND ............... : TRUE
> -- BROTLI_FOUND ............. : TRUE
> -- CURL_FOUND ............... : TRUE
> -- JANSSON_FOUND ............ : TRUE
> -- APR_HAS_LDAP ............. : TRUE
> -- APR_HAS_XLATE ............ : FALSE
> -- APU_HAVE_CRYPTO .......... : TRUE
> --
> ...
> 
> But in "Apache httpd configuration summary", the "Curl include directory"
> entry still shows as empty:
> 
> -- mod_socache_dc was requested but couldn't be built due to a missing
> prerequisite (AN_UNIMPLEMENTED_SUPPORT_LIBRARY_REQUIREMENT)
> -- mod_charset_lite was requested but couldn't be built due to a missing
> prerequ
> isite (APR_HAS_XLATE)
> --
> --
> -- Apache httpd configuration summary:
> --
> --   Build type ...................... : Release
> --   Install .pdb (if available)...... : OFF
> --   Install manual .................. : ON
> --   Install prefix .................. : /phpStudy/Apache
> --   C compiler ...................... : C:/Program Files (x86)/Microsoft
> Visual Studio 12.0/VC/bin/cl.exe
> --   APR include directory ........... : /phpStudy/Apache/include
> --   APR libraries ................... :
> /phpStudy/Apache/lib/libapr-1.lib;/phpStudy/Apache/lib/libaprutil-1.lib;/
> phpStudy/Apache/lib/apr_ldap-1.lib
> --   OpenSSL include directory ....... : /phpStudy/Apache/include
> --   OpenSSL libraries ............... :
> /phpStudy/Apache/lib/libssl.lib;/phpStudy/Apache/lib/libcrypto.lib
> --   PCRE include directory .......... : /phpStudy/Apache/include
> --   PCRE libraries .................. : /phpStudy/Apache/lib/pcre.lib
> --   libxml2 iconv prereq include dir. :
> --   libxml2 iconv prereq libraries .. :
> --   Brotli include directory......... : /phpStudy/Apache/include
> --   Brotli libraries ................ :
> /phpStudy/Apache/lib/brotlienc.lib;/phpStudy/Apache/lib/brotlicommon.lib
> --   Curl include directory........... :
> --   Jansson libraries ............... : /phpStudy/Apache/lib/jansson.lib
> --   Extra include directories ....... :
> --   Extra compile flags ............. :
> --   Extra libraries ................. :
> 
> And the compiler still got the error and stopped at [ 40%] Linking C shared
> library mod_md.so.
> Here is my compile command line:
> https://drive.google.com/file/d/1suH_SJOTcw-t7tdqd7jt2Scxa5G8SxNX/
> view?usp=sharing
> I tried comparing 2 CMakeLists.txt files of 2 versions 2.4.46 and 2.4.49:
> https://www.diffchecker.com/FQiaZzbr
> There is a slight change in SET(mod_md_extra_sources and
> SET(LIBHTTPD_SOURCES in both CMakeLists.txt files of Apache HTTPD source
> code.
> Before compiling, I also uncommented right after the "getting duplicate
> manifest error with ApacheMonitor" line in the CMakeLists.txt file (after
> line 901) of the Apache HTTPD source code.
> I remember one thing: In version 2.4.46 there seems to also be an error
> during compilation but I don't remember in which module, the fix is to
> replace SET(mod_md_requires OPENSSL_FOUND CURL_FOUND JANSSON_FOUND) to
> SET(mod_md_requires CURL_FOUND) ) in the CMakeLists.txt file (remove
> OPENSSL_FOUND and JANSSON_FOUND) but this seems to have stopped working from
> version 2.4.48!

The "bin" directory is a directory I created for convenience during
compilation. I've tried compiling directly at the root of the source code
(instead of compiling into the "bin" directory) but that didn't fix anything
either.

-- 
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 65602] Failed linking C shared library mod_md.so

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65602

--- Comment #2 from Tần Quảng <ba...@gmail.com> ---
(In reply to Stefan Eissing from comment #1)
> In the call to 'link.exe' I see all libraries except libcurl. Does this
> somehow not get picked up by cmake correctly? I am unware of any changes.

I don't know why, I'll upload my compiled command line. When compiling to
Apache HTTPD, even though the command prompt shows the path to cURL has been
found:

-- The C compiler identification is MSVC 18.0.40629.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio
12.0/VC/bin/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Deprecation Warning at CMakeLists.txt:20 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Found LibXml2: /phpStudy/Apache/lib/libxml2.lib (found version "2.9.12")
-- Found Lua51: /phpStudy/Apache/lib/lua.lib (found version "")
-- Found OpenSSL: /phpStudy/Apache/lib/libcrypto.lib (found version "1.1.1l")
-- Found ZLIB: /phpStudy/Apache/lib/zlib.lib (found version "1.2.11")
-- Found CURL: /phpStudy/Apache/lib/cmake/CURL/CURLConfig.cmake (found version
"7.79.1")
-- Looking for APR_HAS_XLATE
-- Looking for APR_HAS_XLATE - found
-- Performing Test APR_HAS_XLATE
-- Performing Test APR_HAS_XLATE - Failed
-- Looking for APU_HAVE_CRYPTO
-- Looking for APU_HAVE_CRYPTO - found
-- Performing Test APU_HAVE_CRYPTO
-- Performing Test APU_HAVE_CRYPTO - Success
-- Performing Test APR_HAS_LDAP
-- Performing Test APR_HAS_LDAP - Success
--
-- Summary of feature detection:
--
-- LIBXML2_FOUND ............ : TRUE
-- LUA51_FOUND .............. : TRUE
-- NGHTTP2_FOUND ............ : TRUE
-- OPENSSL_FOUND ............ : TRUE
-- ZLIB_FOUND ............... : TRUE
-- BROTLI_FOUND ............. : TRUE
-- CURL_FOUND ............... : TRUE
-- JANSSON_FOUND ............ : TRUE
-- APR_HAS_LDAP ............. : TRUE
-- APR_HAS_XLATE ............ : FALSE
-- APU_HAVE_CRYPTO .......... : TRUE
--
...

But in "Apache httpd configuration summary", the "Curl include directory" entry
still shows as empty:

-- mod_socache_dc was requested but couldn't be built due to a missing
prerequisite (AN_UNIMPLEMENTED_SUPPORT_LIBRARY_REQUIREMENT)
-- mod_charset_lite was requested but couldn't be built due to a missing
prerequ
isite (APR_HAS_XLATE)
--
--
-- Apache httpd configuration summary:
--
--   Build type ...................... : Release
--   Install .pdb (if available)...... : OFF
--   Install manual .................. : ON
--   Install prefix .................. : /phpStudy/Apache
--   C compiler ...................... : C:/Program Files (x86)/Microsoft
Visual Studio 12.0/VC/bin/cl.exe
--   APR include directory ........... : /phpStudy/Apache/include
--   APR libraries ................... :
/phpStudy/Apache/lib/libapr-1.lib;/phpStudy/Apache/lib/libaprutil-1.lib;/phpStudy/Apache/lib/apr_ldap-1.lib
--   OpenSSL include directory ....... : /phpStudy/Apache/include
--   OpenSSL libraries ............... :
/phpStudy/Apache/lib/libssl.lib;/phpStudy/Apache/lib/libcrypto.lib
--   PCRE include directory .......... : /phpStudy/Apache/include
--   PCRE libraries .................. : /phpStudy/Apache/lib/pcre.lib
--   libxml2 iconv prereq include dir. :
--   libxml2 iconv prereq libraries .. :
--   Brotli include directory......... : /phpStudy/Apache/include
--   Brotli libraries ................ :
/phpStudy/Apache/lib/brotlienc.lib;/phpStudy/Apache/lib/brotlicommon.lib
--   Curl include directory........... :
--   Jansson libraries ............... : /phpStudy/Apache/lib/jansson.lib
--   Extra include directories ....... :
--   Extra compile flags ............. :
--   Extra libraries ................. :

And the compiler still got the error and stopped at [ 40%] Linking C shared
library mod_md.so.
Here is my compile command line:
https://drive.google.com/file/d/1suH_SJOTcw-t7tdqd7jt2Scxa5G8SxNX/view?usp=sharing
I tried comparing 2 CMakeLists.txt files of 2 versions 2.4.46 and 2.4.49:
https://www.diffchecker.com/FQiaZzbr
There is a slight change in SET(mod_md_extra_sources and SET(LIBHTTPD_SOURCES
in both CMakeLists.txt files of Apache HTTPD source code.
Before compiling, I also uncommented right after the "getting duplicate
manifest error with ApacheMonitor" line in the CMakeLists.txt file (after line
901) of the Apache HTTPD source code.
I remember one thing: In version 2.4.46 there seems to also be an error during
compilation but I don't remember in which module, the fix is to replace
SET(mod_md_requires OPENSSL_FOUND CURL_FOUND JANSSON_FOUND) to
SET(mod_md_requires CURL_FOUND) ) in the CMakeLists.txt file (remove
OPENSSL_FOUND and JANSSON_FOUND) but this seems to have stopped working from
version 2.4.48!

-- 
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