I'm trying to build a package on Solaris but run into errors like ...
*********************
/home/tsi/ae/tools/gnu/sun4-58/bin/g++ -V2.7.2 -DSYSV -DSYSVR4 -DX11R5
-DTIBOS_SYSV -DTIBOS_SYSVR4 -DTIBOS_SUN4_58 -DTIBWIN_X11R5 -DTIBOS_UNIX
-D_NO_LONGLONG -D_REENTRANT -I. -IS -I/usr/openwin/include
-I/home/tsi/build/ETK/repository/ql/s4_58_272/include
-I/home/tss/root/Rel/s4_58_272/94R3_dbg/ref/include
-I/home/tsi/ae/tools/rv/5.3/pro/sol27sp/sparc/include
-I/home/tss/root/External/s4_58_272/include -L /usr/ccs/lib -L
/usr/gnu/sun4-58/lib/gcc-lib/sparc-sun-solaris2.8/2.7.2 -L
/home/tss/ext1/s4_55/lib -I /home/tss/ext1/s4_55/include -L . -L S -L
/usr/openwin/lib -L /home/tsi/build/ETK/repository/ql/s4_58_272/lib -L
/home/tss/root/Rel/s4_58_272/94R3_dbg/ref/lib -L
/home/tsi/ae/tools/rv/5.3/pro/sol27sp/sparc/lib -L
/home/tss/root/External/s4_58_272/lib -Wall -Wnested-externs
-Wno-unused -Wpointer-arith -fpcc-struct-return -Woverloaded-virtual -g
corbaeval_vid.o corbaeval.o libcorba.a
/home/tsi/build/ETK/repository/ql/s4_58_272/lib/libtdlutil.a
/home/tsi/build/ETK/repository/ql/s4_58_272/lib/librof.a
/home/tsi/build/ETK/repository/ql/s4_58_272/lib/libfeath.a
/home/tsi/build/ETK/repository/ql/s4_58_272/lib/libqlexc.a
/home/tsi/build/ETK/repository/ql/s4_58_272/lib/libcibi.a
/home/tsi/build/ETK/repository/ql/s4_58_272/lib/librgs.a
/home/tsi/build/ETK/repository/ql/s4_58_272/lib/libtibQ.a
/home/tsi/build/ETK/repository/ql/s4_58_272/lib/libgdss.a
/home/tsi/build/ETK/repository/ql/s4_58_272/lib/librmi.a
/home/tsi/build/ETK/repository/ql/s4_58_272/lib/libqlutil.a
/home/tsi/build/ETK/repository/ql/s4_58_272/lib/libqlsysut.a
/home/tsi/build/ETK/repository/ql/s4_58_272/lib/libesa.a
/home/tss/root/Rel/s4_58_272/94R3_dbg/ref/lib/libmdss.a
/home/tss/root/Rel/s4_58_272/94R3_dbg/ref/lib/libchan.a
/home/tsi/build/ETK/repository/ql/s4_58_272/lib/libevm.a
/home/tss/root/Rel/s4_58_272/94R3_dbg/ref/lib/libciutil.a
/home/tss/root/Rel/s4_58_272/94R3_dbg/ref/lib/libutil.a -lposix4
-lsocket -lgen -lnsl -ldl -lthread -lw -lgcc -o corbaeval_ci
ld: fatal: symbol `_vt.15CORBA_ExContext' is multiply-defined:
(file libcorba.a(tdlcorba_nd.o) and file libcorba.a(except_nd.o));
ld: fatal: symbol `_vt.21CORBA_EnvironmentImpl.10CORBA_Root' is
multiply-defined:
(file libcorba.a(tdlcorba_nd.o) and file libcorba.a(except_nd.o));
ld: fatal: symbol `_vt.17CORBA_QLException' is multiply-defined:
(file libcorba.a(tdlcorba_nd.o) and file libcorba.a(except_nd.o));
ld: fatal: symbol `stack__21CORBA_EnvironmentImpl' is multiply-defined:
(file libcorba.a(tdlcorba_nd.o) and file libcorba.a(except_nd.o));
ld: fatal: symbol `_vt.21CORBA_EnvironmentImpl' is multiply-defined:
(file libcorba.a(tdlcorba_nd.o) and file libcorba.a(except_nd.o));
ld: fatal: symbol `__15CORBA_ExContextP21CORBA_EnvironmentImpl' is
multiply-defined:
(file libcorba.a(tdlcorba_nd.o) and file libcorba.a(except_nd.o));
ld: fatal: symbol `GetException__17CORBA_QLException' is
multiply-defined:
(file libcorba.a(tdlcorba_nd.o) and file libcorba.a(except_nd.o));
ld: fatal: symbol `context__21CORBA_EnvironmentImpl' is
multiply-defined:
(file libcorba.a(tdlcorba_nd.o) and file libcorba.a(except_nd.o));
ld: fatal: symbol `_vt.20CORBA_SubscriberImpl' is multiply-defined:
(file libcorba.a(tdlcorba_nd.o) and file libcorba.a(impl_nd.o));
ld: fatal: symbol `_vt.18CORBA_UpstreamImpl' is multiply-defined:
(file libcorba.a(tdlcorba_nd.o) and file libcorba.a(impl_nd.o));
ld: fatal: symbol `_vt.16CORBA_ServerImpl' is multiply-defined:
(file libcorba.a(tdlcorba_nd.o) and file libcorba.a(impl_nd.o));
ld: fatal: symbol `_vt.20CORBA_DownstreamImpl' is multiply-defined:
(file libcorba.a(tdlcorba_nd.o) and file libcorba.a(impl_nd.o));
ld: fatal: symbol `_vt.16CORBA_ObjectImpl' is multiply-defined:
(file libcorba.a(tdlcorba_nd.o) and file libcorba.a(impl_nd.o));
ld: fatal: symbol `_vt.15CORBA_ProxyImpl' is multiply-defined:
(file libcorba.a(tdlcorba_nd.o) and file libcorba.a(impl_nd.o));
ld: fatal: symbol `impl__16CORBA_ObjectImplR17CORBA_Environment' is
multiply-defined:
(file libcorba.a(tdlcorba_nd.o) and file libcorba.a(impl_nd.o));
ld: fatal: symbol `_vt.19CORBA_PublisherImpl' is multiply-defined:
(file libcorba.a(tdlcorba_nd.o) and file libcorba.a(impl_nd.o));
ld: fatal: symbol `_vt.15CORBA_LocalImpl' is multiply-defined:
(file libcorba.a(tdlcorba_nd.o) and file libcorba.a(impl_nd.o));
ld: fatal: File processing errors. No output written to corbaeval_ci
gmake: *** [corbaeval_ci] Error 1
*********************
I trying to see if the multiple definition could be ignored by gcc. I
attempted to "-z muldefs" with ld but still run into the same error. I
read in gcc manuals about the linker option "-Xlinker" so I used
-Xlinker -z -Xlinker muldefs with gcc/g++ but got this info
***********
gcc: -z: linker input file unused since linking not done
gcc: muldefs: linker input file unused since linking not done
********************
Can you experts suggest any option that i could use to ignore the
multiple definitions?? I'm onto try unsing the -Wl, option (-Wl,
-zmuldefs) with gcc ... will this help!!
Thanks in advance...
-Prasad.
> I'm trying to build a package on Solaris but run into errors like ...
...
> ld: fatal: symbol `_vt.15CORBA_ExContext' is multiply-defined:
> (file libcorba.a(tdlcorba_nd.o) and file libcorba.a(except_nd.o));
The best thing to do is to fix this problem, rather than forcing
the linker to build you a bloated executable.
The fix is to make sure that all your classes that have virtual
methods also declare a virtual destructor, which is not inlined.
> I trying to see if the multiple definition could be ignored by gcc. I
> attempted to "-z muldefs" with ld but still run into the same error.
It is not clear what the statement above means; but in any case you
should never link any user-level code on Solaris directly with 'ld'.
> I read in gcc manuals about the linker option "-Xlinker" so I used
> -Xlinker -z -Xlinker muldefs with gcc/g++ but got this info
> ***********
> gcc: -z: linker input file unused since linking not done
> gcc: muldefs: linker input file unused since linking not done
That means you put '-Xlinker -z -Xlinker muldefs' on *compile* line.
You should forget all about -Xlinker, and add '-Wl,-z,muldefs'
to the *link* line.
> I'm onto try unsing the -Wl, option (-Wl,
> -zmuldefs) with gcc ... will this help!!
Huh?
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.