You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "lordgamez (via GitHub)" <gi...@apache.org> on 2025/09/24 13:14:44 UTC

[PR] MINIFICPP-2637 Upgrade libxml2 to v2.15.0 [nifi-minifi-cpp]

lordgamez opened a new pull request, #2036:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2036

   https://issues.apache.org/jira/browse/MINIFICPP-2637
   
   ---------------------------
   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:
   - [ ] Is there a JIRA ticket associated with this PR? Is it referenced
        in the commit message?
   
   - [ ] Does your PR title start with MINIFICPP-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
   
   - [ ] Has your PR been rebased against the latest commit within the target branch (typically main)?
   
   - [ ] Is your initial contribution a single, squashed commit?
   
   ### For code changes:
   - [ ] 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)?
   - [ ] If applicable, have you updated the LICENSE file?
   - [ ] If applicable, have you updated the NOTICE file?
   
   ### For documentation related changes:
   - [ ] 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 GitHub Actions CI results for build issues and submit an update to your PR as soon as possible.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINIFICPP-2637 Upgrade libxml2 to v2.15.0 [nifi-minifi-cpp]

Posted by "fgerlits (via GitHub)" <gi...@apache.org>.
fgerlits commented on code in PR #2036:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2036#discussion_r2376086865


##########
cmake/AzureSdkCpp.cmake:
##########
@@ -55,3 +55,8 @@ FetchContent_Declare(asdkext
 )
 
 FetchContent_MakeAvailable(asdkext)
+
+if (NOT WIN32)
+    add_dependencies(azure-storage-common LibXml2::LibXml2)
+    add_dependencies(azure-data-tables LibXml2::LibXml2)
+endif()

Review Comment:
   why is this not needed on Windows?



##########
CMakeLists.txt:
##########
@@ -370,7 +370,7 @@ add_subdirectory(core-framework)
 add_subdirectory(extension-framework)
 add_subdirectory(libminifi)
 
-if (ENABLE_ALL OR ENABLE_AZURE)
+if (NOT WIN32 AND (ENABLE_ALL OR ENABLE_AZURE))

Review Comment:
   also here; why is Windows excluded?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINIFICPP-2637 Upgrade libxml2 to v2.15.0 [nifi-minifi-cpp]

Posted by "szaszm (via GitHub)" <gi...@apache.org>.
szaszm commented on code in PR #2036:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2036#discussion_r2376153364


##########
cmake/LibXml2.cmake:
##########


Review Comment:
   Now that it's changed to FetchContent, we should stop referencing libxml2 from the main CMakeLists.txt, and only include it from the modules that depend on it, i.e. the azure sdk.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINIFICPP-2637 Upgrade libxml2 to v2.15.0 [nifi-minifi-cpp]

Posted by "szaszm (via GitHub)" <gi...@apache.org>.
szaszm commented on code in PR #2036:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2036#discussion_r2376155639


##########
cmake/LibXml2.cmake:
##########
@@ -0,0 +1,50 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
+set(LIBXML2_WITH_DEBUG OFF CACHE BOOL "" FORCE)
+set(LIBXML2_WITH_PROGRAMS OFF CACHE BOOL "" FORCE)
+set(LIBXML2_WITH_TESTS OFF CACHE BOOL "" FORCE)
+set(LIBXML2_WITH_CATALOG OFF CACHE BOOL "" FORCE)
+set(LIBXML2_WITH_ICONV OFF CACHE BOOL "" FORCE)
+set(LIBXML2_WITH_ICU OFF CACHE BOOL "" FORCE)
+
+include(FetchContent)
+FetchContent_Declare(
+    libxml2
+    URL https://github.com/GNOME/libxml2/archive/refs/tags/v2.15.0.tar.gz
+    URL_HASH SHA256=e24bd5209afefe390e704ebc55649c7ae240e1f157cefd433ccc86c610d20aac
+    SYSTEM
+)
+FetchContent_MakeAvailable(libxml2)
+
+set(LIBXML2_FOUND "YES" CACHE STRING "" FORCE)
+set(LIBXML2_INCLUDE_DIRS
+    "${libxml2_SOURCE_DIR}/include"
+    "${libxml2_BINARY_DIR}"
+    CACHE STRING "" FORCE)
+if (WIN32)
+    set(LIBXML2_LIBRARIES "${libxml2_BINARY_DIR}/libxml2s.lib" CACHE STRING "" FORCE)
+    set(LIBXML2_LIBRARY "${libxml2_BINARY_DIR}/libxml2s.lib" CACHE STRING "" FORCE)
+else()
+    set(LIBXML2_LIBRARIES "${libxml2_BINARY_DIR}/libxml2.a" CACHE STRING "" FORCE)
+    set(LIBXML2_LIBRARY "${libxml2_BINARY_DIR}/libxml2.a" CACHE STRING "" FORCE)
+endif()

Review Comment:
   Did you test these with msbuild?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINIFICPP-2637 Upgrade libxml2 to v2.15.0 [nifi-minifi-cpp]

Posted by "lordgamez (via GitHub)" <gi...@apache.org>.
lordgamez commented on code in PR #2036:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2036#discussion_r2376296254


