?
Solved

Compiling an Oracle Pro*C program

Posted on 1998-11-19
7
Medium Priority
?
1,479 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
Suggested Courses

765 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