0 Replies Latest reply: Dec 3, 2011 2:36 AM by 654605 RSS

    Error while compiling pro*c code in oracle 11gR2 on AIX6.1 (64bit)..

    654605
      Hi ,

      We are migrating from oracle 10gR2 on AIX 5.3 to oracle 11gR2 on AIX 6.1 (64bit Kernal) . As pat of this , we need to migrate all the pro*c codes and for that we are trying to complie those files on the new server . But while compiling , we are getting error as :

      *1586-119 (U) The 32-bit file "/lib/crt0_64.o" is being linked in 64-bit mode, or vice versa.*

      We have only one library in $ORACLE_HOME which is lib..Lib32 is not present .

      Could you please help me in resolving this error ?

      The details , that I feel will be helpful ,is provided below :

      COMP_PROC ]>echo $ORACLE_HOME
      */data/oracle/product/11.2.0.2*

      */COMP_PROC ]>echo $LD_LIBRARY_PATH*
      */data/oracle/product/11.2.0.2/lib*
      COMP_PROC ]>echo $LIBPATH
      */data/oracle/product/11.2.0.2/lib*
      COMP_PROC ]>echo $PATH
      */data/oracle/product/11.2.0.2:/data/oracle/product/11.2.0.2/bin:/applications/tf3/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/bin:.::/dbjobs/utils/adsm:.:/applications/tf3/bin:/applications/tf3/bin/ctm/source:/usr/vac/bin:/applications/tf3/bin:/usr/lib:/tshome/tfapp:/tshome/tfapp/app/genio::/tshome/tfapp/app/genio/odbc:/tshome/tfapp/app/genio/odbc/lib:/data/oracle/product/11.2.0.2/lib:/data/oracle/product/11.2.0.2/bin:/tshome/tf01/:/usr/bin:/etc:/usr/sbin:/usr/ucb:/tshome/tfapp/bin:/usr/bin/X11:/sbin*


      Compiler version :
      COMP_PROC ]>cc -v
      exec: /usr/bin/pg(/usr/bin/pg,/usr/vac/exe/default_msg/vac.help,NULL)
      C for AIX Compiler, Version 6

      os version :
      COMP_PROC ]>uname -a
      AIX 1 6 00F6249E4C00

      Make file :
      ######################################################################
      # File : makeheader.h #
      # #
      # Description : #
      # The target 'build' puts together an executable $(EXE) from the .o files
      # in $(OBJS) and the libraries in $(PROLDLIBS). It is used to build the
      # c sample programs. The rules to make .o files from .c and .pc files are
      # later in this file.
      # ($(PROLDLIBS) includes the client shared library, and $(STATICPROLDLIBS) does
      # not.)
      # Here are some rules for converting .pc -> .c -> .o and for .typ -> .h.
      #
      # If proc needs to find .h files, it should find the same .h files that the
      # c compiler finds. We use a macro named INCLUDE to hadle that. The general
      # format of the INCLUDE macro is
      # INCLUDE= $(I_SYM)dir1 $(I_SYM)dir2 ...
      #
      # Normally, I_SYM=-I, for the c compiler. However, we have a special target,
      # pc1, which calls $(PROC) with various arguments, include $(INCLUDE). It
      # is used like this:
      # $(MAKE) -f $(MAKEFILE) <more args to make> I_SYM=include= pc1
      # This is used for some of $(SAMPLES) and for $(OBJECT_SAMPLE).
      ######################################################################

      USERID=xxxxx/yyyyy@zzzzzzz
      SHELL=/bin/ksh

      MQMLIBS=/usr/lpp/mqm/lib/libmqm.a
      MQMCLIENTLIBS=/usr/lpp/mqm/lib/libmqic.a
      #MQMLIBS=/pvcs/compile/proc/libmqm.a
      CONVLIBS=/usr/lib/libiconv.a

      NETWORKHOME=$(ORACLE_HOME)/network/
      PLSQLHOME=$(ORACLE_HOME)/plsql/
      #INCLUDE=$(I_SYM). $(I_SYM)$(PRECOMPHOME)public $(I_SYM)$(RDBMSHOME)public $(I_SYM)$(RDBMSHOME)demo $(I_SYM)$(PLSQLHOME)public $(I_SYM)$(NETWORKHOME)public
      I_SYM=-I

      AS_EXT=s
      LIB_EXT=a
      OBJ_EXT=o
      PLB_EXT=plb
      SO_EXT=so
      LOCK_EXT=lk
      SQL_EXT=sql
      SYM_EXT=sym

      LIB_PREFIX=lib
      LDLIBFLAG=-l
      LDPATHFLAG=-L

      AS=as
      AWK=awk
      CAT=cat
      CC=/usr/vac/bin/cc
      CD=cd
      CHMOD=chmod
      CP=cp
      CPP=cpp
      DATE=date
      ECHO=echo
      ECHON=echo -n
      EXEC=exec
      FIND=find
      FOLLOW=-follow
      NOLEAF=-noleaf
      GREP=grep
      KILL=kill
      SLEEP=sleep
      LD=ld
      LMAKE=make
      LN=ln
      LNS=ln -s
      MKDIR=mkdir
      MKDIRP=mkdir -p
      MV=mv
      NM=nm
      PERL=perl
      RM=rm
      RMF=rm -f
      RMRF=rm -rf
      SED=sed
      SORT=sort
      TOUCH=touch
      XARGS=xargs
      LS=ls

      SPFLAGS=

      MATHLIB=-lm

      LOCALLIBS=

      OPTIMIZE=-O5

      OTHERLIBS = `cat $(ORACLE_HOME)/lib/sysliblist`


      CCFLAGS= -g

      SO=a

      LLIBTHREAD=-lpthreads

      EXOSLIBS=
      LIBBSD=
      SECLIBS=
      M6LIBS=

      LIBHOME=$(ORACLE_HOME)/lib

      VER =11
      BASENAME =n
      NETWORKHOME = $(ORACLE_HOME)/network/
      NETWORKLIB = $(NETWORKHOME)lib/

      RONAME=${BASENAME}ro${VER}

      PFLAGS=
      PFLAGS= $(INCLUDE) $(SPFLAGS) $(LPFLAGS)
      RDBMS_VERSION = 11
      LIBSERVERNAME=server$(RDBMS_VERSION)
      LIBSERVER=$(LIBHOME)$(LIB_PREFIX)$(LIBSERVERNAME).$(LIB_EXT)
      LLIBSERVER=$(LDLIBFLAG)$(LIBSERVERNAME)$(LIB_SUFFIX)

      LIBCLIENTNAME=client$(RDBMS_VERSION)
      LIBCLIENT=$(LIBHOME)$(LIB_PREFIX)$(LIBCLIENTNAME).$(LIB_EXT)
      LLIBCLIENT=$(LDLIBFLAG)$(LIBCLIENTNAME)

      LIBGENERICNAME=generic$(RDBMS_VERSION)
      LIBGENERIC=$(LIBHOME)$(LIB_PREFIX)$(LIBGENERICNAME).$(LIB_EXT)
      LLIBGENERIC=$(LDLIBFLAG)$(LIBGENERICNAME)

      LIBDSBTSHNAME=dsbtsh$(RDBMS_VERSION)
      LIBDSBTSH=$(RDBMSLIB)$(LIB_PREFIX)$(LIBDSBTSHNAME).$(SO_EXT)

      LIBSKGXPNAME=skgxp$(RDBMS_VERSION)
      LIBSKGXP=$(LIBHOME)$(LIB_PREFIX)$(LIBSKGXPNAME).$(SKGXP_EXT)
      LLIBSKGXP=$(LDLIBFLAG)$(LIBSKGXPNAME)

      LIBCOMMONNAME=common$(RDBMS_VERSION)
      LIBCOMMON=$(LIBHOME)$(LIB_PREFIX)$(LIBCOMMONNAME).$(LIB_EXT)
      LLIBCOMMON=$(LDLIBFLAG)$(LIBCOMMONNAME)


      LIBVSNNAME=vsn$(RDBMS_VERSION)
      LIBVSN=$(LIBHOME)$(LIB_PREFIX)$(LIBVSNNAME).$(LIB_EXT)
      LLIBVSN=$(LDLIBFLAG)$(LIBVSNNAME)

      LIBAGENTNAME=agent$(RDBMS_VERSION)
      LIBAGENT=$(LIBHOME)$(LIB_PREFIX)$(LIBAGENTNAME).$(LIB_EXT)
      LLIBAGENT=$(LDLIBFLAG)$(LIBAGENTNAME)


      LIBDBTOOLSNAME=dbtools$(RDBMS_VERSION)
      LIBDBTOOLS=$(RDBMSLIB)$(LIB_PREFIX)$(LIBDBTOOLSNAME).$(LIB_EXT)

      #DEF_ON= $(RDBMSLIB)kpudfo.$(OBJ_EXT)
      #DEF_OFF= $(RDBMSLIB)kpundf.$(OBJ_EXT)
      #DEF_OPT= $(RDBMSLIB)defopt.$(OBJ_EXT)

      LIBSLAXNAME=slax8
      LIBSLAX=$(LIBHOME)$(LIB_PREFIX)$(LIBSLAXNAME).$(LIB_EXT)
      LLIBSLAX=$(LDLIBFLAG)$(LIBSLAXNAME)
      LIBSQLNAME=sql11
      LIBSQL=$(LIBHOME)/$(LIB_PREFIX)$(LIBSQLNAME).$(LIB_EXT)
      LLIBSQL=$(LDLIBFLAG)$(LIBSQLNAME)

      #SCOREPT = $(LIBHOME)/scorept.$(OBJ_EXT)
      #SSCOREED = $(LIBHOME)/sscoreed.$(OBJ_EXT)

      LIBORA=$(LIBCLIENT) $(LIBCOMMON) $(LIBGENERIC)
      LLIBORA=$(LLIBCLIENT) $(LLIBCOMMON) $(LLIBGENERIC)


      LIBSQLNET = $(LDFLAGSLIST) $(ANOLIBD) $(PROTOCOLLIBD) $(NATIVELIBD) $(NATIVESYSLIBD) $(LIBNETWORK) $(LIBNL)
      LLIBSQLNET = $(LDFLAGSLIST) $(ANOLIBS) $(PROTOCOLLIBS) $(NATIVELIBS) $(NATIVESYSLIBS) $(LLIBNETWORK) $(LLIBNL)

      LIBRPC = $(LIBHOME)$(LIB_PREFIX)$(RONAME).$(LIB_EXT)
      LLIBRPC = $(LDLIBFLAG)$(RONAME)

      NETLIBS = $(LLIBSQLNET) $(LLIBRPC) $(LLIBSQLNET)
      NETLIBD = $(LIBSQLNET) $(LIBRPC)

      LDFLAGSFILE=$(NETWORKLIB)ldflags
      LDFLAGSLIST=`$(CAT) $(LDFLAGSFILE)`
      LDFLAGSLIST=

      LIBNLSRTLNAME = nls11
      LIBNLSRTL= $(LIBHOME)$(LIB_PREFIX)$(LIBNLSRTLNAME).$(LIB_EXT)
      LLIBNLSRTL= $(LDLIBFLAG)$(LIBNLSRTLNAME)$(LIB_SUFFIX)

      CORE_LIB_VER = 11
      CORE_LIB_NAME = core
      LIBCORE = $(LIBHOME)$(LIB_PREFIX)$(CORE_LIB_NAME)$(CORE_LIB_VER).$(LIB_EXT)
      LLIBCORE = $(LDLIBFLAG)$(CORE_LIB_NAME)$(CORE_LIB_VER)

      RDBMSHOME=$(ORACLE_HOME)/rdbms/
      RDBMSLIB=$(RDBMSHOME)lib/
      RDBMSADMIN=$(RDBMSHOME)admin/

      LIBCLNTSHNAME=clntsh
      LIBCLNTSH=$(LIBHOME)$(LIB_PREFIX)$(LIBCLNTSHNAME).$(SO_EXT)
      LLIBCLNTSH=$(LDLIBFLAG)$(LIBCLNTSHNAME)

      LIBAGTSHNAME=agtsh
      LIBAGTSH=$(LIBHOME)$(LIB_PREFIX)$(LIBAGTSHNAME).$(SO_EXT)
      LLIBAGTSH=$(LDLIBFLAG)$(LIBAGTSHNAME)
      LIBKNLOPTNAME=knlopt
      LIBKNLOPT=$(RDBMSLIB)$(LIB_PREFIX)$(LIBKNLOPTNAME).$(LIB_EXT)
      LLIBKNLOPT=$(LDLIBFLAG)$(LIBKNLOPTNAME)



      #LIBTRACENAME=trace9
      #LIBTRACE=$(LIBHOME)$(LIB_PREFIX)$(LIBTRACENAME).$(LIB_EXT)
      #LLIBTRACE=$(LDLIBFLAG)$(LIBTRACENAME)$(LIB_SUFFIX)
      #LIBEPC=$(LIBHOME)$(LIB_PREFIX)$(LIBTRACENAME).$(LIB_EXT)
      #LLIBEPC=$(LDLIBFLAG)$(LIBTRACENAME)$(LIB_SUFFIX)

      CORELIBS = $(LLIBNLSRTL) $(LLIBCV6) $(LLIBCORE) $(LLIBNLSRTL) $(LLIBCORE) \
      $(LLIBNLSRTL)

      OTHERLIBS=`cat $(ORACLE_HOME)/lib/sysliblist`

      DEVTTLIBS=$(NETLIBS) $(LLIBORA) $(NETLIBS) $(LLIBORA) $(LIBPLSHACK) \
      $(LLIBEPC) $(CORELIBS) $(SPLIBS) $(LOCALLIBS) $(EXOSLIBS) $(LIBBSD) `cat $(ORACLE_HOME)/lib/sysliblist` $(MATHLIB)

      CC=/usr/vac/bin/cc
      PCC=proc
      PROC=proc CODE=ANSI_C define=_64BIT_ define=_IBM_C define=_LONG_LONG sqlcheck=full userid=$(USERID) oraca=yes mode=oracle unsafe_null=yes dbms=v8
      PCCINCLUDE=include=$(ORACLE_HOME)/precomp/lib




      PCCFLAGS=$(PCCINCLUDE) sqlcheck=full ltype=none parse=full userid=$(USERID) lines=yes unsafe_null=yes dbms=v8
      CFLAGS= $(GFLAG) -qmaxmem=8192 $(OPTIMIZE) $(CDEBUG) $(CCFLAGS) $(QACCFLAGS) $(PFLAGS) $(SHARED_CFLAG) $(ENV_FLAGS) -L$(LIBHOME)
      ECHO=


      STATICPROLDLIBS=$(LLIBCLIENT) $(LIBSQL) $(SCOREPT) $(SSCOREED) $(DEF_ON) $(DEVTTLIBS) $(LLIBTHREAD)
      PROLDLIBS=$(LLIBCLNTSH) $(STATICPROLDLIBS)


      Tail of make.log :

      [applications/tf3/bin/COMP_PROC ]>echo $ORACLE_HOME
      /data/oracle/product/11.2.0.2
      [applications/tf3/bin/COMP_PROC ]>cd $ORACLE_HOME
      [data/oracle/product/11.2.0.2 ]>cd install
      [data/oracle/product/11.2.0.2/install ]>tail -15 make.log
      mv: cannot rename /data/oracle/product/11.2.0.2/bin/nmo to /data/oracle/product/11.2.0.2/bin/nmo0:
      No such file or directory
      mv /data/oracle/product/11.2.0.2/sysman/lib/nmo /data/oracle/product/11.2.0.2/bin/
      make: The error code from the last command is 1.
      make: Ignored error code 1 from last command.
      /bin/make -f /data/oracle/product/11.2.0.2/sysman/lib/ins_emagent.mk relink_exe EXENAME=nmhs
      ld -b64 -o /data/oracle/product/11.2.0.2/sysman/lib/nmhs -L/data/oracle/product/11.2.0.2/lib/ -L/data/oracle/product/11.2.0.2/sysman/lib/ -lld -lm `cat /data/oracle/product/11.2.0.2/lib/sysliblist` -lm /data/oracle/product/11.2.0.2/sysman/lib/s0nmhs.o -lnmhs -lcore11 -lld -lm `cat /data/oracle/product/11.2.0.2/lib/sysliblist` -lm
      rm -f /data/oracle/product/11.2.0.2/bin/nmhs.0
      cp /data/oracle/product/11.2.0.2/sysman/lib/nmhs /data/oracle/product/11.2.0.2/bin/nmhs.0
      mv -f /data/oracle/product/11.2.0.2/bin/nmhs /data/oracle/product/11.2.0.2/bin/nmhs0
      mv: cannot rename /data/oracle/product/11.2.0.2/bin/nmhs to /data/oracle/product/11.2.0.2/bin/nmhs0:
      No such file or directory
      make: The error code from the last command is 1.
      make: Ignored error code 1 from last command.
      mv /data/oracle/product/11.2.0.2/sysman/lib/nmhs /data/oracle/product/11.2.0.2/bin/

      Edited by: Minu on Dec 3, 2011 12:36 AM