##########
cmake/LibXml2.cmake:
##########
@@ -0,0 +1,50 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
+set(LIBXML2_WITH_DEBUG OFF CACHE BOOL "" FORCE)
+set(LIBXML2_WITH_PROGRAMS OFF CACHE BOOL "" FORCE)
+set(LIBXML2_WITH_TESTS OFF CACHE BOOL "" FORCE)
+set(LIBXML2_WITH_CATALOG OFF CACHE BOOL "" FORCE)
+set(LIBXML2_WITH_ICONV OFF CACHE BOOL "" FORCE)
+set(LIBXML2_WITH_ICU OFF CACHE BOOL "" FORCE)
+
+include(FetchContent)
+FetchContent_Declare(
+    libxml2
+    URL https://github.com/GNOME/libxml2/archive/refs/tags/v2.15.0.tar.gz
+    URL_HASH SHA256=e24bd5209afefe390e704ebc55649c7ae240e1f157cefd433ccc86c610d20aac
+    SYSTEM
+)
+FetchContent_MakeAvailable(libxml2)
+
+set(LIBXML2_FOUND "YES" CACHE STRING "" FORCE)
+set(LIBXML2_INCLUDE_DIRS
+    "${libxml2_SOURCE_DIR}/include"
+    "${libxml2_BINARY_DIR}"
+    CACHE STRING "" FORCE)
+if (WIN32)
+    set(LIBXML2_LIBRARIES "${libxml2_BINARY_DIR}/libxml2s.lib" CACHE STRING "" FORCE)
+    set(LIBXML2_LIBRARY "${libxml2_BINARY_DIR}/libxml2s.lib" CACHE STRING "" FORCE)
+else()
+    set(LIBXML2_LIBRARIES "${libxml2_BINARY_DIR}/libxml2.a" CACHE STRING "" FORCE)
+    set(LIBXML2_LIBRARY "${libxml2_BINARY_DIR}/libxml2.a" CACHE STRING "" FORCE)
+endif()

Review Comment:
   Good point, I checked and there's a slight difference in the path using msbuild, updated in https://github.com/apache/nifi-minifi-cpp/pull/2036/commits/735bc93601f895b68a0c377adb20033e21784c07



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINIFICPP-2637 Upgrade libxml2 to v2.15.0 [nifi-minifi-cpp]

Posted by "szaszm (via GitHub)" <gi...@apache.org>.
szaszm commented on code in PR #2036:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2036#discussion_r2376153364


##########
cmake/LibXml2.cmake:
##########


Review Comment:
   Now that it's changed to FetchContent, we should stop referencing libxml2 from the main CMakeLists.txt, and only include it from the modules that depend on it, i.e. the azure sdk. This is the usage pattern everywhere else.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINIFICPP-2637 Upgrade libxml2 to v2.15.0 [nifi-minifi-cpp]

Posted by "lordgamez (via GitHub)" <gi...@apache.org>.
lordgamez commented on code in PR #2036:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2036#discussion_r2376294584


##########
cmake/LibXml2.cmake:
##########


Review Comment:
   Good idea, updated in https://github.com/apache/nifi-minifi-cpp/pull/2036/commits/735bc93601f895b68a0c377adb20033e21784c07



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINIFICPP-2637 Upgrade libxml2 to v2.15.0 [nifi-minifi-cpp]

Posted by "lordgamez (via GitHub)" <gi...@apache.org>.
lordgamez commented on code in PR #2036:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2036#discussion_r2376120434


##########
cmake/AzureSdkCpp.cmake:
##########
@@ -55,3 +55,8 @@ FetchContent_Declare(asdkext
 )
 
 FetchContent_MakeAvailable(asdkext)
+
+if (NOT WIN32)
+    add_dependencies(azure-storage-common LibXml2::LibXml2)
+    add_dependencies(azure-data-tables LibXml2::LibXml2)
+endif()

Review Comment:
   In both azure storage and azure data tables target libxml2 is only used in non-windows builds:
   ```
   if(WIN32)
       target_link_libraries(azure-storage-common PRIVATE bcrypt webservices)
   else()
       find_package(LibXml2 REQUIRED)
       target_include_directories(azure-storage-common SYSTEM PRIVATE ${LIBXML2_INCLUDE_DIRS})
       target_link_libraries(azure-storage-common PRIVATE ${LIBXML2_LIBRARIES})
       find_package(OpenSSL REQUIRED)
       target_link_libraries(azure-storage-common PRIVATE OpenSSL::SSL OpenSSL::Crypto)
   endif()
   ```



##########
CMakeLists.txt:
##########
@@ -370,7 +370,7 @@ add_subdirectory(core-framework)
 add_subdirectory(extension-framework)
 add_subdirectory(libminifi)
 
-if (ENABLE_ALL OR ENABLE_AZURE)
+if (NOT WIN32 AND (ENABLE_ALL OR ENABLE_AZURE))

Review Comment:
   Only azure uses libxml2 as a thirdparty dependency and only in non-windows builds



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINIFICPP-2637 Upgrade libxml2 to v2.15.0 [nifi-minifi-cpp]

Posted by "fgerlits (via GitHub)" <gi...@apache.org>.
fgerlits closed pull request #2036: MINIFICPP-2637 Upgrade libxml2 to v2.15.0
URL: https://github.com/apache/nifi-minifi-cpp/pull/2036


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org