Compile options prevent use in a shared library

Bug #1774011 reported by Alan Griffiths
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
googletest (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Trying to build the Mir and wlcs test suites on 18.10 Cosmic I get the error:

/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libgtest.a(gtest-all.cc.o): relocation R_X86_64_PC32 against symbol `_ZTVSt9basic_iosIcSt11char_traitsIcEE@@GLIBCXX_3.4' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status

I doubt Mir is the only project to make use of libgtest in shared objects. The libgtest should be compiled with -fPIC.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package googletest - 1.8.0-10ubuntu1

---------------
googletest (1.8.0-10ubuntu1) cosmic; urgency=medium

  * Build with -fPIC. There's nothing performance critical here which benefits
    from position-dependent code, and building with -fPIC allows the pre-built
    library to be linked into shared code. (LP: #1774011)

 -- Christopher James Halse Rogers <email address hidden> Wed, 06 Jun 2018 13:24:29 +1000

Changed in googletest (Ubuntu):
status: New → Fix Released
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.