Skip to content

Orc unable to find dependencies, even when they exist #2408

@WillAyd

Description

@WillAyd

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

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

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

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_minimum_required(VERSION 3.2)
project(foo)

find_package(Snappy REQUIRED)
find_package(orc REQUIRED)
$ 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 apache/arrow#46906 (comment)) and appears to have started with Orc 2.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions