bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Hannes Domani <ssbssa@yahoo.de>
To: poke-devel@gnu.org, bug-gnulib@gnu.org
Subject: Multiple definition errors when linking libpoke into gdb
Date: Wed, 14 Feb 2024 15:33:16 +0000 (UTC)	[thread overview]
Message-ID: <480198541.3664126.1707924796027@mail.yahoo.com> (raw)
In-Reply-To: 480198541.3664126.1707924796027.ref@mail.yahoo.com

Hello


When I'm trying to (statically) link libpoke into gdb, I get the following errors:

c:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/src/repos/poke/inst/lib/libpoke.a(libgnu_la-xmalloc.o): in function `xmalloc':
C:\src\repos\poke\poke.git-build\gl-libpoke/../../../poke.git/gl-libpoke/xmalloc.c:44: multiple definition of `xmalloc'; alloc.o:C:/src/repos/binutils-gdb.git/gdb/alloc.c:49: first defined here
c:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/src/repos/poke/inst/lib/libpoke.a(libgnu_la-xmalloc.o): in function `xrealloc':
C:\src\repos\poke\poke.git-build\gl-libpoke/../../../poke.git/gl-libpoke/xmalloc.c:65: multiple definition of `xrealloc'; alloc.o:C:/src/repos/binutils-gdb.git/gdb/alloc.c:66: first defined here
c:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/src/repos/poke/inst/lib/libpoke.a(libgnu_la-xmalloc.o): in function `xcalloc':
C:\src\repos\poke\poke.git-build\gl-libpoke/../../../poke.git/gl-libpoke/xmalloc.c:297: multiple definition of `xcalloc'; alloc.o:C:/src/repos/binutils-gdb.git/gdb/alloc.c:86: first defined here
c:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/src/repos/poke/inst/lib/libpoke.a(libgnu_la-xmalloc.o): in function `xmemdup':
C:\src\repos\poke\poke.git-build\gl-libpoke/../../../poke.git/gl-libpoke/xmalloc.c:313: multiple definition of `xmemdup'; C:/gdb/build64/gdb-git-python3/libctf/../libiberty/libiberty.a(xmemdup.o):C:/src/repos/binutils-gdb.git/libiberty/xmemdup.c:36: first defined here
c:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/src/repos/poke/inst/lib/libpoke.a(libgnu_la-xmalloc.o): in function `xstrdup':
C:\src\repos\poke\poke.git-build\gl-libpoke/../../../poke.git/gl-libpoke/xmalloc.c:338: multiple definition of `xstrdup'; C:/gdb/build64/gdb-git-python3/libctf/../libiberty/libiberty.a(xstrdup.o):C:/src/repos/binutils-gdb.git/libiberty/xstrdup.c:32: first defined here

Both gdb and gl-libpoke define these x* allocation functions, and I'm not sure how to fix this.


Regards
Hannes


       reply	other threads:[~2024-02-14 15:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <480198541.3664126.1707924796027.ref@mail.yahoo.com>
2024-02-14 15:33 ` Hannes Domani [this message]
2024-02-14 16:26   ` Multiple definition errors when linking libpoke into gdb Bruno Haible
2024-02-14 16:52     ` Jose E. Marchesi
2024-02-14 17:19       ` Bruno Haible

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=480198541.3664126.1707924796027@mail.yahoo.com \
    --to=ssbssa@yahoo.de \
    --cc=bug-gnulib@gnu.org \
    --cc=poke-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).