You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by achristianson <gi...@git.apache.org> on 2018/04/09 19:45:13 UTC

[GitHub] nifi-minifi-cpp pull request #296: MINIFICPP-449 Add cURL external project b...

GitHub user achristianson opened a pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/296

    MINIFICPP-449 Add cURL external project build with static linking

    Thank you for submitting a contribution to Apache NiFi - MiNiFi C++.
    
    In order to streamline the review of the contribution we ask you
    to ensure the following steps have been taken:
    
    ### For all changes:
    - [x] Is there a JIRA ticket associated with this PR? Is it referenced
         in the commit message?
    
    - [x] Does your PR title start with MINIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
    
    - [x] Has your PR been rebased against the latest commit within the target branch (typically master)?
    
    - [x] Is your initial contribution a single, squashed commit?
    
    ### For code changes:
    - [x] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
    - [x] If applicable, have you updated the LICENSE file?
    - [x] If applicable, have you updated the NOTICE file?
    
    ### For documentation related changes:
    - [x] Have you ensured that format looks appropriate for the output in which it is rendered?
    
    ### Note:
    Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/achristianson/nifi-minifi-cpp MINIFICPP-449

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi-minifi-cpp/pull/296.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #296
    
----
commit da754443dfaabeae56796aa2e8d0528dc4b8a4d4
Author: Andrew I. Christianson <an...@...>
Date:   2018-03-22T19:49:50Z

    MINIFICPP-449 Add cURL external project build with static linking

----


---

[GitHub] nifi-minifi-cpp pull request #296: MINIFICPP-449 Add cURL external project b...

Posted by phrocker <gi...@git.apache.org>.
Github user phrocker commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/296#discussion_r180264480
  
    --- Diff: CMakeLists.txt ---
    @@ -117,6 +118,49 @@ else ()
       message( FATAL_ERROR "OpenSSL was not found. Please install OpenSSL" )
     endif (OPENSSL_FOUND)
     
    +if(NOT USE_SYSTEM_CURL)
    --- End diff --
    
    This should be in http-curl. If curl is disabled there is no point in adding it as an external project


---

[GitHub] nifi-minifi-cpp pull request #296: MINIFICPP-449 Add cURL external project b...

Posted by phrocker <gi...@git.apache.org>.
Github user phrocker commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/296#discussion_r180265512
  
    --- Diff: extensions/http-curl/CMakeLists.txt ---
    @@ -42,9 +42,9 @@ if(CMAKE_THREAD_LIBS_INIT)
     endif()
     
     if (CURL_FOUND)
    -        include_directories(${CURL_INCLUDE_DIRS})
    -        target_link_libraries (minifi-http-curl ${CURL_LIBRARIES})
    -endif(CURL_FOUND)
    +  include_directories(${CURL_INCLUDE_DIRS})
    +  target_link_libraries(minifi-http-curl ${CURL_LIBRARIES})
    --- End diff --
    
    ^ Even in the case of a system library we could rely on the static library if it exists. We don't do it now to ensure we have a small binary size, but we should make it clear that while downloading the source and building manually is an option in most cases a static curl lib likely already exists on the build system. In my case I've just checked my centos 7,6, u16-18, fedora, and suse VMs and they all have static libs. There should be a little work here to ensure we get that IF the user wants that. Perhaps that necessitates an added option?


---

[GitHub] nifi-minifi-cpp pull request #296: MINIFICPP-449 Add cURL external project b...

Posted by phrocker <gi...@git.apache.org>.
Github user phrocker commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/296#discussion_r180264700
  
    --- Diff: main/CMakeLists.txt ---
    @@ -66,7 +66,7 @@ else ()
     	target_link_libraries (minifiexe -Wl,--whole-archive minifi -Wl,--no-whole-archive)
     endif ()
     
    -target_link_libraries(minifiexe yaml-cpp ${UUID_LIBRARIES} ${OPENSSL_LIBRARIES})
    +target_link_libraries(minifiexe yaml-cpp ${UUID_LIBRARIES} ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES})
    --- End diff --
    
    This should not be included here. It should be passed transitively through the minifi-http-curl iff it is enabled. 


---

[GitHub] nifi-minifi-cpp pull request #296: MINIFICPP-449 Add cURL external project b...

Posted by achristianson <gi...@git.apache.org>.
Github user achristianson commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/296#discussion_r180521508
  
    --- Diff: extensions/http-curl/CMakeLists.txt ---
    @@ -42,9 +42,9 @@ if(CMAKE_THREAD_LIBS_INIT)
     endif()
     
     if (CURL_FOUND)
    -        include_directories(${CURL_INCLUDE_DIRS})
    -        target_link_libraries (minifi-http-curl ${CURL_LIBRARIES})
    -endif(CURL_FOUND)
    +  include_directories(${CURL_INCLUDE_DIRS})
    +  target_link_libraries(minifi-http-curl ${CURL_LIBRARIES})
    --- End diff --
    
    Agreed that we should have the option to static link when not using bundled. I think that should be done in a new ticket that covers all dynamic libs that have static linking options when linking system libs, possibly with a general option e.g. STATIC_LINK_ALL.


---

[GitHub] nifi-minifi-cpp issue #296: MINIFICPP-449 Add cURL external project build wi...

Posted by achristianson <gi...@git.apache.org>.
Github user achristianson commented on the issue:

    https://github.com/apache/nifi-minifi-cpp/pull/296
  
    Moved to curl extension and fixed external static lib cmake dependencies by using PROPERTIES INTERFACE_LINK_LIBRARIES.


---

[GitHub] nifi-minifi-cpp pull request #296: MINIFICPP-449 Add cURL external project b...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/nifi-minifi-cpp/pull/296


---