bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: "Jose E. Marchesi" <jemarch@gnu.org>
To: Bruno Haible <bruno@clisp.org>
Cc: poke-devel@gnu.org,  bug-gnulib@gnu.org,
	 Hannes Domani <ssbssa@yahoo.de>
Subject: Re: Multiple definition errors when linking libpoke into gdb
Date: Wed, 14 Feb 2024 17:52:16 +0100	[thread overview]
Message-ID: <875xyrkmyn.fsf@gnu.org> (raw)
In-Reply-To: <6188640.fW5hKsROvD@nimes> (Bruno Haible's message of "Wed, 14 Feb 2024 17:26:55 +0100")

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

I think in this case it is better to not use the xalloc module in
libpoke at all.

  reply	other threads:[~2024-02-14 16:52 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
2024-02-14 16:52     ` Jose E. Marchesi [this message]
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=875xyrkmyn.fsf@gnu.org \
    --to=jemarch@gnu.org \
    --cc=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).