[ 
https://issues.apache.org/jira/browse/XERCESC-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17052551#comment-17052551
 ] 

Fabrice Fontaine commented on XERCESC-2156:
-------------------------------------------

>From my experience, cmake does not really support or care about static 
>linking. FindCURL.cmake (which is provided by upstream cmake: 
>[https://github.com/Kitware/CMake/blob/master/Modules/FindCURL.cmake)] already 
>uses pkg-config but instead of retrieving the libraries from it (-lcurl but 
>also -lssl, -lcrypto, -lz, -latomic ...), it just uses PC_CURL_LIBRARY_DIRS as 
>an hint to find and save -lcurl library in CURL_LIBRAR\{Y,IES}.

Moreover, even if we could convince upstream to update FindCURL.cmake, it will 
only be fixed in an upcoming release and so users using old cmake will still 
have build failures when linking statically with curl.

So, at the end, from my perspective, there is two options:
 * This patch is merged and pkg-config is used instead of FindCURL (we can't 
use FindCURL and fallback to pkg-config because FindCURL doesn't return any 
error)
 * This patch is not acceptable from your point of view. In this case, I'll 
also remove this patch from buildroot and I'll instead add a dynamic library 
dependency to xerces. Buildroot users won't be able to build xerces statically 
anymore but I prefer this instead of maintaining non-upstreamable patches.

> fix static linking with curl
> ----------------------------
>
>                 Key: XERCESC-2156
>                 URL: https://issues.apache.org/jira/browse/XERCESC-2156
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 3.2.0, 3.2.1, 3.2.2
>            Reporter: Fabrice Fontaine
>            Assignee: Roger Leigh
>            Priority: Minor
>             Fix For: 3.2.3
>
>         Attachments: 0001-fix-static-linking-with-curl.patch
>
>
> When curl is statically built with openssl support, xerces needs to
> link with openssl libraries so use pkg_check_modules to get any
> needed dependencies
> Fixes:
>  - 
> http://autobuild.buildroot.org/results/29ca90fff2c8e38f2edf7240eca3aa3fe7397c45



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org
For additional commands, e-mail: c-dev-h...@xerces.apache.org

Reply via email to