This is the mail archive of the egcs@egcs.cygnus.com mailing list for the EGCS project. See the EGCS home page for more information.
Hi all. Here's another bug that is probably useless to you because
you can't reproduce it :(. Nevertheless:
What could possibly be causing this (I am still using egcs-1.1.1 release,
and binutils-2.9.1.0.15):
g++ -shared -Wl,-soname,libr.so.0 -o libr.so.0.2.5 -fpic version.o ./buffers/dbstreambuf.o ./crosslink/crosslink.o ./ffstl/ffstl.o ./io/file.o ./io/pipe.o ./io/sock.o ./io/traits.o ./kernel/debugdaemon.o ./kernel/events.o ./kernel/execve.o ./kernel/select.o ./kernel/timing.o ./kernel/signals.o ./kernel/libr_app.o ./llists/cbll.o ./llists/expire.o ./llists/sbll.o ./net/inet_support.o ./support/debugdebugcheckpoint.o ./support/debugmalloc.o ./support/ostream_operators.o ./support/support.o ./support/sys.o ./support/syslog.o ./support/debug.o ./support/demangle.o ./utils/bcd2str.o ./utils/buf2str.o ./utils/char2str.o ./utils/strerrno.o
./support/debugdebugcheckpoint.o: In function `global constructors keyed to int lexicographical_compare_3way<signed char const *, signed char const *>(signed char const *, signed char const *, signed char const *, signed char const *)':
/usr/local/egcs/include/g++/stl_algobase.h:427: multiple definition of `global constructors keyed to int lexicographical_compare_3way<signed char const *, signed char const *>(signed char const *, signed char const *, signed char const *, signed char const *)'
./llists/cbll.o:/home/carlo/c++/libr/src/llists/../../include/libr/debug.h:102: first defined here
collect2: ld returned 1 exit status
I think this must be a bug because I didn't change really anything big
when this suddenly started to happen :/.
The above is after a 'make clean' (make depend) (ie, all object files
were recompiled).
Below the full output of nm:
~/c++/libr>nm -C src/support/debugdebugcheckpoint.o
00000058 ? .LBE2
00000077 ? .LBE3
00000000 ? .LM1
00000000 ? .LM10
00000003 ? .LM11
00000004 ? .LM12
00000018 ? .LM13
00000030 ? .LM14
00000043 ? .LM15
00000050 ? .LM16
00000058 ? .LM17
00000070 ? .LM18
00000077 ? .LM19
00000003 ? .LM2
00000003 ? .LM3
00000018 ? .LM4
00000024 ? .LM5
00000028 ? .LM6
00000034 ? .LM7
00000040 ? .LM8
00000058 ? .LM9
0000005c ? .Lscope0
0000007b ? .Lscope1
00000000 ? .Ltext1
00000004 T global constructors keyed to int lexicographical_compare_3way<signed char const *, signed char const *>(signed char const *, signed char const *, signed char const *, signed char const *)
U _GLOBAL_OFFSET_TABLE_
00000000 b libr::debug::continued_cf
U libr::debug::continued_cf_st::continued_cf_st(unsigned int)
00000024 r __WORD_BIT
00000000 W int lexicographical_compare_3way<signed char const *, signed char const *>(signed char const *, signed char const *, signed char const *, signed char const *)
00000000 W bool lexicographical_compare<signed char const *, signed char const *>(signed char const *, signed char const *, signed char const *, signed char const *)
00000020 r malloc_report
~/c++/libr>nm -C src/llists/cbll.o
00000058 ? .LBE2
00000077 ? .LBE3
00000000 ? .LM1
00000000 ? .LM10
00000003 ? .LM11
00000004 ? .LM12
00000018 ? .LM13
00000030 ? .LM14
00000043 ? .LM15
00000050 ? .LM16
00000058 ? .LM17
00000070 ? .LM18
00000077 ? .LM19
00000003 ? .LM2
00000004 ? .LM23
00000052 ? .LM24
00000004 ? .LM25
00000052 ? .LM26
00000004 ? .LM27
00000054 ? .LM28
00000004 ? .LM29
00000003 ? .LM3
00000042 ? .LM30
00000018 ? .LM4
00000024 ? .LM5
00000028 ? .LM6
00000034 ? .LM7
00000040 ? .LM8
00000058 ? .LM9
0000005c ? .Lscope0
0000007b ? .Lscope1
00000059 ? .Lscope3
00000059 ? .Lscope4
0000005b ? .Lscope5
00000049 ? .Lscope6
00000000 ? .Ltext1
00000004 T global constructors keyed to int lexicographical_compare_3way<signed char const *, signed char const *>(signed char const *, signed char const *, signed char const *, signed char const *)
U _GLOBAL_OFFSET_TABLE_
00000000 b libr::debug::continued_cf
U libr::debug::continued_cf_st::continued_cf_st(unsigned int)
000000f8 r __WORD_BIT
U __rtti_class
U __rtti_ptr
U __rtti_user
00000004 W sbll_base_ct type_info function
00000004 W sbll_list_ct type_info function
U sbll_node_ct type_info function
00000004 W __tfP12sbll_list_ct
00000004 W __tfP12sbll_node_ct
00000008 C sbll_base_ct type_info node
00000010 C sbll_list_ct type_info node
U sbll_node_ct type_info node
0000000c C __tiP12sbll_list_ct
0000000c C __tiP12sbll_node_ct
000000f2 r ident_llists_defs_h
00000000 W int lexicographical_compare_3way<signed char const *, signed char const *>(signed char const *, signed char const *, signed char const *, signed char const *)
00000000 W bool lexicographical_compare<signed char const *, signed char const *>(signed char const *, signed char const *, signed char const *, signed char const *)
00000020 r malloc_report
00000000 d rcs_ident
000000c0 r rcs_ident_llists_cbll_h
00000100 r rcs_ident_llists_crosslink_h
========================
Perhaps interesting to note that both files hardly contain any source code.
I'll even dump them here (didn't do that before -indeed- because of license
issues):
---Start of debugdebugcheckpoint.cc--------------------------------------------
// $Header: /usr/src/CVS/libr/src/support/debugdebugcheckpoint.cc,v 1.3 1999/02/04 01:46:25 carlo Exp $
//
// Author:
//
// 1024/624ACAD5 1997/01/26 Carlo Wood, Run on IRC <carlo@runaway.xs4all.nl>
// Key fingerprint = 32 EC A7 B6 AC DB 65 A6 F6 F6 55 DD 1C DC FF 61
// Get key from pgp-public-keys server or
// finger carlo@runaway.xs4all.nl for public key (dialin, try at 21-22h GMT).
//
#ifdef __GNUG__
#pragma implementation
#endif
#include "libr/sys.h"
#include "libr/h.h"
#include "libr/debug.h"
#include "libr/debugdebugcheckpoint.h"
#ifdef DEBUGDEBUG
RCSTAG_CC("$Id: debugdebugcheckpoint.cc,v 1.3 1999/02/04 01:46:25 carlo Exp $")
extern const void *malloc_block_start(const void *ptr);
void debugdebugcheckpoint(void)
{
static int counter = 0;
counter++;
}
#endif // DEBUGDEBUG
-------------------------------------------------------------------------------
Note: debugdebugcheckpoint.h is completely empty (everything is between
#ifdef DEBUGDEBUG, which isn't defined).
h.h only contains "using namespace std;"
sys.h and debug.h both start with a "#pragma interface" and should
be generating any code therefore.
---Start of cbll.cc------------------------------------------------------------
// $Header: /usr/src/CVS/libr/src/llists/cbll.cc,v 1.2 1998/08/06 00:33:47 carlo Exp $
//
// Author:
//
// 1024/624ACAD5 1997/01/26 Carlo Wood, Run on IRC <carlo@runaway.xs4all.nl>
// Key fingerprint = 32 EC A7 B6 AC DB 65 A6 F6 F6 55 DD 1C DC FF 61
// Get key from pgp-public-keys server or
// finger carlo@runaway.xs4all.nl for public key (dialin, try at 21-22h GMT).
//
#ifdef __GNUG__
#pragma implementation "cbll.h"
#pragma implementation "llists_crosslink.h"
#endif
#include "libr/sys.h"
#include "libr/h.h"
#include "libr/cbll.h" // Generates code
RCSTAG_CC("$Id: cbll.cc,v 1.2 1998/08/06 00:33:47 carlo Exp $")
-------------------------------------------------------------------------------
"libr/cbll.h" and "llists_crosslink.h" do NOT contain a "#pragma interface"
because that only made the total code grow. Commenting out the
"#pragma implementation ..." lines aboves doesn't make a difference.
=======================
_Adding_ a "#pragma interface" to "cbll.h" anyway removed the problem though;
but as posted before - that makes the total size of the code grow ;).
-------------------------------------------------------------------------------
---
In the past days I *only* changed debugmalloc.cc and debugmalloc.h.
These seem to have nothing to do with the above :/
Nevertheless, mentioned in the error is debug.h:102:
const continued_cf_st continued_cf(continued_cf_maskbit);
which has absolutely NOTHING to do with what I am working on.
(I changed the parameter of a function that is called from most
constructors to pass typeid(this) instead of typeid(this).name()).
I'll add the "#pragma interface" to "cbll.h" as a work around for now.
The output of nm after adding this #pragma interface is indeed a lot
larger:
~/c++/libr>nm -C src/llists/cbll.o
00000020 ? .LBB30
<...very long list of labels deleted...>
0000013c ? .LM99
0000002d ? .Lscope12
00000050 ? .Lscope14
00000038 ? .Lscope15
00000059 ? .Lscope16
00000059 ? .Lscope17
000000c6 ? .Lscope18
00000043 ? .Lscope19
000000df ? .Lscope20
00000146 ? .Lscope21
0000009e ? .Lscope22
000000df ? .Lscope23
0000005b ? .Lscope24
00000049 ? .Lscope25
0000001e ? .Lscope28
00000011 ? .Lscope29
00000059 ? .Lscope31
00000059 ? .Lscope32
0000005c ? .Lscope4
0000007b ? .Lscope5
00000011 ? .Lscope7
00000031 ? .Lscope8
0000003a ? .Lscope9
00000004 ? .Ltext10
00000004 ? .Ltext11
00000004 ? .Ltext12
00000004 ? .Ltext13
00000000 ? .Ltext2
00000000 ? .Ltext4
00000004 ? .Ltext6
00000004 ? .Ltext7
00000004 ? .Ltext8
00000004 ? .Ltext9
000001b4 T cbll_node_ct::~cbll_node_ct(void)
U sbll_list_ct::~sbll_list_ct(void)
U sbll_node_ct::~sbll_node_ct(void)
00000004 W crosslink_dct::~crosslink_dct(void)
00000004 W list_tct<sbll_list_ct, crosslink_dct>::~list_tct(void)
00000004 W node_tct<sbll_node_ct, crosslink_dct>::~node_tct(void)
000003c8 T global constructors keyed to cbll_node_ct::cbll_node_ct(void)
U _GLOBAL_OFFSET_TABLE_
00000000 b libr::debug::continued_cf
U libr::debug::core_dc
U libr::debug::finish_dc
U libr::debug::libr_do
U libr::debug::llists_dc
00000004 T cbll_node_ct::cbll_node_ct(void)
U sbll_list_ct::sbll_list_ct(void)
U sbll_node_ct::sbll_node_ct(void)
00000004 W crosslink_dct::crosslink_dct(sbll_node_ct *, void *)
U libr::debug::continued_cf_st::continued_cf_st(unsigned int)
00000278 r __WORD_BIT
U __builtin_new
U ostream::operator<<(char const *)
U ostream::operator<<(void const *)
U libr::debug::channel_set_st::operator|(libr::debug::continued_cf_st)
U libr::debug::debug_ct::operator|(libr::debug::channel_ct const &)
U libr::debug::debug_ct::operator|(libr::debug::fatal_channel_ct const &)
U libr::debug::debug_ct::operator|(libr::debug::continued_channel_ct const &)
U __pure_virtual
U __rtti_class
U __rtti_ptr
U __rtti_si
U __rtti_user
00000004 W list_tct<sbll_list_ct, crosslink_dct>::list_tct(void)
00000004 W node_tct<sbll_node_ct, crosslink_dct>::node_tct(void)
000003f8 T cbll_node_ct type_info function
00000004 W sbll_base_ct type_info function
00000004 W sbll_list_ct type_info function
U sbll_node_ct type_info function
00000004 W crosslink_dct type_info function
00000004 W __tfP12sbll_list_ct
00000004 W __tfP12sbll_node_ct
00000004 W node_tct<sbll_node_ct, crosslink_dct> type_info function
0000000c C cbll_node_ct type_info node
00000008 C sbll_base_ct type_info node
00000010 C sbll_list_ct type_info node
U sbll_node_ct type_info node
0000000c C crosslink_dct type_info node
0000000c C __tiP12sbll_list_ct
0000000c C __tiP12sbll_node_ct
0000000c C node_tct<sbll_node_ct, crosslink_dct> type_info node
00000040 D cbll_node_ct virtual table
00000000 W crosslink_dct virtual table
00000000 W node_tct<sbll_node_ct, crosslink_dct> virtual table
U sbll_list_ct::add(sbll_node_ct *, sbll_node_ct *)
00000004 W list_tct<sbll_list_ct, crosslink_dct>::add(crosslink_dct *)
00000048 T cbll_node_ct::add_crosslink(sbll_node_ct *, void *)
00000004 W node_tct<sbll_node_ct, crosslink_dct>::deceased(sbll_node_ct *, void *)
U sbll_node_ct::del(void)
00000004 W node_tct<sbll_node_ct, crosslink_dct>::del(void)
000000a0 T cbll_node_ct::del_crosslink(sbll_node_ct *)
00000004 W node_tct<sbll_node_ct, crosslink_dct>::delinked(void)
00000000 W crosslink_dct::done(void)
00000004 W node_tct<sbll_node_ct, crosslink_dct>::done(void)
U libr::debug::debug_ct::fatal_finish(void)
U sbll_list_ct::find(void const *) const
00000004 W list_tct<sbll_list_ct, crosslink_dct>::find(void const *)
00000000 W crosslink_dct::find_cmp(void const *) const
00000004 W node_tct<sbll_node_ct, crosslink_dct>::find_cmp(void const *) const
U libr::debug::debug_ct::finish(void)
00000272 r ident_llists_defs_h
00000000 W crosslink_dct::insert_cmp(crosslink_dct const &) const
00000004 W node_tct<sbll_node_ct, crosslink_dct>::insert_cmp(crosslink_dct const &) const
00000004 W node_tct<sbll_node_ct, crosslink_dct>::internal_insert_cmp(sbll_base_ct const &) const
00000000 W int lexicographical_compare_3way<signed char const *, signed char const *>(signed char const *, signed char const *, signed char const *, signed char const *)
00000000 W bool lexicographical_compare<signed char const *, signed char const *>(signed char const *, signed char const *, signed char const *, signed char const *)
00000020 r malloc_report
00000000 d rcs_ident
00000240 R rcs_ident_llists_cbll_h
00000280 r rcs_ident_llists_crosslink_h
U libr::debug::debug_ct::start(void)
00000000 W list_tct<sbll_list_ct, crosslink_dct>::start_node(void)
The reason that this helped is probably the fact that
00000004 T global constructors keyed to int lexicographical_compare_3way<signed char const *, signed char const *>(signed char const *, signed char const *, signed char const *, signed char const *)
disappeared from cbll.o.
--
Carlo Wood <carlo@runaway.xs4all.nl>
PS I post this to egcs@, not to egcs-bugs@, because I am too well aware that
this report is useless. If it is appreciated if I do not post such bugs
(which probably can't be fixed anyway with the given info), then drop me
a note and I won't do it anymore in the future :).