[Bug 21340] New: Linking against tpqt4 fails on x86_64 due to it not being compiled with -fPIC

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Apr 22 15:29:08 CEST 2009


http://bugs.freedesktop.org/show_bug.cgi?id=21340

           Summary: Linking against tpqt4 fails on x86_64 due to it not
                    being compiled with -fPIC
           Product: Telepathy
           Version: unspecified
          Platform: x86-64 (AMD64)
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: telepathy-qt4
        AssignedTo: telepathy-bugs at lists.freedesktop.org
        ReportedBy: grundleborg at googlemail.com


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) \


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the telepathy-bugs mailing list