?
Solved

Compiling an Oracle Pro*C program

Posted on 1998-11-19
7
Medium Priority
?
1,491 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 100 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

650 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