Re: Oraperl and 7.1

From: Grant Johnson <445362_at_aisserver1.llnl.gov>
Date: 20 Jan 1995 19:01:58 GMT
Message-ID: <445362.95Jan20110158_at_aisserver1.llnl.gov>


In article <3erqi4$6d3_at_dsinc.myxa.com> syd_at_myxa.com (Syd Weinstein) writes:

   From: syd_at_myxa.com (Syd Weinstein)    Newsgroups: comp.lang.perl,comp.databases.oracle    Date: 9 Jan 1995 12:08:20 -0500
   Organization: Myxa Corporation, Huntingdon Valley, PA    Reply-To: syd_at_Myxa.com

   I am trying to get the old oraperl from comp.sources.misc from 1993    to work with 7.1. I think I kludged together the correct libs, but    I am getting an error at ologof time.

   Anyone been down this path and has the settings for the Makefile or    a patch to use oraperl with 7.1?

   --

   Sydney S. Weinstein, CDP, CCP          Elm Coordinator - Current 2.4PL24
   Myxa Corporation                       Projected 3.0 Release: ??? ?,199?
   syd_at_Myxa.COM or dsinc!syd     Voice: (215) 947-9900, FAX: (215) 938-0235
   Welcome Page: http://www.myxa.com Elm WWW: http://www.myxa.com/elm.html

Sydney,

I had to completely kludge the Makefile to get it to compile. Then, after I got it compiled I was having a problem with long (1 minute) delays while connecting to the DB. That was described to me as a bug in the 7.1 OCI libs and so I recompiled with the 7.0.x libs and things seem to be fine.

Here is some backup from messages and my Makefile:


Return-Path: <nobody_at_Kodak.COM>
Reply-To: nobody_at_Kodak.COM
Date: Mon, 21 Nov 94 13:31:51 EST
From: nobody_at_Kodak.COM (Dan Gaffaney (Oracle developer)) To: grantj_at_llnl.gov
Subject: Re: Problem with oraperl and 7.1.3 Cc: dpg_at_halide.kodak.com

Grant-

I suspect the 'slow connection' problem you are seeing with oraperl/7.1.3 may be due to a problem I ran across. Basically, if the setlocale() function is called prior to attemting a database connect, it can take a 'long time' to complete the connection, and the CPU utilization on the system running the program is at 100% during this time.

We have been forced to keep 7.0.16 around, and do our builds against that version. Built this way, our programs have no problem doing a 'fast connect' to either 7.0.16 or 7.1.3.

This has been reported to Oracle as TAR # 106646.184 at Priority 2 (including a nice, simple demo program), but I've had the darndest time getting them to apply any effort to it.

Hope this helps,
Dan

