BullseyeCoverage Up Contents Search

Unresolved Symbol cov_probe_v12

SYMPTOMS

The linker reports unresolved symbols with prefix cov_, including cov_probe_v12.

CAUSE AND RESOLUTION

Possible causes and resolutions are listed below.

Cause 1

You are attempting to build with BullseyeCoverage disabled, but some object files or libraries contain instrumented code from a previous build produced with BullseyeCoverage enabled.

Resolution

With coverage build disabled, do a clean build of all object files and libraries included in the link command that failed. If the problem persists, you did not do a completely clean build.


Cause 2

A Visual Studio project overrides the Executable Directories setting that BullseyeCoverage uses for integration.

How to Verify This Cause

For some projects, Visual Studio invokes BullseyeCoverage interceptors. But for others, Visual Studio invokes the Microsoft compiler and linker directly.

ClCompile:
  C:\Program Files\BullseyeCoverage\bin\cl.exe ...BullseyeCoverage interceptor
  ...
Link:
  C:\Program Files\BullseyeCoverage\bin\link.exe ...BullseyeCoverage interceptor
  ...

ClCompile:
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.28\bin\HostX64\x64\cl.exe ...Microsoft compiler
  ...
Link:
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.28\bin\HostX64\x64\link.exe ...Microsoft linker
  ...

Resolution

See Microsoft Visual Studio section Executable Directories.


Cause 3

The coverage build setting changed during your build. The cov01 command was invoked before your build finished, possibly intended for a different project that was building simultaneously on the same computer. The setting is global by default.

How to Verify This Cause

In the build output, the BullseyeCoverage banner stops occurring, and then a link command produces the unresolved symbol error. Note: do not use covc option -q/--quiet or --no-banner when diagnosing this cause.

BullseyeCoverage Compile C++                    ← banner present
Copyright (c) Bullseye Testing Technology
compile command ...

BullseyeCoverage Compile C++                    ← banner present
Copyright (c) Bullseye Testing Technology
compile command ...banner stops
compile command ...banner missing
compile command ...banner missing
link command ...
error: unresolved symbol cov_probe_v12

Resolution

Make the coverage build setting local to your session by setting the COVBUILDZONE environment variable. Then rebuild clean.


Cause 4

Your project is properly integrated with BullseyeCoverage for compiling but not for linking.

How to Verify This Cause

In the build output, the BullseyeCoverage banner occurs before all compile commands, but not before link commands that produce the unresolved symbol error.

BullseyeCoverage Compile C++                    ← banner present
Copyright (c) Bullseye Testing Technology
compile command ...

BullseyeCoverage Compile C++                    ← banner present
Copyright (c) Bullseye Testing Technology
compile command ...banner missing
link command ...
error: unresolved symbol cov_probe_v12

Resolution

See Integrating With Your Build Process.


Cause 5

You are targeting an embedded system for which there is no supplied run-time library.

How to Verify This Cause

Check Configuring Development Systems for instructions specific to your target.

Resolution

If there are no instructions specific to your target, see Embedded Systems.


Cause 6

The covc option --no-lib is enabled.

How to Verify This Cause

Enable covc option -v with this command:

echo -v >>"%USERPROFILE%\covc.cfg    ← Windows
echo -v >>$HOME/covc.cfg             ← Unix-like shell

Rebuild your project and look for --no-lib in the build output.

arguments=BullseyeCoverage/bin/covc -v --no-lib ...
cfg=[directory/covc.cfg=--no-lib]

Resolution

Remove the option from your build settings or configuration file. This option may occur in homedir/covc.cfg or BullseyeCoverage/bin/covc.cfg.


Cause 7

There is a BullseyeCoverage run-time library version mismatch.

How to Verify This Cause

The version number in the cov_probe symbol differs from that shown in the SYMPTOMS section above.

Resolution

Remove all BullseyeCoverage run-time libraries, then reinstall the product to restore the run-time libraries. If you built your own run-time library, rebuild it using the supplied run-time sources.


Cause 8

Your link command includes an object or library named libcov*, but it does not implement the BullseyeCoverage small footprint run-time.

How to Verify This Cause

Look for a filename libcov* in your build log.

Resolution

Remove or rename the file.


Cause 9

A Linux kernel module was instrumented but the module does not specify an initialization entry point.

Resolution

See Linux Kernel Modules section Module Initialization.

MORE INFORMATION

The version number in the symbol is not directly related to the covc version number.

Do not add the BullseyeCoverage run-time library to your link command unless you have a specially built version of the BullseyeCoverage run-time library for an embedded target. For most targets, the BullseyeCoverage compiler and linker interceptors automatically modify the link command to add the correct run-time library for the target platform, add required system libraries, and ensure proper ordering of libraries. For Windows DLLs in particular, BullseyeCoverage makes numerous non-trivial changes.

Updated: 12 Oct 2023