public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* CVS link error
@ 2005-09-27  0:28 Bob Rossi
  2005-09-27  0:32 ` Ian Lance Taylor
  0 siblings, 1 reply; 5+ messages in thread
From: Bob Rossi @ 2005-09-27  0:28 UTC (permalink / raw)
  To: GDB

Hi All,

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

Any idea?

Thanks,
Bob Rossi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: CVS link error
  2005-09-27  0:28 CVS link error Bob Rossi
@ 2005-09-27  0:32 ` Ian Lance Taylor
  2005-09-27  2:42   ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Ian Lance Taylor @ 2005-09-27  0:32 UTC (permalink / raw)
  To: Bob Rossi; +Cc: GDB

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: CVS link error
  2005-09-27  0:32 ` Ian Lance Taylor
@ 2005-09-27  2:42   ` Daniel Jacobowitz
  2005-09-27  3:11     ` Ian Lance Taylor
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2005-09-27  2:42 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: Bob Rossi, GDB

On Mon, Sep 26, 2005 at 05:31:52PM -0700, Ian Lance Taylor wrote:
> 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?

Yes.  GDB's versions don't do the same thing on error.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: CVS link error
  2005-09-27  2:42   ` Daniel Jacobowitz
@ 2005-09-27  3:11     ` Ian Lance Taylor
  2005-09-27 14:32       ` Mark Mitchell
  0 siblings, 1 reply; 5+ messages in thread
From: Ian Lance Taylor @ 2005-09-27  3:11 UTC (permalink / raw)
  To: Daniel Jacobowitz, mark; +Cc: Bob Rossi, GDB

Daniel Jacobowitz <drow@false.org> writes:

> On Mon, Sep 26, 2005 at 05:31:52PM -0700, Ian Lance Taylor wrote:
> > 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?
> 
> Yes.  GDB's versions don't do the same thing on error.

Mark, gdb no longer links, probably because of the change to
libiberty/argv.c.  See
    http://sources.redhat.com/ml/gdb/2005-09/msg00203.html

Perhaps expandargv should be moved to a different file, or perhaps it
should not call xmalloc_failed.

Ian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: CVS link error
  2005-09-27  3:11     ` Ian Lance Taylor
@ 2005-09-27 14:32       ` Mark Mitchell
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Mitchell @ 2005-09-27 14:32 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: Daniel Jacobowitz, Bob Rossi, GDB

Ian Lance Taylor wrote:
> Daniel Jacobowitz <drow@false.org> writes:
> 
> 
>>On Mon, Sep 26, 2005 at 05:31:52PM -0700, Ian Lance Taylor wrote:
>>
>>>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?
>>
>>Yes.  GDB's versions don't do the same thing on error.
> 
> 
> Mark, gdb no longer links, probably because of the change to
> libiberty/argv.c.  See
>     http://sources.redhat.com/ml/gdb/2005-09/msg00203.html
> 
> Perhaps expandargv should be moved to a different file, or perhaps it
> should not call xmalloc_failed.

I'll do something to fix it ASAP.  I tested a binutils build and a GCC
build, but didn't think to test every program in src.

Apologies,

-- 
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-09-27 14:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-27  0:28 CVS link error Bob Rossi
2005-09-27  0:32 ` Ian Lance Taylor
2005-09-27  2:42   ` Daniel Jacobowitz
2005-09-27  3:11     ` Ian Lance Taylor
2005-09-27 14:32       ` Mark Mitchell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).