With the release of the rs506a patch about a year ago openssl-0.9.6x
started having problems with the native compiler. Below is what SCO has
posted and made available. The current method uses COFF. Which causes
problems. I have attached to files that work. Also for 3 files for
shared libraries are at the bottom.
--
Boyd Gerber
ZENEZ
This is what they have to say...
After installing RS506A, my application fails to link with unresolved symbols
in libsocket.a
_________________________________________________________________
Keywords
libresolv libsocket rs506a openserver osr5 5 v5 5.0.6 506 rs
release supplement link unresolved symbols inet_aton herror
dn_expand h_error inet_ntoa inet_addr cc CC C++ ld i386ld fatal
referencing error output written library coff socket ENGREF
SCO-559-1271 ERGREF erg501520 ERGREF erg711600
Release
SCO OpenServer Enterprise System Release 5.0.6
SCO OpenServer Host System Release 5.0.6
SCO OpenServer Desktop System Release 5.0.6
SCO OpenServer Development System Release 5.0.6
Problem
Since installing Release Supplement RS506A on my OpenServer
5.0.6 system, I can no longer build binaries, which use the
static libsocket archive. When I issue either of the commands:
$ cc stest.c -o stest -lsocket
OR
$ CC stest.C -o stest -lsocket
The link phase fails with errors similar to the following:
undefined first referenced symbol in file inet_aton stest.o
herror stest.o dn_expand /usr/lib/libsocket.a h_errno
/usr/lib/libsocket.a __dn_skipname /usr/lib/libsocket.a
_getshort /usr/lib/libsocket.a _res /usr/lib/libsocket.a
__res_init /usr/lib/libsocket.a __res_search
/usr/lib/libsocket.a __res_query /usr/lib/libsocket.a inet_addr
/usr/lib/libsocket.a inet_ntoa /usr/lib/libsocket.a i386ld
fatal: Symbol referencing errors. No output written to stest
Cause
RS506A has introduced a new version of libsocket, and some
symbols have been moved to a new library called "libresolv".
Cross referencing issues between these libraries, which cannot
be handled by the COFF linker, have been identified and may
cause linking to fail in the manner described above.
Solution
This has been reported to Caldera Engineering.
A possible workaround to the problem could be to recompile the
application source using ELF objects (cc -b elf ...), and the
dynamic shared libraries.
Notes
The OpenServer Development System's C++ front end will not
allow the use of dynamic shared objects.
ELF binaries, which use the shared object
/usr/lib/libsocket.so.1, should still work, as the new
libsocket library has been introduced as libsocket.so.2.
Binaries built with the UnixWare and OpenServer Development Kit
(UDK) should not be affected.
See Also
ta#114142, "What is Release Supplement 5.0.6a and where can I
get it?"
_________________________________________________________________
TA114882 created on 01 August 2001 , last updated on 06 August 2001
_________________________________________________________________
Copyright � 1996-2000 The Santa Cruz Operation, Inc.
All Rights Reserved.
----------------------Cut Here svr3-shared.sh------------------
#!/bin/sh
major="0"
minor="9.6c"
slib=libssl
sh_slib=$slib.so.$major.$minor
clib=libcrypto
sh_clib=$clib.so.$major.$minor
FLAGS="-O -DFILIO_H -Kalloca -Kthread"
SHFLAGS="-Kpic -DPIC"
touch $sh_clib
touch $sh_slib
echo collecting all object files for $clib.so
OBJS=
find . -name \*.o -print > allobjs
for obj in `ar t libcrypto.a`
do
OBJS="$OBJS `grep $obj allobjs`"
done
echo linking $clib.so
cc -G -o $sh_clib -h $sh_clib $OBJS -lnsl -lsocket
rm -f $clib.so
ln -s $sh_clib $clib.so
echo collecting all object files for $slib.so
OBJS=
for obj in `ar t libssl.a`
do
OBJS="$OBJS `grep $obj allobjs`"
done
echo linking $slib.so
cc -G -o $sh_slib -h $sh_slib $OBJS -L. -lcrypto
rm -f $slib.so
ln -s $sh_slib $slib.so
mv libRSAglue.a libRSAglue.a.orig
mv libcrypto.a libcrypto.a.orig
mv libssl.a libssl.a.orig
-----------------------------Cut Here----------------------------
----------------------Cut Here svr3-shared-gcc.sh----------------
#!/usr/bin/sh
major="0"
minor="9.6c"
slib=libssl
sh_slib=$slib.so.$major.$minor
clib=libcrypto
sh_clib=$clib.so.$major.$minor
FLAGS="-O3 -DFILIO_H -fomit-frame-pointer -pthread
SHFLAGS="-DPIC -fPIC"
touch $sh_clib
touch $sh_slib
echo collecting all object files for $clib.so
OBJS=
find . -name \*.o -print > allobjs
for obj in `ar t libcrypto.a`
do
OBJS="$OBJS `grep $obj allobjs`"
done
echo linking $clib.so
gcc -G -o $sh_clib -h $sh_clib $OBJS -lnsl -lsocket
rm -f $clib.so
ln -s $sh_clib $clib.so
echo collecting all object files for $slib.so
OBJS=
for obj in `ar t libssl.a`
do
OBJS="$OBJS `grep $obj allobjs`"
done
echo linking $slib.so
gcc -G -o $sh_slib -h $sh_slib $OBJS -L. -lcrypto
rm -f $slib.so
ln -s $sh_slib $slib.so
mv libRSAglue.a libRSAglue.a.orig
mv libcrypto.a libcrypto.a.orig
mv libssl.a libssl.a.orig
-----------------------------Cut Here----------------------------
----------------------Cut Here svr3-shared-installed-------------
#!/bin/sh
major="0"
minor="9.6c"
slib=libssl
sh_slib=$slib.so.$major.$minor
clib=libcrypto
sh_clib=$clib.so.$major.$minor
# If you want them in /usr/local/lib then change INSTALLTOP to point there.
#INSTALLTOP=/usr/local/ssl/lib
INSTALLTOP=/usr/local/lib
cp -p $sh_clib $INSTALLTOP
cp -p $sh_slib $INSTALLTOP
PWD=`pwd`
cd $INSTALLTOP
rm -f $INSTALLTOP/$clib.so
ln -s $INSTALLTOP/$sh_clib $clib.so
rm -f $INSTALLTOP/$slib.so
ln -s $INSTALLTOP/$sh_slib $slib.so
cd $PWD
-----------------------------Cut Here----------------------------
*** Configure.org Thu Dec 6 06:11:39 2001
--- Configure Fri Dec 28 11:23:18 2001
***************
*** 421,427 ****
# SCO 5 - Ben Laurie <[EMAIL PROTECTED]> says the -O breaks the
# SCO cc.
! "sco5-cc", "cc:::(unknown):-lsocket:${x86_gcc_des} ${x86_gcc_opts}:::", # des
options?
"sco5-cc-pentium", "cc:-Kpentium::(unknown):-lsocket:${x86_gcc_des}
${x86_gcc_opts}:::", # des options?
"sco5-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown):-lsocket:BN_LLONG
${x86_gcc_des} ${x86_gcc_opts}:::", # the SCO assembler doesn't seem to like our
assembler files ...
--- 421,427 ----
# SCO 5 - Ben Laurie <[EMAIL PROTECTED]> says the -O breaks the
# SCO cc.
! "sco5-cc", "cc:-belf::(unknown):-lsocket -lresolv:${x86_gcc_des}
${x86_gcc_opts}:::", # des options?
"sco5-cc-pentium", "cc:-Kpentium::(unknown):-lsocket:${x86_gcc_des}
${x86_gcc_opts}:::", # des options?
"sco5-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown):-lsocket:BN_LLONG
${x86_gcc_des} ${x86_gcc_opts}:::", # the SCO assembler doesn't seem to like our
assembler files ...
"sco5-cc-shared","cc:-belf:::-lsocket -lresolv -lnsl:MD2_CHAR RC4_INDEX
${x86_gcc_des}::::::::::dlfcn:svr3-shared:-Kpic",
***************
*** 424,429 ****
"sco5-cc", "cc:::(unknown):-lsocket:${x86_gcc_des} ${x86_gcc_opts}:::", # des
options?
"sco5-cc-pentium", "cc:-Kpentium::(unknown):-lsocket:${x86_gcc_des}
${x86_gcc_opts}:::", # des options?
"sco5-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown):-lsocket:BN_LLONG
${x86_gcc_des} ${x86_gcc_opts}:::", # the SCO assembler doesn't seem to like our
assembler files ...
# Sinix/ReliantUNIX RM400
# NOTE: The CDS++ Compiler up to V2.0Bsomething has the IRIX_CC_BUG optimizer
problem. Better use -g */
--- 424,431 ----
"sco5-cc", "cc:-belf::(unknown):-lsocket -lresolv:${x86_gcc_des}
${x86_gcc_opts}:::", # des options?
"sco5-cc-pentium", "cc:-Kpentium::(unknown):-lsocket:${x86_gcc_des}
${x86_gcc_opts}:::", # des options?
"sco5-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown):-lsocket:BN_LLONG
${x86_gcc_des} ${x86_gcc_opts}:::", # the SCO assembler doesn't seem to like our
assembler files ...
+ "sco5-cc-shared","cc:-belf:::-lsocket -lresolv -lnsl:MD2_CHAR RC4_INDEX
+${x86_gcc_des}::::::::::dlfcn:svr3-shared:-Kpic",
+ "sco5-gcc-shared","gcc:-O3 -DFILIO_H -fomit-frame-pointer:::-lsocket -lresolv
+-lnsl:BN_LLONG ${x86_gcc_des}
+${x86_gcc_opts}:${x86_elf_asm}:dlfcn:svr3-shared:-fPIC",
# Sinix/ReliantUNIX RM400
# NOTE: The CDS++ Compiler up to V2.0Bsomething has the IRIX_CC_BUG optimizer
problem. Better use -g */
*** Makefile.org.org Wed Nov 14 03:44:11 2001
--- Makefile.org.new Fri Dec 28 12:10:16 2001
***************
*** 328,333 ****
done; \
fi
# UnixWare 7 and OpenUNIX 8 native compilers used
do_svr5-shared:
if ${DETECT_GNU_LD}; then \
--- 328,352 ----
done; \
fi
+ # OpenServer 5 native compilers used
+ do_svr3-shared:
+ if ${DETECT_GNU_LD}; then \
+ $(MAKE) do_gnu-shared; \
+ else \
+ libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
+ ( PATH=/usr/ccs/bin:$$PATH ; export PATH; \
+ find . -name "*.o" -print > allobjs ; \
+ OBJS= ; export OBJS ; \
+ for obj in `ar t lib$$i.a` ; do \
+ OBJS="$${OBJS} `grep $$obj allobjs`" ; \
+ done ; \
+ set -x; ${CC} -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
+ -h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
+ $${OBJS} $$libs ${EX_LIBS} ) || exit 1; \
+ libs="$$libs -l$$i"; \
+ done; \
+ fi
+
# UnixWare 7 and OpenUNIX 8 native compilers used
do_svr5-shared:
if ${DETECT_GNU_LD}; then \