bad libs /lib/liblddbg.so.4

Sorry this may not be directly related to Sun Studio. I seem to be able to compile fine with gcc but not with Studio.

configure:3048: /opt/SUNWspro/bin/cc conftest.c >&5

ld.so.1: ld: fatal: relocation error: file /usr/lib/libld.so.2: symbol Dbg_cap_sec_title: referenced symbol not found

cc: Fatal error in /usr/ccs/bin/ld : Killed

When compiling some GNU software, I get that error message.

Apparently the library /lib/liblddbg.so.4 should have. This is on a system that has it:

root:/lib# strings /lib/liblddbg.so.4 |grep Dbg_cap_sec_title

Dbg_cap_sec_title

This one doesn't have it:

root@vps1:/# strings /lib/liblddbg.so.4 |grep Dbg_cap_sec_title

root@vps1:/# pkginfo -l SUNWcsl

PKGINST: SUNWcsl

NAME: Core Solaris, (Shared Libs)

CATEGORY: system

ARCH: i386

VERSION: 11.10.0,REV=2005.01.21.16.34

BASEDIR: /

VENDOR: Sun Microsystems, Inc.

DESC: core shared libraries for a specific instruction-set architecture

PSTAMP: on10-patch-x20070329073629

INSTDATE: Apr 18 2007 09:03

HOTLINE: Please contact your local service provider

STATUS: completely installed

FILES:573 installed pathnames

19 shared pathnames

23 directories

159 executables

22889 blocks used (approx)

pkgchk doesn't report any errors and I believe I am on the latest patches.

This is on x86 intel 64.

Any ideas?

[1473 byte] By [ajangitya] at [2007-11-27 1:30:11]
# 1
Definitely looks like a system misconfiguration, nothing to do with compilers. Compilers just excercise different parts of linker, thus the dependancy on Sun Studio.What solaris version do you run? Whats the difference between those two machines?
SFVa at 2007-7-12 0:30:55 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2

I even tried to reinstall the SUNWcsl package from the sol10u3 cdrom, but I still don't see it.

How do I examine the package on the cdrom to see if it has these symbols in this lib?

This is the version

root@vps1:/var/sadm/pkg# isainfo -v

64-bit amd64 applications

cx16 mon sse3 sse2 sse fxsr mmx cmov amd_sysc cx8 tsc fpu

32-bit i386 applications

cx16 mon sse3 sse2 sse fxsr mmx cmov sep cx8 tsc fpu

root@vps1:/var/sadm/pkg# uname -a

SunOS vps1 5.10 Generic_125101-05 i86pc i386 i86pc

ajangitya at 2007-7-12 0:30:55 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3

root@vps1:/cdrom# pkgadd -R /tmp/bad -d . SUNWcslr

...

root@vps1:/tmp/bad/lib# strings /lib/liblddbg.so.4 |grep Dbg_cap_sec_title

root@vps1:/tmp/bad/lib#

root@vps1:/tmp/bad/lib# isainfo -v

64-bit amd64 applications

cx16 mon sse3 sse2 sse fxsr mmx cmov amd_sysc cx8 tsc fpu

32-bit i386 applications

cx16 mon sse3 sse2 sse fxsr mmx cmov sep cx8 tsc fpu

root:/cdrom# pkgadd -R /tmp/bad -d . SUNWcslr

...

root:/tmp/bad/lib# strings liblddbg.so.4 |grep Dbg_cap_sec_title

Dbg_cap_sec_title

root:/tmp/bad/lib#

root:/tmp/bad/lib# isainfo -v

32-bit i386 applications

sse fxsr mmx cmov sep cx8 tsc fpu

I really don't get it. The only difference is that this is a x86 64 kernel. I used the same iso file (using lofiadm) to do this install on the same package.

ajangitya at 2007-7-12 0:30:55 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 4
This sounds like a really good question for the linker specialistsat tools-linking@opensolaris.org. :-)
ChrisQuenellea at 2007-7-12 0:30:55 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 5
ah I am stupid.One of the 'strings' commands was a copy paste from another window and I was querying /lib instead of /tmp/bad/lib. :(It works now. I still wonder how it got to here in the first place, how the libs I had at first did not have the right bits.
ajangitya at 2007-7-12 0:30:55 > top of Java-index,Development Tools,Solaris and Linux Development Tools...