bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: poke-devel@gnu.org, bug-gnulib@gnu.org
Cc: Hannes Domani <ssbssa@yahoo.de>
Subject: Re: Multiple definition errors when linking libpoke into gdb
Date: Wed, 14 Feb 2024 17:26:55 +0100	[thread overview]
Message-ID: <6188640.fW5hKsROvD@nimes> (raw)
In-Reply-To: <480198541.3664126.1707924796027@mail.yahoo.com>

Hannes Domani wrote:
> When I'm trying to (statically) link libpoke into gdb, I get the following errors:
> ... gl-libpoke/xmalloc.c:44: multiple definition of `xmalloc'; alloc.o
> ... gdb/alloc.c:49: first defined here
> Both gdb and gl-libpoke define these x* allocation functions, and I'm not sure how to fix this.

The most reliable way to do this is to rename the said functions at the
source code level, in the scope of poke. That is, in some .h file that
all poke files see but that gdb does not see (such as poke/config.h),
add definitions such as
  #define xmalloc libpoke_xmalloc
  #define xstrdup libpoke_xstrdup.
Most gnulib modules respect such definitions in config.h. If you find
a module that doesn't, please report it here.

For a fixed list of symbols, this can be done through an AH_VERBATIM
invocation in poke's configure.ac.


  reply	other threads:[~2024-02-14 16:27 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 ` Multiple definition errors when linking libpoke into gdb Hannes Domani
2024-02-14 16:26   ` Bruno Haible [this message]
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:

  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=6188640.fW5hKsROvD@nimes \
    --to=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    --cc=poke-devel@gnu.org \
    --cc=ssbssa@yahoo.de \


* 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).