Package: fcitx
Version: 1:3.6.4-1
Severity: wishlist
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu natty ubuntu-patch

Hi,

When linked with binutils-golds, the following compilation errors appears:
...
gcc -O2 -fno-strength-reduce -g -O2   -D_ENABLE_TRAY    
-I/usr/include/freetype2   -D_USE_XFT -Wall -lXpm -lXtst -lpthread -ldl -lXext 
-Wl,-Bsymbolic-functions -o fcitx IC.o ime.o InputWindow.o KeyList.o main.o 
MainWindow.o MyErrorsHandlers.o punc.o py.o PYFA.o pyMapTable.o pyParser.o sp.o 
tools.o ui.o table.o xim.o qw.o tray.o TrayWindow.o DBus.o vk.o about.o 
QuickPhrase.o AutoEng.o extra.o internalVersion.o ImeRemote.o ../lib/libXimd.a 
-lXft   -lX11 
/usr/bin/ld: TrayWindow.o: undefined reference to symbol 'XRenderComposite'
/usr/bin/ld: note: 'XRenderComposite' is defined in DSO 
/usr/lib/libXrender.so.1 so try adding it to the linker command line
collect2: ld returned 1 exit status

After adding -lXrender to LDADD, more errors happens, making necessary moving
some libraries from LDFLAGS to LDADD.

This is the resulting patch, that makes it buildable in Ubuntu:
*** /tmp/tmp6161JJ

We thought you might be interested in doing the same. 

Thanks,

Fabrice


-- System Information:
Debian Release: squeeze/sid
  APT prefers maverick-updates
  APT policy: (500, 'maverick-updates'), (500, 'maverick-security'), (500, 
'maverick-proposed'), (500, 'maverick')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.35-23-generic (SMP w/2 CPU cores)
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru fcitx-3.6.4/debian/patches/fix-as-needed.patch fcitx-3.6.4/debian/patches/fix-as-needed.patch
--- fcitx-3.6.4/debian/patches/fix-as-needed.patch	1970-01-01 01:00:00.000000000 +0100
+++ fcitx-3.6.4/debian/patches/fix-as-needed.patch	2010-11-29 15:30:06.000000000 +0100
@@ -0,0 +1,14 @@
+Description: Fix FTBFS when linked with --as-needed by adding missing -lXrender
+ to LDADD and moving -lpthread, -ldl and -lXpm from LDFLAGS to LDADD
+Author: Fabrice Coutadeur <fabric...@ubuntu.com>
+
+--- fcitx-3.6.4.orig/src/Makefile.am
++++ fcitx-3.6.4/src/Makefile.am
+@@ -36,5 +36,5 @@ fcitx_SOURCES = IC.c IC.h \
+ 		internalVersion.c \
+ 		ImeRemote.c
+ 		
+-fcitx_LDADD = ../lib/libXimd.a
+-fcitx_LDFLAGS = -lXpm -lXtst -lpthread -ldl -lXext
++fcitx_LDADD = ../lib/libXimd.a -lXrender -ldl -lXpm -lpthread
++fcitx_LDFLAGS = -lXtst -lXext
diff -Nru fcitx-3.6.4/debian/patches/series fcitx-3.6.4/debian/patches/series
--- fcitx-3.6.4/debian/patches/series	2010-11-19 08:10:42.000000000 +0100
+++ fcitx-3.6.4/debian/patches/series	2010-11-29 07:31:56.000000000 +0100
@@ -1,2 +1,3 @@
 binutils-gold.patch
 debian-changes-1:3.6.4-1
+fix-as-needed.patch

Reply via email to