← All tasks
cppcatchorg/Catch2 #1149Not a task: not reproduced

Spurious linker errors since v2.1.0

envgap__catchorg__Catch2-1149

Original GitHub issue ↗Opened 2018-01-12

01 / FAILURE SIGNATURE

As reported upstream

generate_report.cpp:(.text+0x3780): undefined reference to `Catch::AssertionHandler::handleExpr(Catch::ITransientExpression const&)'
Not a benchmark task.
  • No curated issue-specific recipe or verified environment fix is available.

02 / ENVIRONMENT RECIPE

Base commit
Not freshly verified
Manifest
CMakeLists.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

catchorg/Catch2 #1149 · read the original issue
## Description



We encounter some new problems with a code that includes the latest version of Catch during build.  One of the recent code changes triggers spurious **linker** errors. Interesting enough some executables are built, other not, but their code differs only slightly.



A bisection shows that the error does **not** occur up to revision



```

commit f5910f38ef38ac2cca9f3830804abf6d9a8d40bf

Author: Martin Hořeňovský <martin.horenovsky@gmail.com>

Date:   Wed Jan 10 13:44:08 2018 +0100



    Copy reporters to single_include during releases

```



but is introduced via changes in 

```

commit cd76f5730c9a3afa19f3b9c83608d9c7ab325a19

Author: Martin Hořeňovský <martin.horenovsky@gmail.com>

Date:   Wed Jan 10 13:53:04 2018 +0100



    v2.1.0

```



for 2 versions of gcc and clang-6.0. This gives me some headache, because I do not see what could have triggered it.



### Steps to reproduce



Unfortunately no small example can be provided yet. The error messages are:



```

cd /home/markus/PROJECT/lib-lshape-detection/build/test-catch && /usr/bin/cmake -E cmake_link_script CMakeFiles/generate_report.dir/link.txt --verbose=1

/usr/bin/c++      CMakeFiles/generate_report.dir/generate_report.cpp.o CMakeFiles/generate_report.dir/test_main.cpp.o  -o generate_report -rdynamic ../liblshape-detection.a -lboost_system -lboost_filesystem -ldl 

CMakeFiles/generate_report.dir/generate_report.cpp.o: In function `____C_A_T_C_H____T_E_S_T____0()':

generate_report.cpp:(.text+0x3780): undefined reference to `Catch::AssertionHandler::handleExpr(Catch::ITransientExpression const&)'

generate_report.cpp:(.text+0x379e): undefined reference to `Catch::AssertionHandler::complete()'

generate_report.cpp:(.text+0x39d6): undefined reference to `Catch::AssertionHandler::handleUnexpectedInflightException()'

CMakeFiles/generate_report.dir/generate_report.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > Catch::Detail::stringify<int>(int const&)':

generate_report.cpp:(.text._ZN5Catch6Detail9stringifyIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_[_ZN5Catch6Detail9stringifyIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_]+0x2f): undefined reference to `Catch::StringMaker<int, void>::convert[abi:cxx11](int)'

collect2: error: ld returned 1 exit status

test-catch/CMakeFiles/generate_report.dir/build.make:124: recipe for target 'test-catch/generate_report' failed

make[3]: *** [test-catch/generate_report] Error 1

make[3]: Leaving directory '/home/markus/PROJECT/lib-lshape-detection/build'

CMakeFiles/Makefile2:1216: recipe for target 'test-catch/CMakeFiles/generate_report.dir/all' failed

make[2]: *** [test-catch/CMakeFiles/generate_report.dir/all] Error 2

make[2]: Leaving directory '/home/markus/PROJECT/lib-lshape-detection/build'

CMakeFiles/Makefile2:1228: recipe for target 'test-catch/CMakeFiles/generate_report.dir/rule' failed

make[1]: *** [test-catch/CMakeFiles/generate_repor
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

underspecification
Label rules and the text that matched
[
  {
    "category": "underspecification",
    "rule": "signature.missing_system_requirement",
    "source": "failure_signature",
    "excerpt": "generate_report.cpp:(.text+0x3780): undefined reference to `Catch::AssertionHandler::handleExpr(Catch::ITransientExpression const&)'"
  }
]

Issue-specific recipe and runtime smoke command require review against the complete issue and repository.

Legacy reproduction is generic install-only; match the actual issue failure before admission.