[
https://issues.apache.org/jira/browse/ARROW-13334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17381047#comment-17381047
]
Kouhei Sutou commented on ARROW-13334:
--------------------------------------
Why did you use Folly's version to confirm whether the variable name in
{{Findzstd.cmake}} is related or not?
You should change {{Findzstd.cmake}} and confirm. You don't need t o use
Folly's version.
I thought that you said that we need the following change to fix this case:
{noformat}
diff --git a/cpp/cmake_modules/Findzstd.cmake b/cpp/cmake_modules/Findzstd.cmake
index 73b7ab250..82e1534e1 100644
--- a/cpp/cmake_modules/Findzstd.cmake
+++ b/cpp/cmake_modules/Findzstd.cmake
@@ -44,7 +44,7 @@ endif()
# First, find via if specified ZTD_ROOT
if(ZSTD_ROOT)
message(STATUS "Using ZSTD_ROOT: ${ZSTD_ROOT}")
- find_library(ZSTD_LIB
+ find_library(ZSTD_LIBRARY
NAMES ${ZSTD_LIB_NAMES}
PATHS ${ZSTD_ROOT}
PATH_SUFFIXES ${ARROW_LIBRARY_PATH_SUFFIXES}
@@ -63,14 +63,14 @@ else()
set(ZSTD_INCLUDE_DIR "${ZSTD_PC_INCLUDEDIR}")
list(APPEND ZSTD_PC_LIBRARY_DIRS "${ZSTD_PC_LIBDIR}")
- find_library(ZSTD_LIB
+ find_library(ZSTD_LIBRARY
NAMES ${ZSTD_LIB_NAMES}
PATHS ${ZSTD_PC_LIBRARY_DIRS}
NO_DEFAULT_PATH
PATH_SUFFIXES ${ARROW_LIBRARY_PATH_SUFFIXES})
else()
# Third, check all other CMake paths
- find_library(ZSTD_LIB
+ find_library(ZSTD_LIBRARY
NAMES ${ZSTD_LIB_NAMES}
PATH_SUFFIXES ${ARROW_LIBRARY_PATH_SUFFIXES})
find_path(ZSTD_INCLUDE_DIR
@@ -79,11 +79,11 @@ else()
endif()
endif()
-find_package_handle_standard_args(zstd REQUIRED_VARS ZSTD_LIB ZSTD_INCLUDE_DIR)
+find_package_handle_standard_args(zstd REQUIRED_VARS ZSTD_LIBRARY
ZSTD_INCLUDE_DIR)
if(zstd_FOUND)
add_library(zstd::libzstd UNKNOWN IMPORTED)
set_target_properties(zstd::libzstd
- PROPERTIES IMPORTED_LOCATION "${ZSTD_LIB}"
+ PROPERTIES IMPORTED_LOCATION "${ZSTD_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES
"${ZSTD_INCLUDE_DIR}")
endif()
{noformat}
If you want to use Folly's version, can we close this?
> Findzstd.cmake doesnt find zstd on Ubuntu 20.04
> -----------------------------------------------
>
> Key: ARROW-13334
> URL: https://issues.apache.org/jira/browse/ARROW-13334
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++
> Affects Versions: 4.0.1
> Environment: Ubuntu 20.04.2
> Reporter: Nick Hortovanyi
> Priority: Minor
>
> I'm unable to use the pre-built c++ arrow libraries with a project using a
> CMakeList.txt containing
> {noformat}
> find_package(Arrow REQUIRED)
> {noformat}
> Giving the following error
> {noformat}
> CMake Error at
> /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146
> (message):
> Could NOT find zstd (missing: ZSTD_LIB)
> Call Stack (most recent call first):
> /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393
> (_FPHSA_FAILURE_MESSAGE)
> /usr/lib/x86_64-linux-gnu/cmake/arrow/Findzstd.cmake:82
> (find_package_handle_standard_args)
> /usr/share/cmake-3.16/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)
> /usr/lib/x86_64-linux-gnu/cmake/arrow/ArrowConfig.cmake:96 (find_dependency)
> CMakeLists.txt:12 (find_package)
> {noformat}
> libzstd and libstd-dev are both installed
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)