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/07 02:58:34 UTC

[GitHub] [orc] nehaljwani commented on pull request #524: ZSTD_STATIC_LIB_NAME: Avoid double .a extensions

nehaljwani commented on pull request #524:
URL: https://github.com/apache/orc/pull/524#issuecomment-670293683


   @dongjoon-hyun Apologies for the delay in response.
   
   Here is what I have:
   ```
   /t/n/orc ❯❯❯ ls prefix/lib/libzstd.*
   prefix/lib/libzstd.a  prefix/lib/libzstd.so  prefix/lib/libzstd.so.1  prefix/lib/libzstd.so.1.4.5
   ```
   
   My attempt at building orc:
   ```
   /t/n/orc ❯❯❯ cmake -S . -Bbuild -GNinja -DBUILD_JAVA=False -DLZ4_HOME=$PWD/prefix -DZLIB_HOME=$PWD/prefix -DZSTD_HOME=$PWD/prefix -DCMAKE_POLICY_DEFAULT_CMP0074=NEW -DSNAPPY_HOME=$PWD/prefix
   ...
   -- ZSTD_HOME: /tmp/nwani_1596768059/orc/prefix
   CMake Error at cmake_modules/FindZSTD.cmake:60 (message):
     Could not find zstd in system search paths.
   Call Stack (most recent call first):
     cmake_modules/ThirdpartyToolchain.cmake:139 (find_package)
     CMakeLists.txt:120 (INCLUDE)
   ```
   
   Second attempt with library name specified:
   ```
   /t/n/orc ❯❯❯ cmake -S . -Bbuild -GNinja -DZSTD_STATIC_LIB_NAME=libzstd -DBUILD_JAVA=False -DLZ4_HOME=$PWD/prefix -DZLIB_HOME=$PWD/prefix -DZSTD_HOME=$PWD/prefix -DCMAKE_POLICY_DEFAULT_CMP0074=NEW -DSNAPPY_HOME=$PWD/prefix
   ...
   -- ZSTD_HOME: /tmp/nwani_1596768059/orc/prefix
   CMake Error at cmake_modules/FindZSTD.cmake:60 (message):
     Could not find zstd in system search paths.
   Call Stack (most recent call first):
     cmake_modules/ThirdpartyToolchain.cmake:139 (find_package)
     CMakeLists.txt:120 (INCLUDE)
   ```
   
   Third attempt with library named specified with extension (leading into a configure success, but a build failure):
   ```
   /t/n/orc ❯❯❯ cmake -S . -Bbuild -GNinja -DZSTD_STATIC_LIB_NAME=libzstd.a -DBUILD_JAVA=False -DLZ4_HOME=$PWD/prefix -DZLIB_HOME=$PWD/prefix -DZSTD_HOME=$PWD/prefix -DCMAKE_POLICY_DEFAULT_CMP0074=NEW -DSNAPPY_HOME=$PWD/prefix -DZSTD_STATIC_LIB_NAME=libzstd.a
   ...
   -- ZSTD_HOME: /tmp/nwani_1596768059/orc/prefix
   -- Found the zstd header: /tmp/nwani_1596768059/orc/prefix/include/zstd.h
   -- Found the zstd library: /tmp/nwani_1596768059/orc/prefix/lib/libzstd.a.a <--------------------- !!!!!!
   ```
   
   I wrote up this patch to unblock myself, however, I am of the opinion that all the Find* modules need a nice refactor to support linking each one of this third party compression libraries dynamically via a CMake option and also switch to using CMake targets instead of CMake variables to consume them (modern CMake approach)


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