Home » Developer & Programmer » Precompilers, OCI & OCCI » Pthread internal error while execution
Pthread internal error while execution [message #93556] Sat, 15 June 2002 04:44 Go to next message
Kandasamy
Messages: 2
Registered: June 2002
Junior Member
we have proc program which connects to non database application using some externel file and takes data from there to my oracle database. For long time we are not did any code change in that and we running the exe with error for long time without any error. Now we want to add some code to proc program. when we compile program using makefile. In the makefile we have include the external library also. It is not giving me any errors but when execute i get some errors.

I'm new to unix and proc but have very good knowledge in oracle. We are using unix 11.00 and oracle 8.1.7

If i directly include env_precomp.mk from $ORACLE_HOME/precomp/lib in my makefile i get the following
`/u01/dba/oracle/product/8.1.7/lib/libclntsh.sl' is up to date.
so I copied the env_precomp.mk from $ORACLE_HOME/precomp/lib to my local directory and removed the following lines from env_precomp.mk to avoid above message.

#lines removed start
# Entering /project/hpux/817/src_final/buildtools/mkfile/defs.mk

SHELL=/bin/sh

AS_EXT=s
LIB_EXT=a
CC_EXT=cpp
OBJ_EXT=o
PLB_EXT=plb
SO_EXT=so
LOCK_EXT=lk
SQL_EXT=sql
SYM_EXT=sym
JAVA_EXT=java
CLASS_EXT=class
JAR_EXT=jar
ZIP_EXT=zip

LIB_PREFIX=lib
:$
${ORACLE_HOME}/rdbms/lib/xaondy.o
$(SILENT)$(ECHO) "Building client shared library libclntsh.so ..."
$(SILENT)$(ECHO) "Call script $$ORACLE_HOME/bin/genclntsh ..."
$(GENCLNTSH)
if [[ -d ${ORACLE_HOME}/lib64 ]] ; then
$(GENCLNTSH64) ;
fi
$(SILENT)$(ECHO) "Built $$ORACLE_HOME/lib/libclntsh.so ... DONE"

# Exiting /project/hpux/817/src_final/buildtools/mkfile/libclntsh.mk
#lines removed end

This My makefile

#start of makefile
.SILENT:
.SUFFIXES: .pc .c .o .h .a

#include $(ORACLE_HOME)/precomp/lib/env_precomp.mk

include /home/if/test/source/env_precomp.mk

PROGRAM= qwtest

SOURCE= .

LIBRARY= qwtest.a

# pi directory
PIHOME= /opt/pi

# pro*c stuff
SQLCHECK= sqlcheck=semantics

# pro*c flags
PROCFLAGS= ireclen=264 oreclen=264 select_error=no $(SQLCHECK) $(PROUSER)

# c compiler flags
CFLAGS= -Aa -g +DAportable -D_POSIX_SOURCE

# linker flags used with c compiler
lFLAGS= $(LDFLAGS)
-L$(PIHOME)/lib -lpiapi -lm -lC
$(PROLDLIBS)
/opt/langtools/lib/end.o

LDOPTS= +vnocompatwarnings

CPPLFLAGS= -Wl,+s

# c compiler include directories
IFLAGS= $(PFLAGS) -I../lib -I$(PIHOME)/lib -I$(PRECOMPLIB)

# commands
CC= /usr/bin/cc
#CPP= /usr/bin/CC
LINT= /usr/bin/lint
MAKE= /bin/make
SHELL= /bin/ksh
ECHO= /bin/echo
CP= /bin/cp
RM= /bin/rm -f
CHMOD= /bin/chmod
CHOWN= /bin/chown
AR= /bin/ar
ARFLAGS= -urvf

# other libraries
EXT_LIBS= c/qwrlc.a
../lib/misc.a

#
# application files follow (include files, object files, pro*c files)
#

# h(eader) files
HFILES= ../lib/misc.h
qwdefine.h

# object files
OFILES= $(LIBRARY)($(SOURCE)/qwtest.o)
$(LIBRARY)($(SOURCE)/qwconnect.o)
$(LIBRARY)($(SOURCE)/qwsqlerr.o)
$(LIBRARY)($(SOURCE)/gettest.o)

# pro*c source files
PCFILES= $(SOURCE)/qwtest.pc
$(SOURCE)/qwconnect.pc
$(SOURCE)/qwsqlerr.pc
$(SOURCE)/gettest.pc

#
# file relationships
#

$(PROGRAM): $(LIBRARY) $(EXT_LIBS)
$(ECHO) "Making Program - $(PROGRAM)"
$(ECHO) $(CPPLFLAGS) $(IFLAGS) $(LIBRARY) $(EXT_LIBS) $(lFLAGS) -o $(PROGRAM)
$(CC) $(CPPLFLAGS) $(IFLAGS) $(LIBRARY)
$(EXT_LIBS) $(lFLAGS) -o $(PROGRAM)

$(LIBRARY): $(OFILES)

$(OFILES): $(PCFILES) $(HFILES)

#
# rules for making destination files
#

.pc.c:
$(ECHO) "Making C file - $<"
$(PROC) $(PROCFLAGS) iname=$*.pc

.pc.a:
$(ECHO) "Making C files, Object files, and Archive - $<"
$(PROC) $(PROCFLAGS) iname=$*.pc
$(CC) -c $(CFLAGS) $(IFLAGS) $*.c
$(AR) $(ARFLAGS) $@ $*.o
$(RM) $*.o

.pc.o:
$(ECHO) "Making C files and Object files - $<"
$(PROC) $(PROCFLAGS) iname=$*.pc
$(CC) -c $(CFLAGS) $(IFLAGS) $*.c

.c.o:
$(ECHO) "Making Object files - $<"
$(CC) -c $(CFLAGS) $(IFLAGS) $*.c

.c.a:
$(ECHO) "Making Object files and Archive - $<"
$(CC) -c $(CFLAGS) $(IFLAGS) $<
$(AR) $(ARFLAGS) $@ $*.o
# $(RM) $*.o

# test routine

test:
$(ECHO) 'this is a test'
$(ECHO) $(PROC)
$(ECHO) "$(PCFILES)"
$(ECHO) "$(OFILES)"
$(ECHO) "$(HFILES)"
$(ECHO) "$(PROC) $(PROCFLAGS) iname=$*.pc"
# $(ECHO) "$(CC) -g -g $(CFLAGS) $(PRECOMPPUBLIC) -c $*.c"
$(ECHO) "$(PROLDLIBS)"
# $(ECHO) "$(IFLAGS)"
# $(ECHO) "$(PROGRAM): $(LIBRARY) $(EXT_LIBS)"

#end of makefile

When compile the program by typing make in the command prompt it get this.

/home/if/test/source $ make
Making Object files and Archive - qwtest.c
r - qwtest.o
Making Program - qwtest
-Wl,+s -I/u01/dba/oracle/product/8.1.7/precomp/hdrs -I/u01/dba/oracle/product/8.
1.7/precomp/public -I/u01/dba/oracle/product/8.1.7/precomp/include -I/u01/dba/or
acle/product/8.1.7/oracore/include -I/u01/dba/oracle/product/8.1.7/oracore/publi
c -I/u01/dba/oracle/product/8.1.7/oracore/port/include -I/u01/dba/oracle/product
/8.1.7/nlsrtl/include -I/u01/dba/oracle/product/8.1.7/slax/include -I. -I../lib
-I/opt/pi/lib -I/u01/dba/oracle/product/8.1.7/precomp/lib/ qwtest.a c/qwrlc.a ..
/lib/misc.a -Wl,+s -Wl,+n -o qwtest -L/u01/dba/oracle/product/8.1.7/precomp/lib/
-L/u01/dba/oracle/product/8.1.7/lib/ -L/opt/pi/lib -lpiapi -lm -lC -lclntsh -l:
libcl.a -l:librt.sl -lpthread -l:libnss_dns.1 -l:libdld.sl -lm -lpthread -lpthre
ad /opt/langtools/lib/end.o -o qwtest
lvhpkmod
/home/if/test/source $

After compilation if run i get the following error

/home/if/test/source $ qwtest

Pthread internal error: message: __libc_reinit() failed, file: /ux/core/kern/pth
reads/pthread.c, line: 1093
Return Pointer is 0xc13bf0c3
Quit(coredump)

Please help me to solve this?
Re: Pthread internal error while execution [message #93600 is a reply to message #93556] Fri, 26 July 2002 08:36 Go to previous messageGo to next message
Steve Wilcock
Messages: 1
Registered: July 2002
Junior Member
I am getting the message

make: `/oracle01/product/8.1.7/lib/libclntsh.so' is up to date.

whenever I try and make my proc application. Did you ever solve this probelm Kandasamy? Any help appreciated - I have wrestling with this all afternoon!

:-(

Regards,
Steve
Re: Pthread internal error while execution [message #93607 is a reply to message #93600] Thu, 01 August 2002 06:00 Go to previous message
Dave Dudley
Messages: 1
Registered: August 2002
Junior Member
You get the message saying that the Oracle client library is up to date because you have the oracle mk include file at the top of your Makefile (I'd guess).

Make will assume the default to be the first target file that it finds - which is the client lib in the oracle mk file.

So either tell make what you want to make explicitly - e.g. "make abc", "make all", etc. Or define your default target near the top of the Makefile (before the Oracle file is included) - e.g. I have the line "rebuild: clean all" near the top. So if I type "make" on its own I get a full clean build (having obviously defined the actions for the "clean" and "all" targets at a later stage).
Previous Topic: Why am I getting an OCI_INVALID_HANDLE from OCISessionBegin?
Next Topic: error thrown but no value in SQLERRMC (huh!)
Goto Forum:
  


Current Time: Thu Apr 25 02:35:17 CDT 2024