Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> native PL/SQL compilation won't work...

native PL/SQL compilation won't work...

From: Giovanni Azua <bravegag_at_hotmail.com>
Date: Fri, 4 Apr 2003 10:50:57 +0200
Message-ID: <b6jh7d$623do$1@ID-114658.news.dfncis.de>


(Oracle EE 9.2.0.3 Solaris SPARC 64 & W2K)

Hello all,

I dont find the way to make the native PL/SQL compilation work. I think the problem is related to the default make file settings using gcc/gmake and , I edited the default one on Solaris and changed it
to the gcc/ld paths as shown bellow.

plsql_compiler_flags=NATIVE
plsql_native_library_dir=$ORACLE_HOME/native
plsql_native_library_subdir_count=1000
plsql_native_make_file_name=$ORACLE_HOME/plsql/spnc_makefile.mk
plsql_native_make_utility=/usr/ccs/bin/gmake

Can anyone point me to some detailed tutorial or information of how to set it up properly in different platforms like W2K and Solaris SPARC.

When I try to compile this dummy procedure:

create or replace procedure helloWorld as begin

   dbms_output.put_line('Hello World from native...'); end;
/

I always get internal error. Is there any way to find out what the problem is?

Thanks in advance,
Best Regards,
Giovanni

# Makefile for natively compiled PL/SQL sources.
#
# Copyright (c) 1995, 2000 by Oracle Corporation
# NAME
# pnc_makefile.mk
# DESCRIPTION
# This file is used to compile C files generated
# as a result of native compilation of PL/SQL
# programs.
#
#
# MODIFIED (MM/DD/YY)
# mvemulap 04/09/01 - OPTIMIZE=-xO1
# mvemulap 04/05/01 - always make the target
# mvemulap 03/16/01 - fix merge error
# nmantrav 01/03/01 - Use SUNWspro6.1 cc.
# mvemulap 01/12/01 - remove .c file
# kmuthukk 12/06/00 - revert back to unoptimized as default
# kmuthukk 12/04/00 - include path must have $ORACHOME/plsql/public
# kmuthukk 12/04/00 - set optimize to -O2
# kmuthukk 12/04/00 - use ORACLE_HOME instead of SRCHOME
# mvemulap 10/27/00 - no echo
# kmuthukk 04/12/99 - compile optimized
# mvemulap 03/13/99 - creation

I_SYM=-I PLSQLHOME=$(ORACLE_HOME)/plsql/

# PLSQL include

PLSQLINCLUDE=$(PLSQLHOME)include/
PLSQLINCLUDEH=$(I_SYM)$(PLSQLINCLUDE)
# PLSQL public

PLSQLPUBLIC=$(PLSQLHOME)public/
PLSQLPUBLICH=$(I_SYM)$(PLSQLPUBLIC)
#
# File extensions
#

SO_EXT=so
OBJ_EXT=o
SRC_EXT=c

#
# C compiler flags
#
#optimize for gcc

OPTIMIZE=-O1
#OPTIMIZE=-xO1
#PIC option for gcc

PIC=-fpic
#PIC=-Kpic

INCLUDE=$(PLSQLINCLUDEH) $(PLSQLPUBLICH) PFLAGS=$(INCLUDE)
CFLAGS=$(OPTIMIZE) $(PFLAGS) $(PIC) RM=/usr/bin/rm -f

#
# Specify C Compiler
#
# CC=/opt/SunProd/SUNWspro6.1/bin/cc

CC=/usr/local/bin/gcc

#
# Compile Rule
#

COMPO=$(CC) $*.$(SRC_EXT) -c -o $*.$(OBJ_EXT) $(CFLAGS) COMPILE.c=COMPO

#
# Specify Linker and Linker flags
#
# LD=/usr/ccs/bin/ld
#

LD=/usr/local/bin/ld
LDFLAGS=-G -o $@
SO_COMMAND=$(LD) $(LDFLAGS) $(SHARED_CFLAG) $*.$(OBJ_EXT) .SILENT:
#
# To create shared libraries
#

%.$(SO_EXT): FORCE

 $($(COMPILE.c))
 $(SO_COMMAND)
 $(RM) -f $*.$(SRC_EXT) $*.$(OBJ_EXT)

FORCE: Received on Fri Apr 04 2003 - 02:50:57 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US