Bug 21340 - Linking against tpqt4 fails on x86_64 due to it not being compiled with -fPIC
Summary: Linking against tpqt4 fails on x86_64 due to it not being compiled with -fPIC
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-qt (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on: 22910
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-22 06:29 UTC by George Goldberg
Modified: 2009-11-10 07:14 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description George Goldberg 2009-04-22 06:29:07 UTC
Linking against telepathy-qt4 fails on x86_64 fails because it is a staic library but not compiled with -fPIC.

The patch below applies to current master of tpqt4. I suspect it's not a correct fix, but it does the trick for now. It would be great if someone with more autofoo knowledge than me could take a quick look at this issue and fix it.

--------------------------------------------------------------------------------

diff --git a/TelepathyQt4/Makefile.am b/TelepathyQt4/Makefile.am
index 32f587e..0c028b1 100644
--- a/TelepathyQt4/Makefile.am
+++ b/TelepathyQt4/Makefile.am
@@ -38,7 +38,7 @@ lib_LTLIBRARIES = libtelepathy-qt4.la
 # that vim quickfix mode (:make) doesn't interpret the libtool --mode=link
 # command as an error message in a bizarrely named file
 libtelepathy_qt4_la_LDFLAGS = \
-    -version-info "$(LT_CURRENT)":"$(LT_REVISION)":"$(LT_AGE)" -static
+    -version-info "$(LT_CURRENT)":"$(LT_REVISION)":"$(LT_AGE)" -static -fPIC
 libtelepathy_qt4_la_LIBADD = $(ALL_LIBS)
 libtelepathy_qt4_la_DEPENDENCIES = Makefile.am
 
@@ -281,10 +281,12 @@ check-local: check-coding-style
 AM_CPPFLAGS = \
     -I$(top_srcdir) -I$(top_builddir) \
     $(QTCORE_CFLAGS) \
-    $(QTDBUS_CFLAGS)
+    $(QTDBUS_CFLAGS) \
+    -fPIC
 
 AM_CXXFLAGS = \
-    $(ERROR_CXXFLAGS)
+    $(ERROR_CXXFLAGS) \
+    -fPIC
 
 ALL_LIBS = \
     $(QTCORE_LIBS) \
Comment 1 Simon McVittie 2009-10-09 08:37:05 UTC
This will be solved by making telepathy-qt4 into a real shared library.
Comment 2 Andre Moreira Magalhaes 2009-11-10 07:14:34 UTC
Fixed upstream, in version 0.2.0


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.