[AGENT++] AgentPP Compiling and Linking with gnu 2.96 for PowerPC (WindRivertornado toolchain)

Herzmann Thomas thomas.herzmann at keymile.com
Mon Jan 28 16:05:58 CET 2008


Hi all,

we are currently using 
agent++ v3.5.29,
agentX++ v1.4.16
snmp++ v3.2.23

compiling this with the gnu cross-compiler 3.x for PowerPC is no
problem.
Unfortunately we have to rebuild an older product and this has to be
done with gcc 2.96 through the WindRiver Tronado 2.2.1 toolchain.
The linker terminates with lots and lots of errors like:


        bld/gnuPPC603vxworks5.5/debug/lib/libproducts_snmp_agentx.a(agentpp_agentx_mib.o): \
        In function
        `Agentpp::OidList<Agentpp::MibStaticEntry>::index(Agentpp::MibStaticEntry *) const':d:\thomas\ws_root\sa_keynode/prod/snmp/agent++/include/agent_pp/List.h:808: \
        multiple definition of
        `Agentpp::OidList<Agentpp::MibStaticEntry>::index(Agentpp::MibStaticEntry *) const'.\
        bld/gnuPPC603vxworks5.5/debug/lib/libproducts_snmp.a(snmp_subagent.o):d:\thomas\ws_root\sa_keynode/prod/snmp/agent++/include/agent_pp/List.h:808: first defined here
        

This behaviour is caused by the compiler, which generates for each
instantiation of a template class
and/or its methods a "global text" symbol ("T"). Two or more global text
symbols with the same name cause this error.
In gcc 3.x this problem has been fixed by generating "weak symbols" (W).
Two or more weak symbols with the 
same name are included into the executable only once, thus now it is
linkable.

Has anyone a hint to solve this problem - or - can anyone tell me that
this problem has no solution without
code change? Using gcc 3.x has already been considered, but is not
feasible for our problem. 

man thanks for every hint
Thomas

------------------------------------------------------------
Thomas Herzmann
KEYMILE AG
Schwarzenburgstrasse 73
CH-3097 Bern-Liebefeld
Switzerland
Phone + 41 (0)31 377 10 27
Mail to: thomas.herzmann at keymile.com
www.keymile.com 

*********************************************************************************************************************************************************************************
This e-mail is confidential and may contain trade secrets, in particular
of technical nature, or other privileged, undisclosed or confidential
information or otherwise legally privileged information. It is intended
only for the addressees. If you have received this e-mail in error,
kindly notify us immediately by telephone or e-mail and delete the
message from your system. E-mail is susceptible to data corruption,
interception, unauthorised amendment, tampering and viruses, and we only
send and receive e-mails on the basis that we are not liable for any
such corruption, interception, unauthorised amendment, tampering and
viruses or any consequences thereof.   

Geschäftsführer: Bruno Ette, Björn Claaßen, Rechtsform der Gesellschaft:
AG Handelsregister: Bern-Mittelland - Hauptregister - Firmennummer
CH-035.3.000.910-3WEEE-Reg.-No.: DE 59336750  



More information about the AGENTPP mailing list