Solved

Compiling an Oracle Pro*C program

Posted on 1998-11-19
7
1,431 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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Query to identify changes between rows of two tables 8 55
Fill Null values 5 28
oracle forms question 22 42
subtr returning incorrect value 8 31
Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

838 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