Solved

Compiling an Oracle Pro*C program

Posted on 1998-11-19
7
1,407 Views
Last Modified: 2009-07-29
When I compile the source code using a makefile, it produces the following error :

make: 1254-002 Cannot find a rule to create target archive from dependencies.
Stop.
0
Comment
Question by:derick042497
  • 3
  • 3
7 Comments
 
LVL 1

Expert Comment

by:slinky
ID: 1082679
will need to see more of your makefile
are you building a library?
0
 
LVL 3

Accepted Solution

by:
poncejua earned 50 total points
ID: 1082680
This is because there is syntax error in $ORACLE_HOME/plsql/demo/plsql.mk and  
$ORACLE_HOME/plsql/env_plsql.mk.  

Modify the follwing line in $ORACLE_HOME/plsql/demo/plsql.mk        %.o: %.pc to       .pc.o:  
Modify the following line in $ORACLE_HOME/plsql/env_plsql.mk  
ORAXLCFLAGS=-F$(ORACLE_HOME)/rdbms/src/server/osds/aix/xlc.cfg    to  
      ORAXLCFLAGS=  

Basicly, there are syntax errors in the plsql.mk and env_plsql.mk.  Once the syntax error is fixed, there is no problem relink the plsql programs.  
0
 

Author Comment

by:derick042497
ID: 1082681
I'd tried your suggestion by changing the Makefile but I still get the same error message. BTW, I'm using $ORACLE_HOME/precomp/env_precomp.mk in my Makefile. I've even tried compiling the sample program in $ORACLE_HOME/plsql/demo by referring to your steps. It doesn't generate anything. I'm using Oracle 7.3 running under AIX 4.2.1
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 3

Expert Comment

by:poncejua
ID: 1082682
Could you please let me know the full oracle version number ?


0
 

Author Comment

by:derick042497
ID: 1082683
I'm using Oracle 7 Release 7.3.2.3.0
0
 
LVL 3

Expert Comment

by:poncejua
ID: 1082684
I'm sorry. I really don't know what's happening. You're in the right release.
0
 

Author Comment

by:derick042497
ID: 1082685
This is what I obtained now. Anybody has any idea.

% make
        if [ "" = "shared" ]; then  /u01/home/oracle/app/oracle/product/7.3.2/bin/oraxlc  -o write_err_rpt err_rpt.o -L/u01/home/oracle/app/oracle/product/7.3.2/lib ;  else  /u01/home/oracle/app/oracle/product/7.3.2/bin/oraxlc  -o write_err_rpt err_rpt.o -L/u01/home/oracle/app/oracle/product/7.3.2/lib ;  fi
ld: 0711-317 ERROR: Undefined symbol: .sqlcxt
ld: 0711-317 ERROR: Undefined symbol: .sqlglm
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
make: 1254-004 The error code from the last command is 8.

*************************************************************************
Contents of Makefile

include $(ORACLE_HOME)/plsql/env_plsql.mk

SUFFIXES: .pc .c .o

LDSTRING=
PRODUCT_LIBHOME=
MAKEFILE=Makefile
PROCPLSFLAGS= sqlcheck=full userid=$(USERID) dbms=v6_char
PROCPPFLAGS= code=cpp cpp_suffix=C include=/usr/include include=/usr/lpp/xlC/inc
lude
USERID=userid/password
INCLUDE=$(I_SYM). $(PRECOMPPUBLIC)

SAMPLES=err_rpt
OBJS=err_rpt.o
EXE=write_err_rpt

# Rule to compile any program (specify EXE= and OBJS= on command line)

build: $(OBJS)
       if [ "$(ORA_CLIENT_LIB)" = "shared" ]; then \
       $(CC) -o $(EXE) $(OBJS) -L$(LIBHOME) $(PROLDLIBS); \
       else \
       $(CC) -o $(EXE) $(OBJS) -L$(LIBHOME) $(PROLLS); \
       fi


samples: $(SAMPLES)

$(SAMPLES):
        $(MAKE) -f $(MAKEFILE) build OBJS=$@.o EXE=$@

pc.c:
        $(PROC) $(PROCFLAGS) iname=$*.pc

pc.o:
        $(PROC) $(PROCFLAGS) iname=$*.pc
        $(CC) $(CFLAGS) -c $*.c

c.o:
        $(CC) $(CFLAGS) -c $*.c

err_rpt.o: err_rpt.pc
        $(PROC) $(PROCPLSFLAGS) iname=$*.pc
        $(CC) $(CFLAGS) $(PRECOMPPUBLIC) -c $*.c
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Via a live example, show how to take different types of Oracle backups using RMAN.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now