Public bug reported:

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.

** Affects: benchmark (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1887872

Title:
  Linking against libbenchmark_main fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/benchmark/+bug/1887872/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to