Mailing List Archive

[Bug 65602] Failed linking C shared library mod_md.so
https://bz.apache.org/bugzilla/show_bug.cgi?id=65602

T?n Qu?ng <baobaoxich@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 [ In reply to ]
https://bz.apache.org/bugzilla/show_bug.cgi?id=65602

--- Comment #8 from Stefan Eissing <icing@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 [ In reply to ]
https://bz.apache.org/bugzilla/show_bug.cgi?id=65602

--- Comment #9 from Stefan Eissing <icing@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 [ In reply to ]
https://bz.apache.org/bugzilla/show_bug.cgi?id=65602

T?n Qu?ng <baobaoxich@gmail.com> changed:

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

--- Comment #10 from T?n Qu?ng <baobaoxich@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