apache / apache/orc

Orc unable to find dependencies, even when they exist

Open
#2,408 7 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
Java
Stars
770
Forks
517
PR merge metrics
No merged PRs in 30d

Description

To reproduce the issue you can create a conda environment with orc and a third party dependency, like Snappy:

```shell
$ conda create -n foo orc snappy
$ conda activate foo
```

With the minimal CMake project below, no errors occur during setup:

```cmake
cmake_minimum_required(VERSION 3.2)
project(foo)

find_package(Snappy REQUIRED)
```

However, if you add a call to find orc, you will then get an error that Snappy could not be found:

```cmake
cmake_minimum_required(VERSION 3.2)
project(foo)

find_package(Snappy REQUIRED)
find_package(orc REQUIRED)
```

```shell
$ cmake -S . -B build
-- SNAPPY_HOME:
CMake Error at /home/will/miniforge3/envs/foo/lib/cmake/orc/FindSnappy.cmake:80 (message):
Could not find Snappy in system search paths.
Call Stack (most recent call first):
/usr/share/cmake-3.31/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
/home/will/miniforge3/envs/foo/lib/cmake/orc/orcConfig.cmake:72 (find_dependency)
CMakeLists.txt:5 (find_package)
```
This issue was first discovered downstream in Apache Arrow (see https://github.com/apache/arrow/pull/46906#issuecomment-3286997441) and appears to have started with Orc 2.1.0

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.