Tests: RunCMake.CMP0125 (CMP0125-find_library-OLD) test fails
This test fails on Gentoo Linux when building CMake 3.21.4 (and I've hit it myself with 3.22.3) via our packaging. Originally reported downstream.
It looks like it might be that CMake doesn't expect to find a libfile on the system (provided by sys-apps/file
in Gentoo, but it's from the common file
command)?
Snippet from log:
325/635 Test #352: RunCMake.CMP0125 ..................................***Failed 1.15 sec
-- CMP0125-find_file-OLD - PASSED
-- CMP0125-find_file-NEW - PASSED
-- CMP0125-find_path-OLD - PASSED
-- CMP0125-find_path-NEW - PASSED
-- CMP0125-find_program-OLD - PASSED
-- CMP0125-find_program-NEW - PASSED
CMake Error at /var/tmp/portage/dev-util/cmake-3.22.3/work/cmake-3.22.3/Tests/RunCMake/RunCMake.cmake:201 (message):
CMP0125-find_library-OLD - FAILED:
stderr does not match that expected.
Command was:
command> "/var/tmp/portage/dev-util/cmake-3.22.3/work/cmake-3.22.3_build/bin/cmake" "/var/tmp/portage/dev-util/cmake-3.22.3/work/cmake-3.22.3/Tests/RunCMake/CMP0125" "-G" "Ninja" "-DRunCMake_TEST=CMP0125-find_library-OLD" "--no-warn-unused-cli" "-DRELATIVE_PATH=relative" "-DABSOLUTE_PATH=/absolute" "-DRELATIVE_PATH_WITH_TYPE:PATH=relative" "-DABSOLUTE_PATH_WITH_TYPE:PATH=/absolute" "-DNOTFOUND_PATH=NOTFOUND" "-DNOTFOUND_PATH_WITH_TYPE:PATH=NOTFOUND" "-DFILE_NAME=libfile2.so" "-DFILE_NAME_WITH_TYPE:PATH=libfile2.so" "-DSEARCH_NAME=file" "-DSEARCH_PATH=/var/tmp/portage/dev-util/cmake-3.22.3/work/cmake-3.22.3_build/Tests/RunCMake/CMP0125" "-DCMAKE_MAKE_PROGRAM=/usr/bin/ninja"
Actual stdout:
actual-out> Not searching for unused variables given on the command line.
actual-out> -- The C compiler identification is GNU 11.2.1
actual-out> -- Detecting C compiler ABI info
actual-out> -- Detecting C compiler ABI info - done
actual-out> -- Check for working C compiler: /usr/bin/cc - skipped
actual-out> -- Detecting C compile features
actual-out> -- Detecting C compile features - done
actual-out> -- Configuring done
actual-out> -- Generating done
actual-out> -- Build files have been written to: /var/tmp/portage/dev-util/cmake-3.22.3/work/cmake-3.22.3_build/Tests/RunCMake/CMP0125/CMP0125-find_library-OLD-build
Expected stderr to match:
expect-err> RELATIVE_PATH=/.+/CMP0125/CMP0125-find_library-OLD-build/relative
expect-err> RELATIVE_PATH_WITH_TYPE=relative
expect-err> ABSOLUTE_PATH=/absolute
expect-err> ABSOLUTE_PATH_WITH_TYPE=/absolute
expect-err> NOTFOUND_PATH=NOTFOUND
expect-err> NOTFOUND_PATH_WITH_TYPE=/.+/CMP0125/libfile\.(so|dylib)
expect-err> FILE_NAME=/.+/CMP0125/CMP0125-find_library-OLD-build/libfile2\.(so|dylib)
expect-err> FILE_NAME_WITH_TYPE=libfile2\.(so|dylib)
expect-err> RELATIVE_PATH_AND_LOCAL=relative_local
expect-err> RELATIVE_PATH_WITH_TYPE_AND_LOCAL=relative_local
expect-err> ABSOLUTE_PATH_AND_LOCAL=/absolute_local
expect-err> ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL=/absolute_local
expect-err> NOTFOUND_PATH_AND_LOCAL=/.+/CMP0125/libfile\.(so|dylib)
expect-err> NOTFOUND_PATH_WITH_TYPE_AND_LOCAL=/.+/CMP0125/libfile\.(so|dylib)
Actual stderr:
actual-err> RELATIVE_PATH=/var/tmp/portage/dev-util/cmake-3.22.3/work/cmake-3.22.3_build/Tests/RunCMake/CMP0125/CMP0125-find_library-OLD-build/relative
actual-err> RELATIVE_PATH_WITH_TYPE=relative
actual-err> ABSOLUTE_PATH=/absolute
actual-err> ABSOLUTE_PATH_WITH_TYPE=/absolute
actual-err> NOTFOUND_PATH=NOTFOUND
actual-err> NOTFOUND_PATH_WITH_TYPE=/usr/lib64/libfile.so
actual-err> FILE_NAME=/var/tmp/portage/dev-util/cmake-3.22.3/work/cmake-3.22.3_build/Tests/RunCMake/CMP0125/CMP0125-find_library-OLD-build/libfile2.so
actual-err> FILE_NAME_WITH_TYPE=libfile2.so
actual-err> RELATIVE_PATH_AND_LOCAL=relative_local
actual-err> RELATIVE_PATH_WITH_TYPE_AND_LOCAL=relative_local
actual-err> ABSOLUTE_PATH_AND_LOCAL=/absolute_local
actual-err> ABSOLUTE_PATH_WITH_TYPE_AND_LOCAL=/absolute_local
actual-err> NOTFOUND_PATH_AND_LOCAL=/usr/lib64/libfile.so
Full log: build.log
Edited by Brad King