Dan Gaffaney			Internet: dpg_at_halide.Kodak.COM
Senior Software *ngineer 	(I'm NOT infringing on state licensing laws)
Eastman Kodak Company		Rochester, NY 14652-3712	(716) 722-3968


===============================================================================

>> While trying to compile oraperl-v2.4, I get this error:
>>
>> cc -o oraperl /disks/augusta2/soft/perl-4.036/uperl.o oracle.o orafns.o ge
>> tcursor.o colons.o debug.o strtoul.o usersub.o dbug/dbug.o
>> \
>> -lm `cat /oracle/rdbms/lib/sysliblist` /oracle/rdbms/lib/libocic.a /or
>> acle/rdbms/lib/osntab.o /oracle/rdbms/lib/libsqlnet.a /oracle/rdbms/lib/libo
>> ra.a `. /disks/augusta2/soft/perl-4.036/config.sh; echo $libs`
>> ld: Undefined symbol
>> _debug
>> *** Error code 2
>> make: Fatal error: Command failed for target `oraperl'
>>

>
>Add the definition "int debug" to oraperl.c and you'll compile.


# Makefile for Oraperl and Coraperl

# Try gcc
CC=gcc
# Change these to your ORACLE installation directory and Perl source directory #

ORACLE_HOME	= /oracle/prod7
SRC		= /usr/local/src/perl/perl_4.36

# Oracle Definitions, copied from $(ORACLE_HOME)/c/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` $(MLSLIBS)
CLIBS		= $(OTHERLIBS)
OCILIB		= $(ORACLE_HOME)/lib/libocic.a

# The next 2 seem to be new in 7.1 and OCILIB isn't there. LIBHOME=$(ORACLE_HOME)/lib
LIBOCIC= $(LIBHOME)/libocic.a
LLIBOCIC= -locic
NETLIBS		= $(ORACLE_HOME)/lib/osntab.o \
			$(ORACLE_HOME)/lib/libsqlnet.a 
ORALIBS		= $(ORACLE_HOME)/lib/libora.a

#  This one is for use with 7.0.x
MISSEDLIBS      = $(ORACLE_HOME)/lib/libnlsrtl.a \
                  $(ORACLE_HOME)/lib/libcore.a \
                  $(ORACLE_HOME)/lib/libcv6.a \
                  $(ORACLE_HOME)/lib/libnetv2.a \
                  $(ORACLE_HOME)/lib/libnlsrtl.a \
                  $(ORACLE_HOME)/lib/libnetwork.a \
                  $(ORACLE_HOME)/lib/libcore.a 

#  The following works with 7.1.x
#MISSEDLIBS      = $(ORACLE_HOME)/lib/libnlsrtl.a \
#                  $(ORACLE_HOME)/lib/libcore.a \
#                  $(ORACLE_HOME)/lib/libcore3.a \
#                  $(ORACLE_HOME)/lib/libcv6.a \
#                  $(ORACLE_HOME)/lib/libc3v6.a \
#                  $(ORACLE_HOME)/lib/libnetv2.a \
#                  $(ORACLE_HOME)/lib/libnlsrtl.a \
#                  $(ORACLE_HOME)/lib/libnetwork.a \
#                  $(ORACLE_HOME)/lib/libcore3.a 




ALL_ORA_LIBS	= $(CLIBS) $(LIBOCIC) $(NETLIBS) $(ORALIBS) $(MISSEDLIBS)

# Perl Definitions, taken from $SRC/usub/Makefile
# Don't include the curses libraries here - they go in CURSELIB #
GLOBINCS	= 
LOCINCS		= 
LIBS		= `. $(SRC)/config.sh; echo $$libs`


# Oraperl Definitions

# Set DEBUG to -DDEBUGGING, -DPERL_DEBUGGING or leave blank (see orafns.h)
# If it is not blank, uncomment the definition of DBUG_O
#
DEBUG		= -DPERL_DEBUGGING
DBUG_O		= dbug/dbug.o

# Curses libraries, only required if you want to build Coraperl
# You may also need -ltermlib or -ltermcap #
CURSELIB = -lcurses
# Row cache size for SELECT statements.
# If you want to change the default, uncomment this and set the value you want
#
#CACHE		= -DCACHE_SIZE=5

# Bind variable padding.
# If you want binding an empty string to provoke an error, uncomment this line.
#
#BIND		= -DNO_BIND_PADDING

# Some system-specific things

#
# If your system library does not include strtoul, uncomment the next line STRTOUL = strtoul.o
#
# If your malloc() returns anything other than a char *, set the appropriate
# type here (don't include the *)
# MALLOC_PTR_TYPE=void
#
# If you are using Perl v3 instead of v4, uncomment the next line
# STR_2MORTAL	= -Dstr_2mortal=str_2static

# Database, username and password to use for testing #
TESTDATA = t scott tiger

#
#	Leave these blank lines so that patches to what is below
#	won't be upset by your changes to the setups above.
#


# From here on, you shouldn't need to change anything. If you do, let me know.

SRCS		= oracle.mus orafns.c getcursor.c colons.c usersub.c \
		  debug.c strtoul.c
OBJS		= oracle.o orafns.o getcursor.o colons.o debug.o $(STRTOUL)
OOBJS		= $(OBJS) usersub.o $(DBUG_O)
COBJS		= $(OBJS) cusersub.o $(DBUG_O)
HDRS		= patchlevel.h orafns.h
DEFS		= $(STRTOL) $(PUTENV) $(STR_2MORTAL) $(DEBUG) $(CACHE) $(BIND)

CFLAGS		= -Idbug -I$(SRC) $(GLOBINCS) $(LOCINCS) $(DEFS)

oraperl: $(SRC)/uperl.o $(OOBJS)
	$(CC) -o oraperl $(SRC)/uperl.o $(OOBJS)			\
	      -lm $(ALL_ORA_LIBS) $(LIBS)

coraperl: $(SRC)/uperl.o $(COBJS) $(SRC)/usub/curses.o
	$(CC) -o coraperl $(SRC)/uperl.o $(COBJS) $(SRC)/usub/curses.o	\
	      -lm $(ALL_ORA_LIBS) $(LIBS) $(CURSELIB)

all:	oraperl coraperl

test:	oraperl
	_at_oraperl -e '&ora_version'
	_at_(cd testdir ;							      \
	  rm -f My-Results ;						      \
	  echo "Testing oraperl, please wait ..." ;			      \
	  for i in *.pl	; do ../oraperl $$i $(TESTDATA) ; done > My-Results ; \
	  if cmp -s Standard-Results My-Results ;			      \
	  then echo "Test successful" ;					      \
	  else echo "Test failed - compare My-Results with Standard-Results" ;\
	  fi; echo)

# We use oraperl although perl would suffice, because we know where it is!

install:	oraperl install.pl
	_at_./oraperl ./install.pl ${SRC}

cusersub.c:	usersub.c
	_at_rm -f cusersub.c
	ln usersub.c cusersub.c

cusersub.o:	cusersub.c
	$(CC) -c $(CFLAGS) -DCURSES cusersub.c

oracle.c: $(SRC)/usub/mus oracle.mus
	$(SRC)/usub/mus oracle.mus >oracle.c

$(OOBJS) $(COBJS):	$(HDRS)

dbug/dbug.o:
	(cd dbug ; $(MAKE) dbug.o)
	_at_echo "	(back to main directory)"

clean:
	(cd dbug ; $(MAKE) clean)
	_at_echo "	(back to main directory)"
	rm -f nohup.out *.o oracle.c cusersub.c
	rm -f testdir/My-Results listing tags core

realclean clobber:	clean
	(cd dbug ; $(MAKE) clobber)
	(cd doc ; $(MAKE) clobber)
	_at_echo "	(back to main directory)"
	rm -f oraperl coraperl

listing:
	pr -fn Makefile $(HDRS) $(SRCS) >listing

docs:
	(cd doc ; $(MAKE) docs)
	_at_echo "	(back to main directory)"

shar:	clean
	shar -n oraperl-v2 -a -s kstock_at_encore.com -F -o :Part -l 64	\
		Readme [C-Q]* Row* [S-z]*
Received on Fri Jan 20 1995 - 20:01:58 CET

Original text of this message