Re: Pro*C & GNU C: _cg92 in sqlnet.a

From: Donald Munro <ccahdm_at_beluga.upe.ac.za>
Date: Fri, 28 Jan 1994 08:01:20 GMT
Message-ID: <CKByA8.86y_at_hippo.ru.ac.za>


>>>>>> "Jeff" == Jeff Kopmanis <jeffk_at_garnet.msen.com> writes:
> Jeff> We are running Oracle 7.0.13 under Solaris 2.2 and are trying
> Jeff> to compile Pro*C programs with GNU C 2.5.6. We get some odd
> Jeff> ld warnings about 10 of the libraries, then it fails with an
> Jeff> error that says that the symbol __cg92 is not found and it is
> Jeff> first referred to in sqlnet.a. We've got LD_LIBRARY_PATH set
> Jeff> to point to every known library location and we're using the
> Jeff> standard Oracle makefile as a template makefile. What's this
> Jeff> thing doing and why doesn't it work? Is it GNU related, or
> Jeff> should I dig deeper into Oracle? Is it required stuff? Its
> Jeff> first in the ld line for libraries.
 

> Magnus> This is not GNU related. It's ld related. This is known as
> Magnus> bug 182244. There is an error in the makefile (proc.mk).
> Magnus> There is also a patch available (a new makefile). The error
> Magnus> occurs when trying to (re-)link just about anything on a box
> Magnus> with SPARC architecure (cg92 is SPARC V8, cg89 is
> Magnus> SPARC). Please call Oracle customer support to get this
> Magnus> patch. Note: this patch is only need for cg89-machines, e.g.
> Magnus> without the 1 MB on-board super-cache. --
>
>Sorry, this is *also* GNU gcc related. The Sun SPARC compiler is a
>software requirement for writing Pro*C programs, because our libraries
>(libsql.a, libocic.a, etc) are looking for stuff in /opt/SUNWspro. You
>might be able to hack around this, but I wouldn't recommend it.

I have been using GNU C v2.5.7 to compile PRO*C programs for Oracle 7 on a Sun SparcServer 1000 and Sun Classic without any problems. I use the following script :

proc iname=$1.pc include=$ORACLE_HOME/proc/lib ltype=none ireclen=220 select_error=n code=ansi_c dbms=v7 sqlcheck=syntax line=y

gcc -O2 -c -v $1.c

ld -V -dy /export/home/oracle7/rdbms/lib/crti.o

/export/home/oracle7/rdbms/libcrt1.o 
/opt/SUNWspro/bin/../SC2.0.1/cg92/__fstd.o 
/opt/SUNWspro/bin/../SC2.0.1/values-xt.o 
/export/home/oracle7/lib/osntab.o 
-o $1 $1.o -L $ORACLE_HOME/lib -lsql -lsqlnet -lora -lnetwork -lcore
-ldl -laio -u __cg92_libc -L /opt/SUNWspro/SC2.0.1/cg92 -lm 
-Y P,/opt/SUNWspro/bin/../SC2.0.1/cg92:/opt/SUNWspro/bin/../SC2.0.1:/usr/ucblib:/usr/ccs/lib:/usr/lib -Qy -lc /export/home/oracle7/rdbms/lib/crtn.o Received on Fri Jan 28 1994 - 09:01:20 CET

Original text of this message