Fails to link with GCC5

Bug #1477710 reported by dobey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pay-service (Ubuntu)
Fix Released
Critical
dobey

Bug Description

Linking CXX shared library libpay.so
cd /«BUILDDIR»/pay-service-2.0.0+15.10.20150721/obj-x86_64-linux-gnu/libpay && /usr/bin/cmake -E cmake_link_script CMakeFiles/libpay.dir/link.txt --verbose=1
/usr/bin/x86_64-linux-gnu-g++ -fPIC -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -std=c++11 -g -fvisibility=hidden -Wl,--version-script,/«BUILDDIR»/pay-service-2.0.0+15.10.20150721/libpay/libpay.map -Wl,-Bsymbolic-functions -Wl,-z,relro -shared -Wl,-soname,libpay.so.2.0.0 -o libpay.so.2.0.0 CMakeFiles/libpay.dir/pay-package.cpp.o CMakeFiles/libpay.dir/proxy-package.c.o CMakeFiles/libpay.dir/libpay_automoc.cpp.o -lcurl -ljsoncpp -lubuntu-app-launch -ldbustest -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lclick-0.4 -lmirclient -lmircommon -lprocess-cpp -lubuntuoneauth-2.0 -lQt5DBus -lQt5Network -lsignon-qt5 -laccounts-qt5 -lQt5Xml -lQt5Core ../common/libcommon-lib.a
/usr/bin/ld: ../common/libcommon-lib.a(glib-thread.cpp.o): relocation R_X86_64_PC32 against undefined symbol `_ZTISt13runtime_error@@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

This is due to lbicommon-lib.a being compiled with -FPIE. Because libpay is using it, the linking fails, as PIE is only meant to link into executables.

Related branches

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

This bug was fixed in the package pay-service - 2.0.0+15.10.20150727-0ubuntu1

---------------
pay-service (2.0.0+15.10.20150727-0ubuntu1) wily; urgency=medium

  [ CI Train Bot ]
  * New rebuild forced.

  [ Rodney Dawes ]
  * Add initial go build system integration.
  * Add script and config file to update external go lib sources. Import
    some external go lib sources that we'll need here. Add an os.Exit()
    call to the main() in the new go service.
  * Build the common lib with -fPIC instead of -fPIE as libpay needs it.
    (LP: #1477710)
  * Implement basic empty dbus service.

 -- CI Train Bot <email address hidden> Mon, 27 Jul 2015 17:33:40 +0000

Changed in pay-service (Ubuntu):
status: In Progress → 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.