You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@orc.apache.org by GitBox <gi...@apache.org> on 2020/08/29 18:25:47 UTC

[GitHub] [orc] nehaljwani opened a new pull request #541: Partially rework cmake modules to accommodate library types

nehaljwani opened a new pull request #541:
URL: https://github.com/apache/orc/pull/541


   This patch allows selectively linking each third party library
   statically with a fallback to dynamic, if not available
   
   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. File a JIRA issue first and use it as a prefix of your PR title, e.g., `ORC-001: Fix ABC`.
     2. Use your PR title to summarize what this PR proposes instead of describing the problem.
     3. Make PR title and description complete because these will be the permanent commit log.
     4. If possible, provide a concise and reproducible example to reproduce the issue for a faster review.
     5. If the PR is unfinished, use GitHub PR Draft feature.
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If there is a discussion in the mailing list, please add the link.
   -->
   
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   -->
   


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

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



[GitHub] [orc] jakirkham commented on pull request #541: Partially rework cmake modules to accommodate library types

Posted by GitBox <gi...@apache.org>.
jakirkham commented on pull request #541:
URL: https://github.com/apache/orc/pull/541#issuecomment-708318201


   Thanks all! 😄
   
   Would it make sense to include this in a release? How are releases planned here typically? 🙂


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

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



[GitHub] [orc] nehaljwani commented on a change in pull request #541: Partially rework cmake modules to accommodate library types

Posted by GitBox <gi...@apache.org>.
nehaljwani commented on a change in pull request #541:
URL: https://github.com/apache/orc/pull/541#discussion_r484296933



##########
File path: c++/src/CMakeLists.txt
##########
@@ -236,11 +231,11 @@ endif(BUILD_LIBHDFSPP)
 add_library (orc STATIC ${SOURCE_FILES})
 
 target_link_libraries (orc
-  protobuf
-  zlib
-  snappy
-  lz4
-  zstd
+  orc::protobuf

Review comment:
       Because of it being an alias, I have to use some prefix. Doesn't have to be orc::, could be 3rdparty:: as well, or if you have something better in mind. I am deliberately using an alias target here.




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

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



[GitHub] [orc] wgtmac commented on pull request #541: Partially rework cmake modules to accommodate library types

Posted by GitBox <gi...@apache.org>.
wgtmac commented on pull request #541:
URL: https://github.com/apache/orc/pull/541#issuecomment-706496037


   I just committed it, thanks @nehaljwani !


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

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



[GitHub] [orc] wgtmac commented on a change in pull request #541: Partially rework cmake modules to accommodate library types

Posted by GitBox <gi...@apache.org>.
wgtmac commented on a change in pull request #541:
URL: https://github.com/apache/orc/pull/541#discussion_r482777902



##########
File path: c++/src/CMakeLists.txt
##########
@@ -236,11 +231,11 @@ endif(BUILD_LIBHDFSPP)
 add_library (orc STATIC ${SOURCE_FILES})
 
 target_link_libraries (orc
-  protobuf
-  zlib
-  snappy
-  lz4
-  zstd
+  orc::protobuf

Review comment:
       what's the rationale of an orc prefix?

##########
File path: cmake_modules/FindLZ4.cmake
##########
@@ -13,7 +13,7 @@
 # LZ4_HOME environment variable is used to check for LZ4 headers and static library
 
 # LZ4_INCLUDE_DIR: directory containing headers
-# LZ4_LIBS: directory containing LZ4 libraries
+# LZ4_LIBRARY: path to libz4

Review comment:
       liblz4




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

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



[GitHub] [orc] dongjoon-hyun commented on pull request #541: Partially rework cmake modules to accommodate library types

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #541:
URL: https://github.com/apache/orc/pull/541#issuecomment-702577536


   Thank you for pinging me, @wgtmac . It looks a little intrusive change, but I have no preference here. If you think this is okay, I'm fine.
   
   cc @omalley 


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

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



[GitHub] [orc] nehaljwani commented on pull request #541: Partially rework cmake modules to accommodate library types

Posted by GitBox <gi...@apache.org>.
nehaljwani commented on pull request #541:
URL: https://github.com/apache/orc/pull/541#issuecomment-683340627


   With this change, I can use 3rd party dynamic libraries easily (and the change is backwards compatible):
   ```
   ...
   -- Found Threads: TRUE  
   -- SNAPPY_HOME: /home/wani/m3/envs/orcdev
   -- Found the Snappy header: /home/wani/m3/envs/orcdev/include/snappy.h
   -- Found the Snappy library: /home/wani/m3/envs/orcdev/lib/libsnappy.so
   -- ZLIB_HOME: /home/wani/m3/envs/orcdev
   -- Found the ZLIB header: /home/wani/m3/envs/orcdev/include/zlib.h
   -- Found the ZLIB library: /home/wani/m3/envs/orcdev/lib/libz.so
   -- Found the ZLIB static library: /home/wani/m3/envs/orcdev/lib/libz.a
   -- ZSTD_HOME: /home/wani/m3/envs/orcdev
   -- Found the zstd header: /home/wani/m3/envs/orcdev/include/zstd.h
   -- Found the zstd library: /home/wani/m3/envs/orcdev/lib/libzstd.so
   -- LZ4_HOME: /home/wani/m3/envs/orcdev
   -- Found the LZ4 header: /home/wani/m3/envs/orcdev/include/lz4.h
   -- Found the LZ4 library: /home/wani/m3/envs/orcdev/lib/liblz4.so
   -- GTEST_HOME set: /home/wani/m3/envs/orcdev
   -- Found the GTest header: /home/wani/m3/envs/orcdev/include/gmock/gmock.h
   -- Found the GTest library: /home/wani/m3/envs/orcdev/lib/libgtest.so
   -- Found the GMock library: /home/wani/m3/envs/orcdev/lib/libgmock.so
   -- PROTOBUF_HOME: /home/wani/m3/envs/orcdev
   -- Found the Protobuf headers: /home/wani/m3/envs/orcdev/include
   -- Found the Protobuf library: /home/wani/m3/envs/orcdev/lib/libprotobuf.so
   -- Found the Protoc library: /home/wani/m3/envs/orcdev/lib/libprotoc.so
   -- Found the Protoc executable: /home/wani/m3/envs/orcdev/bin/protoc
   ...
   ```


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

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



[GitHub] [orc] wgtmac merged pull request #541: Partially rework cmake modules to accommodate library types

Posted by GitBox <gi...@apache.org>.
wgtmac merged pull request #541:
URL: https://github.com/apache/orc/pull/541


   


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

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



[GitHub] [orc] jakirkham commented on pull request #541: Partially rework cmake modules to accommodate library types

Posted by GitBox <gi...@apache.org>.
jakirkham commented on pull request #541:
URL: https://github.com/apache/orc/pull/541#issuecomment-699095945


   Would it be possible to get another review @wgtmac? 🙂


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

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