[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#425863: FTBFS: teckit/libtool yields multiple definition errors



Package: texlive-bin
Version: 2007-8
Severity: serious
Tags: patch
Justification: no longer builds from source

The version of libtool in .../libs/teckit is buggy (rant about libtool
in general elided ;-).  Specifically, it directs g++ to link in
certain system objects that the compiler would normally supply itself,
but neglects to tell the compiler not to introduce its own instances
of the same objects.  As a result, texlive-bin FTBFS on amd64 (and
presumably other architectures as well):

[...]
/bin/sh ../libtool --mode=link g++  -g -O2 -DNDEBUG   -o libTECkit_Compiler.la -rpath /build/buildd/texlive-bin-2007/build/source/inst/lib  Compiler.lo UnicodeNames.lo  
g++ -shared /usr/lib/gcc/x86_64-linux-gnu/4.1.3/../../../../lib/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.1.3/crtbeginS.o  .libs/Compiler.o .libs/UnicodeNames.o  -L/usr/lib/gcc/x86_64-linux-gnu/4.1.3 -L/usr/lib/gcc/x86_64-linux-gnu/4.1.3/../../../../lib -L/lib/../lib -L/usr/lib/../lib -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/4.1.3/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/4.1.3/../../../../lib/crtn.o  -o .libs/libTECkit_Compiler.0.0.0
/usr/lib/gcc/x86_64-linux-gnu/4.1.3/../../../../lib/crti.o: In function `_init':
/tmp/glibc-2.5/build-tree/amd64-libc/csu/crti.S:25: multiple definition of `_init'
/usr/lib/gcc/x86_64-linux-gnu/4.1.3/../../../../lib/crti.o:/tmp/glibc-2.5/build-tree/amd64-libc/csu/crti.S:25: first defined here
/usr/lib/gcc/x86_64-linux-gnu/4.1.3/../../../../lib/crti.o: In function `_fini':
/tmp/glibc-2.5/build-tree/amd64-libc/csu/crti.S:37: multiple definition of `_fini'
/usr/lib/gcc/x86_64-linux-gnu/4.1.3/../../../../lib/crti.o:/tmp/glibc-2.5/build-tree/amd64-libc/csu/crti.S:37: first defined here
/usr/lib/gcc/x86_64-linux-gnu/4.1.3/crtbeginS.o:(.data.rel+0x0): multiple definition of `__dso_handle'
/usr/lib/gcc/x86_64-linux-gnu/4.1.3/crtbeginS.o:(.data.rel+0x0): first defined here
collect2: ld returned 1 exit status
make[4]: *** [libTECkit_Compiler.la] Error 1
make[4]: Leaving directory `/build/buildd/texlive-bin-2007/build/source/Work/libs/teckit/lib'
[...]

The attached patch addresses this by supplying -nostdlib per the
current /usr/share/aclocal/libtool.m4 (which BTW contains many other
changes, none of which appear to be necessary at the moment); could
you please apply it ASAP (particularly given that most of texlive now
specifically depends on texlive-bin 2007-8)?

Thanks!

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.21.1 (SMP w/2 CPU cores)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash
 build/source/libs/teckit/aclocal.m4 |    2 +-
 build/source/libs/teckit/configure  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff -urNad texlive-bin-2007~/build/source/libs/teckit/aclocal.m4 texlive-bin-2007/build/source/libs/teckit/aclocal.m4
--- texlive-bin-2007~/build/source/libs/teckit/aclocal.m4	2006-07-26 05:16:06.000000000 -0400
+++ texlive-bin-2007/build/source/libs/teckit/aclocal.m4	2007-05-24 11:39:15.196126313 -0400
@@ -3564,7 +3564,7 @@
     # linker, instead of GNU ld.  If possible, this setting should
     # overridden to take advantage of the native linker features on
     # the platform it is being used on.
-    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
   fi
 
   # Commands to make compiler produce verbose output that lists
diff -urNad texlive-bin-2007~/build/source/libs/teckit/configure texlive-bin-2007/build/source/libs/teckit/configure
--- texlive-bin-2007~/build/source/libs/teckit/configure	2006-10-08 18:30:14.000000000 -0400
+++ texlive-bin-2007/build/source/libs/teckit/configure	2007-05-24 11:39:36.700320817 -0400
@@ -9745,7 +9745,7 @@
     # linker, instead of GNU ld.  If possible, this setting should
     # overridden to take advantage of the native linker features on
     # the platform it is being used on.
-    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
   fi
 
   # Commands to make compiler produce verbose output that lists

Reply to: