public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bkoz at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/21677] simply including ext/bitmap_allocator.h causes link-time errors
Date: Tue, 24 May 2005 04:36:00 -0000	[thread overview]
Message-ID: <20050524043459.24959.qmail@sourceware.org> (raw)
In-Reply-To: <20050520122127.21677.oms@home.nl>


------- Additional Comments From bkoz at gcc dot gnu dot org  2005-05-24 04:34 -------

for 4.x and mainline, this is ok:

%g++ -c -g -O2 t2.cc
%g++ -c -g -O2 t1.cc
%g++ t1.o t2.o

For 3.4, I get:

t2.o(.bss+0x0): In function `main':
/home/bkoz/t2.cc:4: multiple definition of
`__gnu_cxx::_BA_free_list_store::_S_free_list'
t1.o(.bss+0x0):/usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/ext/bitmap_allocator.h:477:
first defined here
t2.o(.bss+0xc): In function `main':
/home/bkoz/t2.cc:5: multiple definition of
`__gnu_cxx::_BA_free_list_store::_S_bfl_mutex'
t1.o(.bss+0xc):/usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/ext/bitmap_allocator.h:479:
first defined here
t2.o(.bss+0x24): In function `__tcf_1':
/usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/bits/stl_vector.h:117:
multiple definition of `__gnu_cxx::_OOM_handler::_S_oom_fcp'
t1.o(.bss+0x24):/usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/ext/new_allocator.h:69:
first defined here
t2.o(.bss+0x28): In function `__tcf_1':
/usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/ext/new_allocator.h:86:
multiple definition of `__gnu_cxx::_OOM_handler::_S_handled_oom'
t1.o(.bss+0x28):/home/bkoz/t1.cc:3: first defined here
t2.o(.bss+0x2c): In function `__tcf_1':
/usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/ext/new_allocator.h:86:
multiple definition of `__gnu_cxx::_OOM_handler::_S_old_handler'
t1.o(.bss+0x2c):/usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/i386-redhat-linux/bits/gthr-default.h:107:
first defined here
collect2: ld returned 1 exit status


So, reproducible. 

__gnu_cxx::_BA_free_list_store::_S_bfl_mutex
__gnu_cxx::_OOM_handler::_S_handled_oom
__gnu_cxx::_OOM_handler::_S_old_handler

The first symbol (the mutex) is solved for 4.x/mainline by the patch mentioned
by Paolo. The other two, with a quick look at the code, will obviously cause
multiple def errors.

Soooo.... dunno. I'm tempted to just say this allocator doesn't work in 3.4.x,
and be done with it. There's been a lot of work done on it, and porting the 4.x
code to 3.4.x is a non-starter.

Sorry.

-benjamin

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21677


  parent reply	other threads:[~2005-05-24  4:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-20 12:21 [Bug libstdc++/21677] New: " oms at home dot nl
2005-05-20 12:25 ` [Bug libstdc++/21677] " oms at home dot nl
2005-05-20 12:25 ` oms at home dot nl
2005-05-20 12:54 ` pcarlini at suse dot de
2005-05-20 13:01 ` pcarlini at suse dot de
2005-05-20 13:14 ` oms at home dot nl
2005-05-20 13:51 ` pcarlini at suse dot de
2005-05-24  4:36 ` bkoz at gcc dot gnu dot org [this message]
2005-05-24  7:01 ` bkoz at gcc dot gnu dot org
2005-07-11 17:55 ` pcarlini at suse dot de

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

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

  git send-email \
    --in-reply-to=20050524043459.24959.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.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).