Skip to content
This repository was archived by the owner on Jul 11, 2024. It is now read-only.
This repository was archived by the owner on Jul 11, 2024. It is now read-only.

CMake can't find the versions of ar and ranlib that are part of miniconda build environment #303

@gavinreaney

Description

@gavinreaney

This can be reproduced by running:

./gradlew :stubs:cpp:downloadConanDeps

after cloning this repo and doing the ./gradlew setup step:
https://github.com/infostellarinc/stellarstation-api

If you run the gradlew command on your machine it will probably work fine, but what is actually happening is that the 'ar' and 'ranlib' that CMake detects are the system installed ones rather than the ones that are part of the miniconda environment. This becomes a problem when trying to run the build inside a container that doesn't include these tools (e.g. curiostack/java-cloud-builder).

You can see the detected tools by checking the contents of this file (BLAH is replaced by some random looking long string):

~/.conan/data/c-ares/1.14.0/conan/stable/build//CMakeCache.txt

In that file look for 'AR:' and 'RANLIB:'. I see things like:

CMAKE_AR:FILEPATH=CMAKE_AR-NOTFOUND
CMAKE_CXX_COMPILER_RANLIB:FILEPATH=CMAKE_CXX_COMPILER_RANLIB-NOTFOUND

As a workaround (for our cloud build) I did an apt install binutils step, but that kind of defeats the purpose of trying to have everything be in miniconda. It must be possible to pass flags to cmake but I took the easiest path to get things working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions