# CMake 4.0.0-rc1 test failure

**URL:** https://discourse.cmake.org/t/cmake-4-0-0-rc1-test-failure/13608
**Category:** Development
**Created:** [February 19, 2025, 8:25pm UTC](https://discourse.cmake.org/t/cmake-4-0-0-rc1-test-failure/13608 "2025-02-19T20:25:52Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![dextercd](https://discourse.cmake.org/user_avatar/discourse.cmake.org/dextercd/32/5359_2.png) [@dextercd](https://discourse.cmake.org/u/dextercd)
#### Post date: [February 19, 2025, 8:25pm UTC](https://discourse.cmake.org/t/cmake-4-0-0-rc1-test-failure/13608/1 "2025-02-19T20:25:52Z")

</div>

Hey there,

I compiled the latest release candidate from source and ran `ctest`. All tests succeeded except for one:

> **CTest output**
>
> ```auto
> $ ctest --rerun-failed --output-on-failure
> Test project /home/dexter/src/cmake/build
> Guessing configuration NoConfig
> Start 475: RunCMake.ParseImplicitLinkInfo
> 1/1 Test #475: RunCMake.ParseImplicitLinkInfo ...***Failed 0.71 sec
> CMake Error at /home/dexter/src/cmake/Tests/RunCMake/RunCMake.cmake:291 (message):
> ParseImplicitLinkInfo - FAILED:
> 
> stderr does not match that expected.
> 
> Command was:
> 
> command> "/home/dexter/src/cmake/build/bin/cmake" "/home/dexter/src/cmake/Tests/RunCMake/ParseImplicitLinkInfo" "-G" "Ninja" "-DRunCMake_TEST=ParseImplicitLinkInfo" "--no-warn-unused-cli" "-DCMAKE_MAKE_PROGRAM=/usr/bin/ninja"
> 
> Actual stdout:
> 
> actual-stdout> Not searching for unused variables given on the command line.
> actual-stdout> -- Configuring done (0.4s)
> actual-stdout> -- Generating done (0.0s)
> actual-stdout> -- Build files have been written to: /home/dexter/src/cmake/build/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo-build
> 
> Expected stderr to match:
> 
> expect-stderr> ^$
> 
> Actual stderr:
> 
> actual-stderr> craype-C-Cray-8.7 parse failed: state=, 'AtpSigHandler;AtpSigHCommData;pthread;sci_cray_mpi_mp;m;f;sci_cray_mp;craymp;m;pthread;f;hugetlbfs;mpich_cray;rt;pthread;ugni;pmi;pgas-dmapp;fi;u;rt;dmapp;ugni;udreg;pthread;m;cray-c++-rts;/usr/lib64/libstdc++.a;xpmem;dmapp;pthread;pmi;pthread;alpslli;pthread;wlm_detect;ugni;pthread;alpsutil;pthread;rca;udreg;quadmath;m;omp;rt;craymp;pthread;rt;dl;cray-c++-rts;/usr/lib64/libstdc++.a;m;modules;m;rt;fi;m;quadmath;rt;craymath;m;gfortran;quadmath;rt;f;m;pthread;rt;u;rt;dl;cray-c++-rts;/usr/lib64/libstdc++.a;m;csup;rt;atomic;/usr/lib64/libstdc++.a;pthread;c;csup;m;gcc' does not match '^AtpSigHandler;AtpSigHCommData;pthread;sci_cray_mpi_mp;m;f;sci_cray_mp;craymp;m;pthread;f;hugetlbfs;mpich_cray;rt;pthread;ugni;pmi;pgas-dmapp;fi;u;rt;dmapp;ugni;udreg;pthread;m;cray-c\+\+-rts;stdc\+\+;xpmem;dmapp;pthread;pmi;pthread;alpslli;pthread;wlm_detect;ugni;pthread;alpsutil;pthread;rca;udreg;quadmath;m;omp;rt;craymp;pthread;rt;dl;cray-c\+\+-rts;stdc\+\+;m;modules;m;rt;fi;m;quadmath;rt;craymath;m;gfortran;quadmath;rt;f;m;pthread;rt;u;rt;dl;cray-c\+\+-rts;stdc\+\+;m;csup;rt;atomic;stdc\+\+;pthread;c;csup;m;gcc$'
> actual-stderr> craype-CXX-Cray-8.7 parse failed: state=, 'AtpSigHandler;AtpSigHCommData;pthread;sci_cray_mpi_mp;m;f;sci_cray_mp;craymp;m;pthread;f;hugetlbfs;mpichcxx_cray;rt;pthread;ugni;pmi;mpich_cray;rt;pthread;ugni;pmi;pgas-dmapp;fi;u;rt;dmapp;ugni;udreg;pthread;m;cray-c++-rts;/usr/lib64/libstdc++.a;xpmem;dmapp;pthread;pmi;pthread;alpslli;pthread;wlm_detect;ugni;pthread;alpsutil;pthread;rca;udreg;quadmath;m;omp;rt;craymp;pthread;rt;dl;cray-c++-rts;/usr/lib64/libstdc++.a;m;modules;m;rt;fi;m;quadmath;rt;craymath;m;gfortran;quadmath;rt;f;m;pthread;rt;u;rt;dl;cray-c++-rts;/usr/lib64/libstdc++.a;m;csup;rt;atomic;cray-c++-rts;/usr/lib64/libstdc++.a;supc++;/usr/lib64/libstdc++.a;pthread;c;csup;m;gcc' does not match '^AtpSigHandler;AtpSigHCommData;pthread;sci_cray_mpi_mp;m;f;sci_cray_mp;craymp;m;pthread;f;hugetlbfs;mpichcxx_cray;rt;pthread;ugni;pmi;mpich_cray;rt;pthread;ugni;pmi;pgas-dmapp;fi;u;rt;dmapp;ugni;udreg;pthread;m;cray-c\+\+-rts;stdc\+\+;xpmem;dmapp;pthread;pmi;pthread;alpslli;pthread;wlm_detect;ugni;pthread;alpsutil;pthread;rca;udreg;quadmath;m;omp;rt;craymp;pthread;rt;dl;cray-c\+\+-rts;stdc\+\+;m;modules;m;rt;fi;m;quadmath;rt;craymath;m;gfortran;quadmath;rt;f;m;pthread;rt;u;rt;dl;cray-c\+\+-rts;stdc\+\+;m;csup;rt;atomic;cray-c\+\+-rts;stdc\+\+;supc\+\+;stdc\+\+;pthread;c;csup;m;gcc$'
> 
> Call Stack (most recent call first):
> /home/dexter/src/cmake/Tests/RunCMake/ParseImplicitLinkInfo/RunCMakeTest.cmake:3 (run_cmake)
> 
> -- Inspect - PASSED
> -- DetermineLinkerId - PASSED
> -- ExcludeDirs - PASSED
> 
> 0% tests passed, 1 tests failed out of 1
> 
> Total Test time (real) = 0.73 sec
> 
> The following tests FAILED:
> 475 - RunCMake.ParseImplicitLinkInfo (Failed)
> Errors while running CTest
> 
> ```

The errors says that two strings didn’t match. Here’s what the diff looks like after putting every value on its own line and removing the backslash escapes:

> **Diff #1**
>
> ```diff
> index d00262c..fc098ca 100644
> --- a/tmp/11
> +++ b/tmp/12
> @@ -25,7 +25,7 @@ udreg;
> pthread;
> m;
> cray-c++-rts;
> -/usr/lib64/libstdc++.a;
> +stdc++;
> xpmem;
> dmapp;
> pthread;
> @@ -49,7 +49,7 @@ pthread;
> rt;
> dl;
> cray-c++-rts;
> -/usr/lib64/libstdc++.a;
> +stdc++;
> m;
> modules;
> m;
> @@ -71,12 +71,12 @@ u;
> rt;
> dl;
> cray-c++-rts;
> -/usr/lib64/libstdc++.a;
> +stdc++;
> m;
> csup;
> rt;
> atomic;
> -/usr/lib64/libstdc++.a;
> +stdc++;
> pthread;
> c;
> csup;
> 
> ```

> **Diff #2**
>
> ```diff
> diff --git a/tmp/21 b/tmp/22
> index ccad484..c2b5b6f 100644
> --- a/tmp/21
> +++ b/tmp/22
> @@ -30,7 +30,7 @@ udreg;
> pthread;
> m;
> cray-c++-rts;
> -/usr/lib64/libstdc++.a;
> +stdc++;
> xpmem;
> dmapp;
> pthread;
> @@ -54,7 +54,7 @@ pthread;
> rt;
> dl;
> cray-c++-rts;
> -/usr/lib64/libstdc++.a;
> +stdc++;
> m;
> modules;
> m;
> @@ -76,15 +76,15 @@ u;
> rt;
> dl;
> cray-c++-rts;
> -/usr/lib64/libstdc++.a;
> +stdc++;
> m;
> csup;
> rt;
> atomic;
> cray-c++-rts;
> -/usr/lib64/libstdc++.a;
> +stdc++;
> supc++;
> -/usr/lib64/libstdc++.a;
> +stdc++;
> pthread;
> c;
> csup;
> 
> ```

I’m not using Cray so I’m not really concerned about this one test failing, but I don’t think this is supposed to happen. Let me know if there’s anything more I can do to help narrow down the error.

---

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [February 20, 2025, 3:47pm UTC](https://discourse.cmake.org/t/cmake-4-0-0-rc1-test-failure/13608/2 "2025-02-20T15:47:04Z")

</div>

AFAIK that test and the code it covers has not changed much since earlier releases. The test may not be robust to the presence of `/usr/lib64/libstdc++.a` on disk. We can probably fix that, but I’d like to be able to reproduce this. What distro are you using, and what package is installed that provides that file?

---

<div class="post-metadata">

### Author: ![dextercd](https://discourse.cmake.org/user_avatar/discourse.cmake.org/dextercd/32/5359_2.png) [@dextercd](https://discourse.cmake.org/u/dextercd)
#### Post date: [February 20, 2025, 5:11pm UTC](https://discourse.cmake.org/t/cmake-4-0-0-rc1-test-failure/13608/3 "2025-02-20T17:11:09Z")

</div>

> AFAIK that test and the code it covers has not changed much since earlier releases.

I hadn’t tested this with a 3.X.Y release which I probably should have. Indeed, the test also fails on version 3.31.5.

I’m using Arch Linux. Looks like `/usr/lib64/libstdc++.a` is included with the `gcc` package.

---

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [February 20, 2025, 11:53pm UTC](https://discourse.cmake.org/t/cmake-4-0-0-rc1-test-failure/13608/4 "2025-02-20T23:53:29Z")

</div>

Thanks. I opened [CMake MR 10378](https://gitlab.kitware.com/cmake/cmake/-/merge_requests/10378) to fix this.
