Linking against libbenchmark_main fails

Bug #1887872 reported by Scott K Logan
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
benchmark (Debian)
Fix Released
Unknown
benchmark (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

There appears to be a packaging patch that makes libbenchmark a shared library, but that patch doesn't also make libbenchmark_main a shared library. Trying to link against libbenchmark_main.a to use it as it is intended results in a link error:

/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x24): undefined reference to `main'
collect2: error: ld returned 1 exit status

A simple solution would be to extend the patch to make libbenchmark_main a shared object library as well, or alternatively use the CMake argument -DBUILD_SHARED_LIBS=ON to make both libraries shared.

Changed in benchmark (Debian):
status: Unknown → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in benchmark (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.