unblock 421341 by 421301
tags 421341 patch
clone 421341 -1
retitle -1 Linking failure at runtime, ABI mismatch between libgcj7-1 and 
libstdc++6
tags -1 = sid
thanks

On Sat, Apr 28, 2007 at 08:21:36PM +0200, Aurélien GÉRÔME wrote:
>I noticed that gcj-4.1 is currently broken in Sid. Please see
>Bug#421301 for reference.

Sorry, it was a mistake from my part, there is absolutely no relation
with Bug#421301 whatsoever; stupid me.


Besides, I fixed our current Bug#421341. Previously, pdftk used gcj-4.1
(4.1.1) currently in Lenny, but gcj-4.1 (4.1.2) recently got into
Sid. It seems that the behaviour of gcjh changed from 4.1.1 to 4.1.2,
so I fixed the makefiles accordingly. The patch which I will use in
the next upload is attached. Also, I will surely clean it up a bit,
as I have to upload a new upstream release anyway.


Unfortunately, even though pdftk now builds fine, it crashes at
runtime.

$ pdftk
libgcj failure: gcj linkage error.
Incorrect library ABI version detected.  Aborting.

The resulting pdftk binary is linked against:

  * libgcj.so.71 from the binary package libgcj7-1 coming from the
    source package gcj-4.1 (4.1.2);

  * libstdc++.so.6 from the binary package libstdc++6 coming from
    the source package gcc-4.2.

It seems that libgcj.so.71 does not agree to be linked with such
libstdc++.so.6. It is apparently due to an ABI mismatch between
libgcj.so.71 and libstdc++.so.6. Please see [1] for reference.

Cheers,

