Problem: ld (linker) giving multiply defined symbol fatal errors

Problem: ld (linker) giving multiply defined symbol fatal errors

Post by Vijay Manwa » Sat, 05 Feb 1994 04:54:49



Here is an example of the error I am getting

ld: fatal: symbol `psIngresPersistentStore::FetchAttribute(moAttribute*,valMoAttrValue*,
        aecErrorData&)' is multiply defined:

        (file /tcs/patch/PSIngres/psIngresPersistentStore.o and
         file /tcs/tcore/debug/libPSIngres.a(psIngresPersistentStore.o));

This is a problem becuase I had released some "patches" to replace (override) existing
functions in libraries. I cannot change these libraries.

Is there some ld option (that I am overlooking) that ignores the second symbol definition ?

I'd really appreciate some quick help on this one.

Vijay

 
 
 

1. ld: fatal error : symbols multiply-defined

Hello,

I am using ld's -r option to build combine several object files into a
single relocatable object file. This works fine but when I then
include this new relocatable object file into another ld command to
create an executable I get the following errors:

ra: /export/home/greg/code/prog >cc -dn -o invoker invoker.c testies.o
ld: fatal: symbol `_start' is multiply-defined:
(file /opt/SUNWspro/WS6U2/lib/crt1.o and file testies.o);
ld: fatal: symbol `_environ' is multiply-defined:
(file /opt/SUNWspro/WS6U2/lib/crt1.o and file testies.o);
ld: fatal: symbol `_init' is multiply-defined:
(file /opt/SUNWspro/WS6U2/lib/crti.o and file testies.o);
ld: fatal: symbol `___Argv' is multiply-defined:
(file /opt/SUNWspro/WS6U2/lib/crt1.o and file testies.o);
ld: fatal: symbol `__cg92_used' is multiply-defined:
(file /opt/SUNWspro/WS6U2/lib/crt1.o and file testies.o);
ld: fatal: symbol `_lib_version' is multiply-defined:
(file /opt/SUNWspro/WS6U2/lib/values-xa.o and file testies.o);
ld: fatal: symbol `__environ_lock' is multiply-defined:
(file /opt/SUNWspro/WS6U2/lib/crt1.o and file testies.o);
ld: fatal: symbol `_fini' is multiply-defined:
(file /opt/SUNWspro/WS6U2/lib/crti.o and file testies.o);
ld: fatal: File processing errors. No output written to invoker

I am running Solaris8.

Any ideas on how to fix this?

It appears the objects crt1.o, crti.o and values-xa.o are being
linked-in twice...each time ld is invoked. Is there any way to stop
this?

Thanks,
Greg

2. linux running on PowerPC architecture: can do?

3. ld: fatal: symbol `_init' is multiply defined???

4. ? HOW TO read internet email over PPP to Service Provider

5. ld: multiply defined symbol

6. Samba trouble

7. solaris,apache,mod_perl,php: Make bombs symbol `Error' is multiply defined

8. Disable desktop menu

9. ld multiply defined error

10. : ld error: _tolower & _toupper multiply defined

11. gcc giving error _main (multiply defined) /usr/lib/crt0.o

12. ld.so.1: /opt/bin/apache/httpd: fatal: ... symbol ap_make_sub_pool: referenced symbol not found

13. ld: fatal: Symbol referencing errors