HELP! Building OraPerl

From: Rich Holoch <holoch_at_www.ccnet.com>
Date: 1996/05/03
Message-ID: <318A6805.2AF_at_www.ccnet.com>


I am close to getting OraPerl built. Can anyone help? (I am also working on installing the Perl 5.002 DBI/DBD on another machine).

Wolfgang Kuehn wrote:

>
> Hi Rich,
>
> Here is a Makefile which worked for me (DEC AlPHA OSF3.2)
> [SNIP!]

I found that there was some unprintable characters in the way I downloaded your makefile that caused my initial problem. But after I was able to clean up the makefile, I received errors on -losn, -lmm, -lsng, -lnetv2 and -lnetwork. I simply removed these references, and have moved closer to finally building OraPerl. Now I receive:

ld:
Unresolved:

_db_on_
_db_pargs_
_db_doprnt_
_db_pop_
_db_push_
_db_enter_
_db_return_
_db_process_

debug
*** Exit 1
Stop.

When I run oraperl, I receive:

26511:oraperl: /sbin/loader: Error: unresolvable symbol in oraperl: debug
26511:oraperl: /sbin/loader: Error: unresolvable symbol in oraperl: _db_on_
26511:oraperl: /sbin/loader: Error: unresolvable symbol in oraperl: _db_process_
26511:oraperl: /sbin/loader: Fatal Error: this executable has unresolvable symbo
ls

Which sure looks like something in the OraPerl libs or debug - my Oracle refs are probably ok. I installed Perl 4.036 with all defaults, and don't think I installed with debug. Here is what the Makefile looks like now:

###################################
# Makefile for Oraperl not Coraperl
#
# Environment
# - Oracle 7.2.2.4
# - Dec AlphaServer 400
# - Digital UNIX 3.2c
#
# Changes made from Makefile for Oracle 7.0.xxx
#
# Pentti.Vanska_at_gsf.fi
# Geological Survey of Finland
# 15.3.1996
#
#
# Change these to your ORACLE installation directory and Perl source directory
CC=cc

ORACLE_HOME     = /usr/users/oracle/7.2.2
SRC             = /home/sysadm/perl-4.036

# 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
#

LIBHOME=$(ORACLE_HOME)/lib
LDFLAGS=$(NON_SHARED) -L$(LIBHOME) $(NO_STRIP_EXE?:"-s") $(O2_BUG?-O1:-O2) LLIBCORE=-lcore3
LLIBCV6=-lc3v6
LLIBNLSRTL=-lnlsrtl3

#LLIBORA=-lora -losn -lora -lnlsrtl -luc -lrem -lnetv2 -lnetwork -lknlopt
LLIBORA=-lora -lora -lnlsrtl -luc -lrem -lknlopt

LIBOCIC=$(LIBHOME)/libocic.a

OTHERLIBS= -lrt `cat $(ORACLE_HOME)/rdbms/lib/sysliblist` $(MLSLIBS) LDLIBS= -lm
#LLIBSQLNET=-lsqlnet -lknl -lstublm -ldbm -lPW -lm -lbsd -losn -locic -lmm -lcore -lnsg
-lros -ltk2c -ltk2m

LLIBSQLNET=-lsqlnet -lknl -lstublm -ldbm -lPW -lm -lbsd -locic -lcore -lros -ltk2c -ltk2m

OSNTAB=$(LIBHOME)/osntab.o

CORELIBS=$(LLIBNLSRTL) $(LLIBCV6) $(LLIBCORE) $(LLIBNLSRTL) \         $(LLIBCCOREFUND) $(LLIBCORE) NETLIBS=$(OSNTAB) $(LLIBSQLNET)
TTLIBS= $(NETLIBS) $(LLIBORA) $(LLIBSQLNET) $(LLIBORA) $(LIBPLSHACK) \

                $(CORELIBS) $(LDLIBS) $(CLIBS)
CLIBS=$(OTHERLIBS)
NDFOPT= $(ORACLE_HOME)/rdbms/lib/kpundf.o

# libraries for linking oci programs

LLIBOCIC= -locic
OCILDLIBS= $(LLIBOCIC) $(TTLIBS) ALL_ORA_LDFLAGS = $(LDFLAGS)
# Note the inclusion of NDFOPT in the following. It causes oraperl to
# be linked in non-deferred mode. This is a workround for a bug present
# in both 7.0.12 and 7.0.13. The symptom of this bug is that when oraperl
# processes a select yielding more than 16 columns, the first column
# is processed incorrectly.

ALL_ORA_LIBS = $(OCILDLIBS)
# 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           =

#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 = ora 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) $(ALL_ORA_LDFLAGS) -o oraperl $(SRC)/uperl.o $(OOBJS) \
        -lm $(ALL_ORA_LIBS) $(LIBS)

all: oraperl

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)/perl $(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]*

*******************************************
Any ideas? Thanks in advance.

Rich
holoch_at_ccnet.com Received on Fri May 03 1996 - 00:00:00 CEST

Original text of this message