[omniORB] linking error (duplicated-simbol) only with option(-g)

Luke Deller ldeller at xplantechnology.com
Fri Nov 18 10:44:21 GMT 2005


It looks like your compiler in its compatibility mode is having problems
with static class members which are initialised in the header file.
Microsoft's C++ compiler also has problems with this.

There is a workaround which causes these static class members to be
initialised in the c++ file rather than the header file for Microsoft's
compiler.  You might want to try enabling this workaround for yourself
too.  Look for the definition of the macros _init_in_cldef_ and
_init_in_cldecl_ in omniORB4/CORBA_sysdep.h

Regards,
Luke.

On Thu, 2005-11-17 at 09:00 +0100, acasado at ya.com wrote:
> 
> It is me again, i forgot to put the subject. 
> 
> **************************************
> 
> Hello, I am looking for help.
> 
> I have download and compiled the omniORB (omniORB-4.0.5) on 
> SunOS 2.8 with CC (5.0) on compatibility mode (-compat=4) 
> because i have legacy code that does not compile in standar 
> mode.
> 
>  When i try to compile any code generated by omniidl with 
> option (-g)  to enable debbug  information, I have  duplicated-
> symbol at linking,  like :
> 
> //export/opt/SUNWspro/SC5.0/bin/CC -c -KPIC -g -w -mt -g -
> DTHREAD -DSOLARIS -compat=4 -features=bool,namespace  -
> DSVR4     -I/home/ipu01/IPU_ALBERTO/corba/cpp/src/../inc/  -
> I/home/ipu01/local_CC//include -
> o /home/ipu01/IPU_ALBERTO/corba/cpp/obj/ipuFactoryInterfaces
> SK.o ipuFactoryInterfacesSK.cc
> Compilation done.
> Haciendo la libreria 
> dinamica /home/ipu01/IPU_ALBERTO/corba/cpp/src/../lib//libipuC
> orba.so 
> /export/opt/SUNWspro/SC5.0/bin/CC -G  -
> L/home/ipu01/IPU_ALBERTO/corba/cpp/src/../lib/ -
> L/home/ipu01/local_CC//lib -L/usr/lib/ -
> o /home/ipu01/IPU_ALBERTO/corba/cpp/src/../lib//libipuCorba.so 
> /home/ipu01/IPU_ALBERTO/corba/cpp/src/../obj/ipuDataSK.o  /h
> ome/ipu01/IPU_ALBERTO/corba/cpp/src/../obj/ipuManagerSK.o  /
> home/ipu01/IPU_ALBERTO/corba/cpp/src/../obj/ipuDefinitionsSK.
> o  /home/ipu01/IPU_ALBERTO/corba/cpp/src/../obj/ipuInterfaces
> SK.o  /home/ipu01/IPU_ALBERTO/corba/cpp/src/../obj/ipuFactory
> InterfacesSK.o 
> 
> ld: fatal: symbol 
> `PortableServer::IMPLICIT_ACTIVATION_POLICY_ID' is multiply-
> defined:
>         
> (file /home/ipu01/IPU_ALBERTO/corba/cpp/src/../obj/ipuDataSK.o
>  type=OBJT; 
> file /home/ipu01/IPU_ALBERTO/corba/cpp/src/../obj/ipuFactoryIn
> terfacesSK.o type=OBJT);
> ld: fatal: symbol `ipu::corba::MAX_CCIF' is multiply-defined:
>         
> (file /home/ipu01/IPU_ALBERTO/corba/cpp/src/../obj/ipuDataSK.o
>  type=OBJT; 
> file /home/ipu01/IPU_ALBERTO/corba/cpp/src/../obj/ipuFactoryIn
> terfacesSK.o type=OBJT);
> ld: fatal: symbol `CORBA::BAD_POLICY_VALUE' is multiply-
> defined:
>         
> (file /home/ipu01/IPU_ALBERTO/corba/cpp/src/../obj/ipuDataSK.o
>  type=OBJT; 
> file /home/ipu01/IPU_ALBERTO/corba/cpp/src/../obj/ipuFactoryIn
> terfacesSK.o type=OBJT);
> ld: fatal: symbol `ipu::corba::MAX_UPRIVATESMSBLOCKED' is 
> multiply-defined:
>         
> (file /home/ipu01/IPU_ALBERTO/corba/cpp/src/../obj/ipuDataSK.o
>  type=OBJT; 
> file /home/ipu01/IPU_ALBERTO/corba/cpp/src/../obj/ipuFactoryIn
> terfacesSK.o type=OBJT);
> ld: fatal: symbol `PortableServer::LIFESPAN_POLICY_ID' is 
> multiply-defined:
>         
> (file /home/ipu01/IPU_ALBERTO/corba/cpp/src/../obj/ipuDataSK.o
>  type=OBJT; 
> file /home/ipu01/IPU_ALBERTO/corba/cpp/src/../obj/ipuFactoryIn
> terfacesSK.o type=OBJT);
> ld: fatal: symbol `ipu::corba::MAX_GTELNUM' is multiply-defined:
>         
> (file /home/ipu01/IPU_ALBERTO/corba/cpp/src/../obj/ipuDataSK.o
>  type=OBJT; 
> file /home/ipu01/IPU_ALBERTO/corba/cpp/src/../obj/ipuFactoryIn
> terfacesSK.o type=OBJT);
> 
> 
> If i remove the option (-g) or put  in only one file, all works ok .
> 
> Any one can help me?    thanks
> 
> Alberto
> 
> /home/ipu01/IPU_ALBERTO/corba/cpp/src:ipu01=> uname -a
> SunOS mamas2o 5.8 Generic_117350-14 sun4u sparc 
> SUNW,Sun-Fire-V240
> 
> /home/ipu01/IPU_ALBERTO/corba/cpp/src:ipu01=> CC -V
> CC: WorkShop Compilers 5.0 02/10/08 C++ 5.0 Patch 107311-19
> 
>  
> 
> 
> 
> 
> _______________________________________________
> omniORB-list mailing list
> omniORB-list at omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list

**********************************************************************************************

Important Note
This email (including any attachments) contains information which is
confidential and may be subject to legal privilege.  If you are not
the intended recipient you must not use, distribute or copy this
email.  If you have received this email in error please notify the
sender immediately and delete this email. Any views expressed in this
email are not necessarily the views of XPlan Technology.

It is the duty of the recipient to virus scan and otherwise test the
information provided before loading onto any computer system.
Xplan Technology does not warrant that the
information is free of a virus or any other defect or error.
**********************************************************************************************




More information about the omniORB-list mailing list