Skip to content

[BUG] libcudf tests warn when linking when building in a conda environment without conda compiler metapackages #11120

Open
@kkraus14

Description

@kkraus14

When building libcudf and tests in a conda environment without having the compiler metapackages installed (c-compiler, cxx-compiler, etc.), it produces warnings about not finding libz.so.1 needed by libcudf.so:

[406/674] Linking CXX executable gtests/COLUMN_TEST
/home/keith/miniconda3/envs/dev/bin/../lib/gcc/x86_64-conda-linux-gnu/10.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: warning: libz.so.1, needed by libcudf.so, not found (try using -rpath or -rpath-link)

I believe this is due to both the conda_env target (https://github.com/rapidsai/cudf/blob/branch-22.08/cpp/CMakeLists.txt#L628) and the zlib target (https://github.com/rapidsai/cudf/blob/branch-22.08/cpp/CMakeLists.txt#L622) both being private links for the libcudf target. zlib is just one example of this, but this could happen for any other private target of libcudf that comes from the conda environment.

This isn't a problem for the compiler metapackages because they set a slew of compiler CLI flags, notably an rpath-link flag into the conda environment. I do not use these metapackages because those CLI flags set will point into the conda environment before pointing into the local build directory, which makes having both an install and a working directory a pain.

I believe the fix is either changing the conda_env link to be a PUBLIC link of the libcudf target, or adding a conda_env link to the tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    0 - BacklogIn queue waiting for assignmentCMakeCMake build issuebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions