Re: Oraperl problem

From: Tim Bunce <Tim.Bunce_at_ig.co.uk>
Date: Mon, 6 Feb 1995 11:39:38 +0000
Message-ID: <D3Ktq2.1It_at_ig.co.uk>


In article <3gtk5q$6g1_at_bristol.onramp.net>, Michael J. Marolda <mmarolda_at_bristol.onramp.net> wrote:

>In article <3gt0ji$pej_at_highway.leidenuniv.nl>,
>Rene de Bie <M.A.de_Bie_at_CRI.leidenuniv.nl> wrote:
>>Hi, I would like to know if somebody ever compiled oraperl succesfully
>>on solaris2.3. I use Oraperlv2.4, perl-4.036, gcc(or cc) and oracle 7.1.3
>>
>>The error msg i get is:
>>
>>Undefined 	first referenced
>>symbol		in file
>>__cg92		/home/oracle/product/7.1.3/lib/libocic.a(oci.o)
>>
>>I've seen a msg on this group about this, but the solution was not given,
>>at least, i didn't understand it. Anyone suggestions?
>>
>
>
>The problem isn't perl.  Oracle on Solaris requres that you use the
>Sun compiler, acc which has libraries that resolve that resolve that
>symbol.  I've heard (but haven't tried it) that  you can define an
>extern int __cg92 in one of your source files and you will be able
>to link.  I don't know what side affects there will be as a result of
>this.
>
>
>I hope this helps.
>
>Mike Marolda
>mmarolda_at_onramp.net


From the file...
ftp.demon.co.uk:/pub/perl/db/perl4/oraperl/oracle7.note3.solaris2.compile

From: mloennro_at_se.oracle.com (Magnus Lonnroth) Newsgroups: comp.databases.oracle,comp.lang.perl Subject: Re: Oraperl Link Problem (Solaris 2.3) Message-ID: <MLOENNRO.94May25225844_at_ramses.se.oracle.com> Date: 25 May 94 20:58:43 GMT
References: <2rvrvg$371_at_scsing.switch.ch> Organization: Oracle Sweden
In-Reply-To: berli_at_switch.ch's message of 25 May 1994 17:48:00 +0200 X-Disclaimer: This message was written by an unauthenticated user

              at Oracle Corporation.  The opinions expressed are those
              of the user and not necessarily those of Oracle.

In article <2rvrvg$371_at_scsing.switch.ch> berli_at_switch.ch (Martin Berli) writes:
>
> We are running ORACLE7 Server Release 7.0.15.4.0 on Solaris 2.3. We tried to
> compile/link oraperl 2.4. There is one undefined symbol we where not able
> to resolve. We would be very glad if someone could help us.
>
> Excerpt from Makefile:
> ---------------------------------------------------------------------------
> # Makefile for Oraperl and Coraperl
>
> # Change these to your ORACLE installation directory and Perl source directory
> #
> ORACLE_HOME = /home/oracle/product/7.0.15
> SRC = /opt/gnu/src/perl-4.036
>
> # Oracle Definitions, copied from $(ORACLE_HOME)/proc/demo/proc.mk
> # ALL_ORA_LIBS is the only entry that the Makefile actually uses;
> # change it to whatever you need to link Pro*C programs
> #
> OTHERLIBS = `cat $(ORACLE_HOME)/rdbms/lib/sysliblist`
> CLIBS = $(OTHERLIBS)
> OCILIB = -locic
> NETLIBS = $(ORACLE_HOME)/lib/osntab.o -lsqlnet
> ORALIBS = -lora -lcv6 -lcore -lsqlnet -lnlsrtl -lcore
>
> ALL_ORA_LIBS = -L$(ORACLE_HOME)/lib $(CLIBS) $(OCILIB) $(NETLIBS) $(ORALIBS)
> #....
> ----------------------------------------------------------------------------
>
> Compile-/Linking Output:
>
> ----------------------------------------------------------------------------
> cc -o oraperl /opt/gnu/src/perl-4.036/uperl.o oracle.o orafns.o getcursor.o colons.o debug.o strtoul.o usersub.o \
> -lm -L/home/oracle/product/7.0.15/lib `cat /home/oracle/product/7.0.15/rdbms/lib/sysliblist` -locic /home/oracle/product/7.0.15/lib/osntab.o -lsqlnet -lora -lcv6 -lcore -lsqlnet -lnlsrtl -lcore `. /opt/gnu/src/perl-4.036/config.sh; echo $libs`
> Undefined first referenced
> symbol in file
> __cg92_used /home/oracle/product/7.0.15/lib/libocic.a(oci.o)
> ld: fatal: Symbol referencing errors. No output written to oraperl
> *** Error code 1
> make: Fatal error: Command failed for target `oraperl'
> ---------------------------------------------------------------------------
>
>
> Martin Berli
>
> ------------------------------------------------------------------------
> Internet: berli_at_switch.ch | SWITCH, Swiss Academic and Research Network
> Phone : +41 1 268 1540 | Limmatquai 138
> Fax : +41 1 268 1568 | CH-8001 Zurich

You haven't installed support for SPARC V8 when you installed your SPARC Compiler. And you need it even if your using gcc (which we don't support)...

The following was included in the 7.0.15 (?) System Release Notes..

One of the features of Oracle7 for Solaris 2.x is that a compiler is not required for installation and use of the rdbms and tools, with the exception of pre-compilers and user exits. We felt this was a worthwhile feature since Sun would no longer be bundling a compiler with their operating system. To re-link, Oracle7 for Solaris 2.x now uses '/usr/ccs/bin/ld' instead of 'cc'.However, to be able to re-link with 'ld', we needed some object files whichwere provided with the SunPro SPARCompiler C. We signed an agreement with SunPro which allows us to ship and use these files with our Oracle7 release. These files are located in $ORACLE_HOME/lib for our releases. They are:

        crt1.o, crti.o, crtn.o, and __fstd.o

The first three files contain necessary symbols for any generic linking. The latter, __fstd.o, is included because we have compiled our code with the -xcg92 compiler flag. As a result we need this object file to resolve necessary symbols at link time, such as _cg92_used. Note that if ANY files in an application are compiled using the -xcg92 flag, when it is linked the symbol _cg92_used will need to be resolved.

If re-linking is done with 'cc', the -xcg92 flag must be included in the link line to resolve the symbol, else if 'ld' is used, the file __fstd.o must be included in the link line. Therefore any customers linking with Oracle must doone of the above depending on whether they are using a compiler or not.

  • End of new portInfo note ******
--

Magnus Lonnroth
Tech.Sales & Consultant
Oracle Sweden
Mail: mloennro_at_se.oracle.com
Received on Mon Feb 06 1995 - 12:39:38 CET

Original text of this message