[1] <http://gcc.gnu.org/ml/java-patches/2007-q1/msg00168.html>
-- 
 .''`.   Aurélien GÉRÔME
: :'  :
`. `'`   Free Software Developer
  `-     Unix Sys & Net Admin
--- pdftk-1.40.orig/pdftk/Makefile.Debian
+++ pdftk-1.40/pdftk/Makefile.Debian
@@ -23,7 +23,7 @@
 # if you want pdftk to ask before overwriting a file, set
 # ASK_ABOUT_WARNINGS to true; otherwise: false; override this default
 # with the dont_ask or do_ask command-line options
-CPPFLAGS= -O3 -DPATH_DELIM=0x2f -DASK_ABOUT_WARNINGS=false 
-fdollars-in-identifiers
+CPPFLAGS= -w -O3 -DPATH_DELIM=0x2f -DASK_ABOUT_WARNINGS=false 
-fdollars-in-identifiers
 CXXFLAGS= -lgcj
 
 # itext compiler flags
--- pdftk-1.40.orig/java_libs/gnu/gcj/convert/Makefile
+++ pdftk-1.40/java_libs/gnu/gcj/convert/Makefile
@@ -25,8 +25,8 @@
 # the "$*" automatic variable, here
 #
 %.h : %.class
-       $(GCJH) --classpath="." $*;
-       $(RM) $<
+       $(GCJH) --classpath="/usr/share/java/libgcj-4.1.jar:$(PWD):." $*
+#      $(RM) $<
 
 ##
 # targets
--- pdftk-1.40.orig/java_libs/java_local/security/Makefile
+++ pdftk-1.40/java_libs/java_local/security/Makefile
@@ -25,8 +25,8 @@
 # the "$*" automatic variable, here
 #
 %.h : %.class
-       $(GCJH) --classpath="." $*;
-       $(RM) $<
+       $(GCJH) --classpath="/usr/share/java/libgcj-4.1.jar:$(PWD):." $*
+#      $(RM) $<
 
 ##
 # targets
--- pdftk-1.40.orig/java_libs/gnu_local/java/security/provider/Makefile
+++ pdftk-1.40/java_libs/gnu_local/java/security/provider/Makefile
@@ -25,8 +25,8 @@
 # the "$*" automatic variable, here
 #
 %.h : %.class
-       $(GCJH) --classpath="." $*;
-       $(RM) $<
+       $(GCJH) --classpath="/usr/share/java/libgcj-4.1.jar:$(PWD):." $*
+#      $(RM) $<
 
 ##
 # targets
--- pdftk-1.40.orig/java_libs/gnu_local/java/security/Makefile
+++ pdftk-1.40/java_libs/gnu_local/java/security/Makefile
@@ -25,8 +25,8 @@
 # the "$*" automatic variable, here
 #
 %.h : %.class
-       $(GCJH) --classpath="." $*;
-       $(RM) $<
+       $(GCJH) --classpath="/usr/share/java/libgcj-4.1.jar:$(PWD):." $*
+#      $(RM) $<
 
 ##
 # targets
--- pdftk-1.40.orig/java_libs/com/lowagie/text/xml/xmp/Makefile
+++ pdftk-1.40/java_libs/com/lowagie/text/xml/xmp/Makefile
@@ -25,8 +25,8 @@
 # the "$*" automatic variable, here
 #
 %.h : %.class
-       $(GCJH) --classpath="." $*;
-       $(RM) $<
+       $(GCJH) --classpath="/usr/share/java/libgcj-4.1.jar:$(PWD):." $*
+#      $(RM) $<
 
 ##
 # targets
--- pdftk-1.40.orig/java_libs/com/lowagie/text/pdf/Makefile
+++ pdftk-1.40/java_libs/com/lowagie/text/pdf/Makefile
@@ -25,8 +25,8 @@
 # the "$*" automatic variable, here
 #
 %.h : %.class
-       $(GCJH) --classpath="." $*;
-       $(RM) $<
+       $(GCJH) --classpath="/usr/share/java/libgcj-4.1.jar:$(PWD):." $*
+#      $(RM) $<
 
 ##
 # targets
--- pdftk-1.40.orig/java_libs/com/lowagie/text/pdf/fonts/Makefile
+++ pdftk-1.40/java_libs/com/lowagie/text/pdf/fonts/Makefile
@@ -34,8 +34,8 @@
 # the "$*" automatic variable, here
 #
 %.h : %.class
-       $(GCJH) --classpath="." $*;
-       $(RM) $<
+       $(GCJH) --classpath="/usr/share/java/libgcj-4.1.jar:$(PWD):." $*
+#      $(RM) $<
 
 ##
 # targets
--- pdftk-1.40.orig/java_libs/com/lowagie/text/pdf/codec/postscript/Makefile
+++ pdftk-1.40/java_libs/com/lowagie/text/pdf/codec/postscript/Makefile
@@ -25,8 +25,8 @@
 # the "$*" automatic variable, here
 #
 %.h : %.class
-       $(GCJH) --classpath="." $*;
-       $(RM) $<
+       $(GCJH) --classpath="/usr/share/java/libgcj-4.1.jar:$(PWD):." $*
+#      $(RM) $<
 
 ##
 # targets
--- pdftk-1.40.orig/java_libs/com/lowagie/text/pdf/codec/wmf/Makefile
+++ pdftk-1.40/java_libs/com/lowagie/text/pdf/codec/wmf/Makefile
@@ -25,8 +25,8 @@
 # the "$*" automatic variable, here
 #
 %.h : %.class
-       $(GCJH) --classpath="." $*;
-       $(RM) $<
+       $(GCJH) --classpath="/usr/share/java/libgcj-4.1.jar:$(PWD):." $*
+#      $(RM) $<
 
 ##
 # targets
--- pdftk-1.40.orig/java_libs/com/lowagie/text/pdf/codec/Makefile
+++ pdftk-1.40/java_libs/com/lowagie/text/pdf/codec/Makefile
@@ -25,8 +25,8 @@
 # the "$*" automatic variable, here
 #
 %.h : %.class
-       $(GCJH) --classpath="." $*;
-       $(RM) $<
+       $(GCJH) --classpath="/usr/share/java/libgcj-4.1.jar:$(PWD):." $*
+#      $(RM) $<
 
 ##
 # targets
--- pdftk-1.40.orig/java_libs/com/lowagie/text/markup/Makefile
+++ pdftk-1.40/java_libs/com/lowagie/text/markup/Makefile
@@ -25,8 +25,8 @@
 # the "$*" automatic variable, here
 #
 %.h : %.class
-       $(GCJH) --classpath="." $*;
-       $(RM) $<
+       $(GCJH) --classpath="/usr/share/java/libgcj-4.1.jar:$(PWD):." $*
+#      $(RM) $<
 
 ##
 # targets
--- pdftk-1.40.orig/java_libs/com/lowagie/text/Makefile
+++ pdftk-1.40/java_libs/com/lowagie/text/Makefile
@@ -25,14 +25,15 @@
 # the "$*" automatic variable, here
 #
 %.h : %.class
-       $(GCJH) --classpath="." $*;
-       $(RM) $<
+       $(GCJH) --classpath="/usr/share/java/libgcj-4.1.jar:$(PWD):." $*
 
 ##
 # targets
 
 all : $(library) $(headers)
 
+$(classes): $(sources)
+
 $(library) : $(objects)
        $(AR) $(ARFLAGS) $(library) $(objects);
 
--- pdftk-1.40.orig/java_libs/com/lowagie/bc/asn1/Makefile
+++ pdftk-1.40/java_libs/com/lowagie/bc/asn1/Makefile
@@ -25,8 +25,8 @@
 # the "$*" automatic variable, here
 #
 %.h : %.class
-       $(GCJH) --classpath="." $*;
-       $(RM) $<
+       $(GCJH) --classpath="/usr/share/java/libgcj-4.1.jar:$(PWD):." $*
+#      $(RM) $<
 
 ##
 # targets
--- pdftk-1.40.orig/java_libs/Makefile
+++ pdftk-1.40/java_libs/Makefile
@@ -11,7 +11,7 @@
 java_libs_root= $(CURDIR)
 
 # append gcj flags
-export GCJFLAGS+= --encoding=UTF-8 --classpath="$(java_libs_root)"
+export GCJFLAGS+= -w --encoding=UTF-8 --classpath="$(java_libs_root)"
 
 all : libgcj_local itext
 

Attachment: signature.asc
Description: Digital signature

Reply via email to