Hi,

 I investigated this issue, and found a problem in debian/rules.

> # --as-needed needs to be in front of all library flags. a small hack to
> # achieve this
> CC := gcc -Wl,--as-needed
> CXX := g++ -Wl,--as-needed

 This --as-needed should be defined as LDFLAGS as attached patch.

 And I also got below error after patching
> make[5]: Entering directory `/abiword-2.8.2/plugins/mathview/itex2mml'
> /abiword-2.8.2/missing: line 52: flex: command not found
> WARNING: `flex' is missing on your system.  You should only need it if
>          you modified a `.l' file.  You may need the `Flex' package
>          in order for those modifications to take effect.  You can get
>          `Flex' from any GNU archive site.

 and 

> Making all in mathview
> make[4]: Entering directory `/abiword-2.8.2/plugins/mathview'
> Making all in data
> Making all in itex2mml
> make[5]: Entering directory `/abiword-2.8.2/plugins/mathview/itex2mml'
> /bin/bash: yacc: command not found

 needed to add flex and bison to Buiid-Depends.

 At the end, I could build it fine with pbuilder.
 Please check and apply it, thanks.


-- 
Regards,

 Hideki Yamane     henrich @ debian.or.jp/iijmio-mail.jp
 http://wiki.debian.org/HidekiYamane
diff -u abiword-2.8.2/debian/rules abiword-2.8.2/debian/rules
--- abiword-2.8.2/debian/rules
+++ abiword-2.8.2/debian/rules
@@ -31,10 +31,7 @@
 DEB_INSTALL_DOCS_abiword := $(CURDIR)/user/wp/readme.txt $(CURDIR)/user/wp/readme.abw
 DEB_DH_MAKESHLIBS_ARGS_libabiword-2.8 := -V "libabiword-2.8 (= $(DEB_VERSION))"
 
-# --as-needed needs to be in front of all library flags. a small hack to
-# achieve this
-CC := gcc -Wl,--as-needed
-CXX := g++ -Wl,--as-needed
+LDFLAGS = -Wl,-z,defs,--as-needed
 
 # handle DEB_BUILD_OPTIONS
 # noopt is handled by cdbs' langcore.mk
diff -u abiword-2.8.2/debian/control abiword-2.8.2/debian/control
--- abiword-2.8.2/debian/control
+++ abiword-2.8.2/debian/control
@@ -2,7 +2,7 @@
 Section: gnome
 Priority: optional
 Maintainer: Patrik Fimml <pat...@fimml.at>
-Build-Depends: cdbs, debhelper (>= 7), quilt, libaiksaurus-1.2-dev (>= 1.2.1+dev-0.12-1.1), libaiksaurusgtk-1.2-dev (>= 1.2.1+dev-0.12-1.1), libasio-dev (>= 1.4.1), libenchant-dev (>= 1.2.0), libfreetype6-dev, libfribidi-dev, libglade2-dev, libglib2.0-dev, libgsf-1-dev (>= 1.13.2), libgtk2.0-dev, libgtkmathview-dev (>= 0.7.5), liblink-grammar4-dev, libloudmouth1-dev, libots-dev, libpng-dev, libpopt-dev, libreadline-dev, libwmf-dev, libwpd-dev, libwpg-dev (>= 0.1.0), libwps-dev, libwv-dev (>= 1.2), libgoffice-0.8-dev, libgucharmap2-dev, libpsiconv-dev (>= 0.9.4), librsvg2-dev (>= 2.16.0), libboost-regex-dev, libsoup2.4-dev, libdbus-glib-1-dev, libxslt-dev, libaspell-dev
+Build-Depends: cdbs, debhelper (>= 7), quilt, libaiksaurus-1.2-dev (>= 1.2.1+dev-0.12-1.1), libaiksaurusgtk-1.2-dev (>= 1.2.1+dev-0.12-1.1), libasio-dev (>= 1.4.1), libenchant-dev (>= 1.2.0), libfreetype6-dev, libfribidi-dev, libglade2-dev, libglib2.0-dev, libgsf-1-dev (>= 1.13.2), libgtk2.0-dev, libgtkmathview-dev (>= 0.7.5), liblink-grammar4-dev, libloudmouth1-dev, libots-dev, libpng-dev, libpopt-dev, libreadline-dev, libwmf-dev, libwpd-dev, libwpg-dev (>= 0.1.0), libwps-dev, libwv-dev (>= 1.2), libgoffice-0.8-dev, libgucharmap2-dev, libpsiconv-dev (>= 0.9.4), librsvg2-dev (>= 2.16.0), libboost-regex-dev, libsoup2.4-dev, libdbus-glib-1-dev, libxslt-dev, libaspell-dev, flex, bison
 Standards-Version: 3.8.4
 Homepage: http://www.abisource.com/
 Vcs-Browser: http://git.debian.org/?p=users/patrikf-guest/abiword.git;a=summary
diff -u abiword-2.8.2/debian/changelog abiword-2.8.2/debian/changelog
--- abiword-2.8.2/debian/changelog
+++ abiword-2.8.2/debian/changelog
@@ -1,3 +1,13 @@
+abiword (2.8.2-2.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * debian/rules
+    - set LDFLAGS for --as-needed flag, this fixes FTBFS (Closes: #577871)
+  * debian/control
+    - add "Build-Depends: flex, bison" 
+
+ -- Hideki Yamane (Debian-JP) <henr...@debian.or.jp>  Wed, 28 Apr 2010 20:14:13 +0900
+
 abiword (2.8.2-2) unstable; urgency=low
 
   * Move from libgoffice-0-8-dev to libgoffice-0.8-dev (see #570351,

Reply via email to