Operating System - HP-UX
1833325 Members
2731 Online
110051 Solutions
New Discussion

Error "ld: warning: global symbol `' has non-global binding"

 
Ankit Grover
Frequent Advisor

Error "ld: warning: global symbol `' has non-global binding"

Dear all,

We have a application running on HP-UX 11.23 IA64 server. The logic has been written in COBOL and we are using MicroFocus Server Express 4.0SP2. But we are now testing it on Sun Solaris box(SunOS 5.10 sun4u sparc SUNW,UltraAX-i2).

While trying to create a sharable object linking my C objects with COBOL & Oracle libraries, I am getting following error:

ld: warning: global symbol `' has non-global binding:
(file /opt/microfocus/cobol/lib/libcobrts.so value=LOCL);
ld: warning: global symbol `' has non-global binding:
(file /opt/microfocus/cobol/lib/libcobcrtn.so value=LOCL);
ld: warning: global symbol `' has non-global binding:
(file /opt/microfocus/cobol/lib/libcobmisc.so value=LOCL);
ld: warning: global symbol `' has non-global binding:
(file /opt/microfocus/cobol/lib/libcobscreen.so.2 value=LOCL);
Undefined first referenced
symbol in file
bind /fns/l/r/int/beatcpio.o
recv /fns/l/r/int/beatcpio.o
send /fns/l/r/int/beatcpio.o

ld: fatal: Symbol referencing errors. No output written to rtsunx.l
cob32: bad magic number:

Any idea about such kind of error??

Regards,
Ankit
4 REPLIES 4
Dennis Handly
Acclaimed Contributor

Re: Error "ld: warning: global symbol `' has non-global binding"

>now testing it on Sun Solaris box

Why are you asking Sun and MicroFocus questions here? (I thought I didn't recognize those linker messages.)
Ankit Grover
Frequent Advisor

Re: Error "ld: warning: global symbol `' has non-global binding"

Hi Dennis,

Even though there is a diff between 2 Unix but the cause of the error would remain same. Thats what I thought and posted the message here.

The problem was I was linking a 64-bit Oracle library with 32-bit objects.
Dennis Handly
Acclaimed Contributor

Re: Error "ld: warning: global symbol `' has non-global binding"

>but the cause of the error would remain same.

Not at all.

>The problem was I was linking a 64-bit Oracle library with 32-bit objects.

The HP-UX linker has a very specific error for that and it would be very obvious.

You should close this thread. (Any should have closed it when you figured out the problem.)
Ankit Grover
Frequent Advisor

Re: Error "ld: warning: global symbol `' has non-global binding"

The error was coming due to 32-bit & 64-bit mismatch of the libraries.