Gentoo Archives: gentoo-alt

From: Johan Hattne <johan.hattne@××××××××××××.de>
To: gentoo-alt@l.g.o
Subject: [gentoo-alt] C++ linking issues
Date: Wed, 12 Dec 2007 15:41:31
Message-Id: 3F4E7A01-9D19-4D23-9C9B-68468299F915@embl-hamburg.de
1 Dear all;
2
3 Using prefix gcc-apple-4.0.1_p5465 and odcctools-20071104, I run into
4 this when linking a some C++ code:
5
6 ld: duplicate symbol Inkscape::XML::SimpleNode::name() constin \
7 xml/libspxml.a(simple-node.o) and \
8 libinkpre.a(conn-avoid-ref.o)
9
10 For the offending objects, I have:
11
12 $ nm xml/simple-node.o| grep 'SimpleNode.*name'
13 00000182 T __ZNK8Inkscape3XML10SimpleNode4nameEv
14 00000000 A __ZNK8Inkscape3XML10SimpleNode4nameEv.eh
15 00004124 S __ZTv0_n24_NK8Inkscape3XML10SimpleNode4nameEv
16
17 $ nm conn-avoid-ref.o | grep 'SimpleNode.*name'
18 00000182 T __ZNK8Inkscape3XML10SimpleNode4nameEv
19 00000000 A __ZNK8Inkscape3XML10SimpleNode4nameEv.eh
20 00004da0 S __ZTv0_n24_NK8Inkscape3XML10SimpleNode4nameEv
21
22 Absolutes? Rebuilding these two objects with gcc-4.2.2, I have:
23
24 $ nm xml/simple-node.o| grep 'SimpleNode.*name'
25 00000480 T __ZNK8Inkscape3XML10SimpleNode4nameEv
26 0000574c S __ZNK8Inkscape3XML10SimpleNode4nameEv.eh
27 0000046e T __ZTv0_n24_NK8Inkscape3XML10SimpleNode4nameEv
28
29 $ nm conn-avoid-ref.o | grep 'SimpleNode.*name'
30 00000838 T __ZNK8Inkscape3XML10SimpleNode4nameEv
31 00006d54 S __ZNK8Inkscape3XML10SimpleNode4nameEv.eh
32 00000826 T __ZTv0_n24_NK8Inkscape3XML10SimpleNode4nameEv
33
34 I've been compiling the same code before with gcc-4.0.1, but using an
35 older version of odcctools (can't seem to downgrade right now,
36 emerging odcctools-20070629-r1 gives a bunch of linker warnings and
37 dies).
38
39 Anybody know what's going on, or what I am doing wrong.
40
41 // Thanks; Johan
42
43 --
44 gentoo-alt@g.o mailing list