This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: CVS link error
- From: Ian Lance Taylor <ian at airs dot com>
- To: Bob Rossi <bob at brasko dot net>
- Cc: GDB <gdb at sources dot redhat dot com>
- Date: 26 Sep 2005 17:31:52 -0700
- Subject: Re: CVS link error
- References: <20050927002836.GA10821@white>
Bob Rossi <bob@brasko.net> writes:
> I did updated a fairly recent tree like this,
> cvs -d ':ext:bobbybrasko@sources.redhat.com:/cvs/src' co gdb+dejagnu
> from the directory that contains the src/ directory.
>
> When I do a build, I get this link error now,
>
> gcc -g -O2 \
> -o gdb gdb.o libgdb.a \
> ../readline/libreadline.a ../opcodes/libopcodes.a ../bfd/libbfd.a ../libiberty/libiberty.a -lncurses -lm ../libiberty/libiberty.a -ldl -rdynamic
> ../libiberty/libiberty.a(xmalloc.o): In function `xmalloc':
> ../../src/libiberty/xmalloc.c:142: multiple definition of `xmalloc'
> libgdb.a(utils.o):../../src/gdb/utils.c:968: first defined here
> ../libiberty/libiberty.a(xmalloc.o): In function `xcalloc':
> ../../src/libiberty/xmalloc.c:156: multiple definition of `xcalloc'
> libgdb.a(utils.o):../../src/gdb/utils.c:1011: first defined here
> ../libiberty/libiberty.a(xmalloc.o): In function `xrealloc':
> ../../src/libiberty/xmalloc.c:171: multiple definition of `xrealloc'
> libgdb.a(utils.o):../../src/gdb/utils.c:991: first defined here
> collect2: ld returned 1 exit status
> make[1]: *** [gdb] Error 1
> make[1]: Leaving directory `/home/bob/cvs/gdb/original/objdir/gdb'
> make: *** [all-gdb] Error 2
I think this is happening because expandargv in libiberty/argv.c now
calls xmalloc_failed. That is provided by libiberty/xmalloc.c but not
by gdb/utils.c.
Is there any reason for gdb/utils.c to continue to define xmalloc and
friends?
Ian