Bug#576637: cpio: FTBFS: multiple definition of `fatal_exit'
Sergey Poznyakoff wrote: > Clint Adams ha escrit: >> The mt man page suggests that a fatal error should exit with a 2; >> mt's fatal_exit exits with a 1 (MT_EXIT_INVOP). >> >> What is truly intended here? > > The former: it shoud exit with code 2. Thanks for reporting. This patch (plus an “autoreconf -fi” to make sure the patched src/Makefile.am takes effect) works for me. Maybe it can be useful. -- 8< -- From: Clint Adams Date: Tue, 6 Apr 2010 14:26:39 + Subject: Remove the extra definition of fatal_exit from mt Including two versions of fatal_exit() (one from 47cc786, one from upstream) is causing multiple definition errors on some machines. Remove fatal_exit() from mt.c, which should solve that problem and also return the proper error code (instead of 1). --- src/mt.c |6 -- 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/src/mt.c b/src/mt.c index 05e94dc..4a10d35 100644 --- a/src/mt.c +++ b/src/mt.c @@ -307,12 +307,6 @@ print_status (char *dev, int desc) #endif } -void -fatal_exit () -{ - exit (MT_EXIT_INVOP); -} - int main (int argc, char **argv) { -- 1.7.1.rc1 -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#576637: cpio: FTBFS: multiple definition of `fatal_exit'
On 2010-04-06 21:28 +0200, Sven Joachim wrote: > On 2010-04-06 20:02 +0200, Clint Adams wrote: > >> On Tue, Apr 06, 2010 at 05:06:49PM +0200, Sven Joachim wrote: >>> What exactly is the problem? It seems to work for me. >> >> Furthermore -2 is building on the buildds just as it does >> in my chroot. > > And it still fails here, even in pbuilder. I'm attaching a log of > "LANG=C debian/rules build" for the reference. That was probably not too enlightening, attached is a more verbose log (LANG=C debian/rules V=1 build). Sven build-log.gz Description: log of failed build for cpio 2.11-2
Bug#576637: cpio: FTBFS: multiple definition of `fatal_exit'
So with mine, fatal.o isn't even being linked in: gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../src -I.. -I. -I.. -I../../gnu -I../gnu -I../../lib -I../lib-Wall -g -O2 -MT mt.o -MD -MP -MF .deps/mt.Tpo -c -o mt.o ../../src/mt.c ../../src/mt.c: In function 'parse_opt': ../../src/mt.c:213: warning: operation on 'count' may be undefined mv -f .deps/mt.Tpo .deps/mt.Po gcc -std=gnu99 -Wall -g -O2 -o mt mt.o ../lib/libpax.a ../gnu/libgnu.a -lrt mt.o: In function `main': /tmp/buildd/cpio-2.11/obj/src/../../src/mt.c:321: undefined reference to `fatal_exit' ../lib/libpax.a(error.o): In function `read_fatal_details': /tmp/buildd/cpio-2.11/obj/lib/../../lib/error.c:210: undefined reference to `fatal_exit' ../lib/libpax.a(error.o): In function `call_arg_fatal': /tmp/buildd/cpio-2.11/obj/lib/../../lib/error.c:71: undefined reference to `fatal_exit' collect2: ld returned 1 exit status make[3]: *** [mt] Error 1 make[3]: Leaving directory `/tmp/buildd/cpio-2.11/obj/src' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/tmp/buildd/cpio-2.11/obj' make[1]: *** [all] Error 2 make[1]: Leaving directory `/tmp/buildd/cpio-2.11/obj' make: *** [build] Error 2 dpkg-buildpackage: error: debian/rules build gave error exit status 2 -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#576637: [Bug-cpio] Re: Bug#576637: cpio: FTBFS: multiple definition of `fatal_exit'
Clint Adams ha escrit: > The mt man page suggests that a fatal error should exit with a 2; > mt's fatal_exit exits with a 1 (MT_EXIT_INVOP). > > What is truly intended here? The former: it shoud exit with code 2. Thanks for reporting. Regards, Sergey -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#576637: cpio: FTBFS: multiple definition of `fatal_exit'
On Tue, Apr 06, 2010 at 08:49:37PM +0200, Sven Joachim wrote: > suggests that the fatal_exit function from mt.c is the intended one, but > naming it like a function with different semantics in fatal.c is highly > confusing, to say the least. Sergey, The mt man page suggests that a fatal error should exit with a 2; mt's fatal_exit exits with a 1 (MT_EXIT_INVOP). What is truly intended here? -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#576637: cpio: FTBFS: multiple definition of `fatal_exit'
On 2010-04-06 20:02 +0200, Clint Adams wrote: > On Tue, Apr 06, 2010 at 05:06:49PM +0200, Sven Joachim wrote: >> What exactly is the problem? It seems to work for me. > > Furthermore -2 is building on the buildds just as it does > in my chroot. And it still fails here, even in pbuilder. I'm attaching a log of "LANG=C debian/rules build" for the reference. Sven LANG=C debian/rules build test -f src/cpio.h && test -f debian/rules mkdir -p obj cd obj && CFLAGS='-Wall -g -O2' CPIO_MT_PROG=mt ../configure --prefix=/usr --build i486-linux-gnu \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --bindir=/bin \ --libexecdir=/usr/sbin checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking how to create a ustar tar archive... gnutar checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking whether gcc needs -traditional... no checking for a BSD-compatible install... /usr/bin/install -c checking for ranlib... ranlib checking for bison... bison -y checking build system type... i486-pc-linux-gnu checking host system type... i486-pc-linux-gnu checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking minix/config.h usability... no checking minix/config.h presence... no checking for minix/config.h... no checking whether it is safe to define __EXTENSIONS__... yes checking for _LARGEFILE_SOURCE value needed for large files... no checking for gcc option to accept ISO C99... -std=gnu99 checking for gcc -std=gnu99 option to accept ISO Standard C... (cached) -std=gnu99 checking for function prototypes... yes checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... 64 checking return type of signal handlers... void checking whether sys/types.h defines makedev... yes checking for an ANSI C-conforming const... yes checking for uid_t in sys/types.h... yes checking for gid_t... yes checking for ANSI C header files... (cached) yes checking for dirent.h that defines DIR... yes checking for library containing opendir... none required checking for fchmod... yes checking for fchown... yes checking for setmode... no checking for getpwuid... yes checking for getpwnam... yes checking for getgrgid... yes checking for getgrnam... yes checking for pipe... yes checking for fork... yes checking for getuid... yes checking for geteuid... yes checking for working alloca.h... yes checking for alloca... yes checking for inline... inline checking for C/C++ restrict keyword... __restrict checking whether getenv is declared... yes checking whether clearerr_unlocked is declared... yes checking whether feof_unlocked is declared... yes checking whether ferror_unlocked is declared... yes checking whether fflush_unlocked is declared... yes checking whether fgets_unlocked is declared... yes checking whether fputc_unlocked is declared... yes checking whether fputs_unlocked is declared... yes checking whether fread_unlocked is declared... yes checking whether fwrite_unlocked is declared... yes checking whether getc_unlocked is declared... yes checking whether getchar_unlocked is declared... yes checking whether putc_unlocked is declared... yes checking whether putchar_unlocked is declared... yes checking for flockfile... yes checking for funlockfile... yes checking for chown... yes checking for fchown... (cached) yes checking for fdopendir... yes checking for dup2... yes checking for fchdir... yes checking for fcntl... yes checking for btowc... yes checking for isblank... yes checking for iswctype... yes checking for mbsrtowcs... yes checking for mempcpy... yes checking for wmemchr... yes checking for wmemcpy... yes checking for wmempcpy... yes checking for __fpending... yes checking for getdtablesize... yes checking for gettimeofday... yes checking for nanotime... no checking for lchmod... no checking for lstat... yes checking for mbsinit... yes checking for mbrtowc... yes checking for mprotect...
Bug#576637: cpio: FTBFS: multiple definition of `fatal_exit'
On 2010-04-06 17:13 +0200, Clint Adams wrote: > On Tue, Apr 06, 2010 at 05:06:49PM +0200, Sven Joachim wrote: >> What exactly is the problem? It seems to work for me. > > It complains that fatal_exit is undefined. If the original source compiled fine for you (no multiple definition error), that is logical since you then removed the only definition of fatal_exit. This also means that the version from mt.c is also the one that ends up in the mt binary. > I have no idea what's going on here. Maybe I have some stray header file in the standard include directories which triggers this. I will look at it when I find time, but I'm not too optimistic that I find the reason. Feel free to downgrade the severity in the meantime. BTW, this ChangeLog entry , | 2009-07-31 Sergey Poznyakoff | [...] | * src/mt.c: Remove superfluous includes. | Include argp-version-etc.h and progname.h | Use argp to parse arguments. | Supply the fatal_exit function. ` suggests that the fatal_exit function from mt.c is the intended one, but naming it like a function with different semantics in fatal.c is highly confusing, to say the least. Sven -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#576637: cpio: FTBFS: multiple definition of `fatal_exit'
On Tue, Apr 06, 2010 at 05:06:49PM +0200, Sven Joachim wrote: > What exactly is the problem? It seems to work for me. Furthermore -2 is building on the buildds just as it does in my chroot. -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#576637: cpio: FTBFS: multiple definition of `fatal_exit'
On 2010-04-06 16:26 +0200, Clint Adams wrote: > On Tue, Apr 06, 2010 at 12:17:35PM +, Clint Adams wrote: >> Instead I'm going to remove fatal_exit() from mt.c, which should solve >> that problem and also return the proper error code (instead of 1). > > Well, I won't just yet, since I can't build it if I do that. What exactly is the problem? It seems to work for me. Sven -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#576637: cpio: FTBFS: multiple definition of `fatal_exit'
On Tue, Apr 06, 2010 at 05:06:49PM +0200, Sven Joachim wrote: > What exactly is the problem? It seems to work for me. It complains that fatal_exit is undefined. I have no idea what's going on here. -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#576637: cpio: FTBFS: multiple definition of `fatal_exit'
On Tue, Apr 06, 2010 at 12:17:35PM +, Clint Adams wrote: > Instead I'm going to remove fatal_exit() from mt.c, which should solve > that problem and also return the proper error code (instead of 1). Well, I won't just yet, since I can't build it if I do that. -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#576637: cpio: FTBFS: multiple definition of `fatal_exit'
On Tue, Apr 06, 2010 at 11:30:32AM +0200, Sven Joachim wrote: > mt_SOURCES = \ > - mt.c\ > - fatal.c > + mt.c Instead I'm going to remove fatal_exit() from mt.c, which should solve that problem and also return the proper error code (instead of 1). -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Processed: Re: Bug#576637: cpio: FTBFS: multiple definition of `fatal_exit'
Processing commands for cont...@bugs.debian.org: > tags 576637 + patch Bug #576637 [cpio] cpio: FTBFS: multiple definition of `fatal_exit' Added tag(s) patch. > thanks Stopping processing here. Please contact me if you need assistance. Debian bug tracking system administrator (administrator, Debian Bugs database) -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#576637: cpio: FTBFS: multiple definition of `fatal_exit'
tags 576637 + patch thanks On 2010-04-06 06:41 +0200, Sven Joachim wrote: > Package: cpio > Version: 2.11-1 > Severity: serious > > The linker complains about a multiple definition of `fatal_exit': > > , > | % LANG=C debian/rules build > | [...] > | CCLD mt > | fatal.o: In function `fatal_exit': > | /usr/local/src/deb-src/cpio/cpio-2.11/obj/src/../../src/fatal.c:24: > multiple definition of `fatal_exit' > | mt.o:/usr/local/src/deb-src/cpio/cpio-2.11/obj/src/../../src/mt.c:312: > first defined here > | collect2: ld returned 1 exit status > | make[3]: *** [mt] Error 1 > ` I don't know why this error did not happen on the buildds, but here is a patch for it: --8<---cut here---start->8--- --- src/Makefile.am~2010-04-06 06:21:35.0 +0200 +++ src/Makefile.am 2010-04-06 11:12:59.870544716 +0200 @@ -39,8 +39,7 @@ userspec.c mt_SOURCES = \ - mt.c\ - fatal.c + mt.c noinst_HEADERS =\ cpio.h\ --8<---cut here---end--->8--- Sven -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#576637: cpio: FTBFS: multiple definition of `fatal_exit'
Package: cpio Version: 2.11-1 Severity: serious The linker complains about a multiple definition of `fatal_exit': , | % LANG=C debian/rules build | [...] | CCLD mt | fatal.o: In function `fatal_exit': | /usr/local/src/deb-src/cpio/cpio-2.11/obj/src/../../src/fatal.c:24: multiple definition of `fatal_exit' | mt.o:/usr/local/src/deb-src/cpio/cpio-2.11/obj/src/../../src/mt.c:312: first defined here | collect2: ld returned 1 exit status | make[3]: *** [mt] Error 1 ` -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (x86_64) Kernel: Linux 2.6.33.2-nouveau (SMP w/2 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org