?
Solved

Compiling an Oracle Pro*C program

Posted on 1998-11-19
7
Medium Priority
?
1,500 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 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

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.

Question has a verified solution.

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

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
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.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Suggested Courses
Course of the Month16 days, 13 hours left to enroll

862 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