Discussion:
C++ Link Error on UnixWare 7.1.1
(too old to reply)
J. L. Schilling
2003-12-09 19:26:57 UTC
Permalink
I am porting a product to UnixWare 7.1.1 by re-compiling the source
code in C++ (already have a few ported to other Unix platforms). There is
always the following link error while I am compiling C++ code, I give the
[...]
vbroker1[35]%CC -O vbase1.C -Kthread
UX:ld: ERROR: /usr/ccs/lib/libc.so(libc.so.1): fatal error: symbol
size = 0; /usr/ccs/lib/libc.so(libc.so.1): size = 6260
This looks like your libc and libthread system libraries are mismatched.
In particular, it looks like you have the original UW 7.1.1 libc, but
that you have loaded a more recent libthread onto the system. The
definition of __arglist was changed over time in both libraries, and
at this point both need to be weak (your libc one isn't).

Do "grep libc.so.1 [and libthread.so.1] /var/sadm/install/contents" to
find out what packages these libraries come from, then do "pkginfo -l"
on both of those packages, and post the results. Then we can see
what's going on.

Jonathan Schilling
clement tang
2003-12-09 23:39:01 UTC
Permalink
We work in the same project. Here is the info.

%grep libc.so.1 /var/sadm/install/contents
/OpenServer/usr/lib/ld.so.1=/OpenServer/usr/lib/libc.so.1 l none acp
/OpenServer/usr/lib/libc.so.1 f none 0755 root root 372236 59662
1000156684 acp update711
/OpenServer/usr/lib/libc.so.1=/OpenServer/usr/lib/ld.so.1 l none
update711
/usr/ccs/lib/libp/libc.so.1 f uccs 0755 bin bin 542884 59242
1000156700 uccs:bnative update711
/usr/lib/ld.so.1=/usr/lib/libc.so.1 l none base:sysutil update711 libc
/usr/lib/libc.so.1 f none 0755 bin bin 575024 51530 1036053688 1 NULL
NULL base:sysutil update711 libc

%grep /usr/lib/libthread.so /var/sadm/install/contents
/usr/lib/libthread.so=/usr/lib/libthread.so.1 l base base:sysutil
update711:none libthread
/usr/lib/libthread.so.1 f base 0555 bin bin 132856 45084 1036053688 1
NULL NULL base:sysutil update711:none libthread


PKGINST: libc
NAME: UnixWare Runtime C Library
CATEGORY: system
ARCH: IA32
VERSION: 8.0.1
BASEDIR: /
VENDOR: Caldera International, Inc.
PSTAMP: UnixWare 7.1.3 10/31/2002 bl11.1
INSTDATE: Oct 09 2003 04:59 PM
STATUS: completely installed
FILES: 2 installed pathnames
2 shared pathnames
1 linked files
1 executables
1124 blocks used (562K)(approx)

PKGINST: libthread
NAME: Runtime Thread Library
CATEGORY: system
ARCH: IA32
VERSION: 8.0.1
BASEDIR: /
VENDOR: CALDERA
PSTAMP: UnixWare 7.1.3 10/31/2002 bl11.1
INSTDATE: Oct 09 2003 05:00 PM
STATUS: completely installed
FILES: 8 installed pathnames
4 shared pathnames
4 linked files
4 executables
1154 blocks used (577K)(approx)
J. L. Schilling
2003-12-11 01:09:24 UTC
Permalink
We work in the same project. Here is the info. [...]
We think we can guess what's happened here, or at least close enough.
The explanation gets into some obscurosity but bear with it --

At some point you've upgraded your UW 711 to newer runtime library
versions for libc.so.1 and libthread.so.1. These are available on our web
site. However, we don't make the newer full uccs package available to
be installed on UW711 as easily.

The problem is because libc.so and libthread.so, the libraries used
at link time now clash regarding __arglist, not the runtime *.so.1
libraries. This is because libthread.so is a link to libthread.so.1,
and we do not permit back-reving of runtime shared libraries, but
libc.so is just an archive holding an old copy of its corresponding
libc.so.1, and it's *that* libc.so.1 which still has the non-WEAK
definition of __arglist.

If you were to force /usr/lib/libthread(T).so(.1) to be the UW711
version, it wouldn't have an __arglist to clash with. If you were
to install the uccs which matches the libthread.so.1 you have on
your system, everything would work.

HOWEVER, it's likely that the simplest way to fix your problem is
just to hand-upgrade your libc.so. As root, do:

# cd /usr/ccs/lib
# cp libc.so save-libc.so
# ar -rv libc.so /usr/lib/libc.so.1

and this should plug in a copy of the newer libc.so.1 in the libc.so
archive. You will end up with a bit of a mixed world, but it should
eliminate the __arglist issue without requiring too much hassle.

Let us know if this works....

Jonathan Schilling
clement tang
2003-12-23 01:31:59 UTC
Permalink
It works. Thanks a lot.

clement

clement tang
2003-12-09 23:49:54 UTC
Permalink
BTW, IT and I re-install development kit 7.1.1 from SCO CD this
morning. After the installation, I checked the libc.so and
libthread.so is version 7.1.3 as shown in pkginfo. results.
Loading...