error message: rtld: 0712-001 Symbol STORE_BBS was referenced. help me!!!

294 views
Skip to first unread message

Jim.cnt

unread,
Jun 20, 2012, 10:40:09 PM6/20/12
to jBASE
hi,
For requirement,I write a jbase subroutine and two C program. They
are named VCHKXVERIFYPAYPWD.b, CTest.c and Simple.c . Their Logics are
that VCHKXVERIFYPAYPWD.b call CTest.c and CTest.c call Simple.c .
I use ksh script complie and link those .b and .c program. Ksh script
runs successfully.
After running ksh script, I use a jbase program 'TESTCHK' call
subroutine VCHKXVERIFYPAYPWD and error messge is thrown as the
following:

jBASE: /app/t24core/bnk/bnk.run/xllib/libdraft.so: rtld: 0712-001
Symbol STORE_BBS was referenced
from module /app/t24core/bnk/bnk.run/xllib/libcipher.a(), but a
runtime definition
of the symbol was not found.
rtld: 0712-002 fatal error: exiting.
** Error [ SUBROUTINE_CALL_FAIL ] **
Unable to perform CALL to subroutine VCHKXVERIFYPAYPWD , Line 3 ,
Source TESTCHK
Press C to continue or Q to quit
Trap from an error message, error message name = SUBROUTINE_CALL_FAIL
Source changed to .//TESTCHK

I'm troubled in this problem for three days. I try to solve this
problem,but it still is a puzzle. I think that maybe my ksh script is
incorrect or enviroment config configuration need be change. I expect
to obtain your help.
My operator system is AIX 6.1.

*************************************************************************************************
ksh script Build6.ksh

cc -q64 -c Simple.c
jcompile -c CTest.c
xlc -G -q64 -qmkshrobj -o $JBCDEV_LIB/libshr1.so simple.o ctest.o
export LIBPATH=$PWD:$LIBPATH
export LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH
export SHLIB_PATH=$PWD:$SHLIB_PATH
jcompile -Qs $JBCDEV_LIB/libdraft.sl -L. -lshr1 VCHKXVERIFYPAYPWD.b

=========================================================
VCHKXVERIFYPAYPWD.b

SUBROUTINE VCHKXVERIFYPAYPWD

DEFC INT ABC(VAR,VAR)

RETURN.CODE = -1
R.ERROR.MSG = ''

P1 = "hi test test"

RETURN.CODE = ABC(P1, R.ERROR.MSG)
CRT "RTN.MSG=" :R.ERROR.MSG
CRT "RETURN.CODE=" : RETURN.CODE
RETURN
END

==========================================================

CTest.c

#include <jsystem.h>
#include <assert.h>
#include "stdhead.h"
#include "simple.h"
#define HOME "HOME"

#ifdef DPSTRUCT_DEF
#define JBASEDP DPSTRUCT *dp,
#else
#define JBASEDP
#endif

INT32 ABC(JBASEDP VAR *param1, VAR *Result)
{
INT32 ret;
char *ptrParam1, *ptrResult;
char aResult[11];
ptrParam1 = (char *)CONV_SFB(param1);
ptrResult = (char *)CONV_SFB(Result);
ret = VerifyPayCodeAAA(ptrParam1, ptrResult);
STORE_BBS(Result, ptrResult);
return ret;

}

========================================================
source Simple.c


#include "simple.h"
int VerifyPayCodeAAA(unsigned char* pClientPkg,unsigned char*
strErrmsg) {
char *prtErrmsg;
memcpy(strErrmsg, "hello, this is test", 30);
STORE_BBS(strErrmsg, prtErrmsg);
return 0;
}

=========================================================
source simple.h

int VerifyPayCodeAAA(unsigned char* pClientPkg,unsigned char*
strErrmsg);


==========================================================
source stdhead.h

#ifndef _STDHEAD_H_MYCM_DDM_19991014_
#define _STDHEAD_H_MYCM_DDM_19991014_

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <memory.h>
#include <time.h>
//#include <bool.h>
#include <errno.h>
#include <time.h>
#include <signal.h>
#include <unistd.h>
#include <termio.h>
#include <fcntl.h>

#include <sys/ipc.h>
#include <sys/msg.h>
#include <sys/sem.h>
#include <sys/types.h>
#include <sys/socket.h>

#include <netinet/in.h>
#include <arpa/inet.h>

#ifndef BYTE
typedef unsigned char BYTE;
#endif

#ifndef BOOL
typedef unsigned char BOOL;
#endif

typedef int SOCKET;
typedef unsigned int UINT;
typedef unsigned char UCHAR;
typedef unsigned short WORD;
#endif

Jim.cnt

unread,
Jun 21, 2012, 1:19:12 AM6/21/12
to jBASE
Does anyone know reason of this error? please response me.
who has more the document about jcompile,please share me to my mail.

Thanks & Best Regards,
Jim.cnt
================================================
jbase program TESTCHK :

PROGRAM TESTCHK
CRT "***************************"
CALL VCHKXVERIFYPAYPWD
RETURN
END
> ***************************************************************************-**********************

Marco Manyevere

unread,
Jun 21, 2012, 4:09:43 AM6/21/12
to jb...@googlegroups.com
Hi,
 
Is because you don't #include <jsystem.h> in Simple.c. Having made that correction you may need to pay attention to what the program is actually trying to do because I think after that correction it probably won't compile or run correctly.
 
I always try and keep the C code from mixing with jBASE undocumented functions and its usually easy to do except in very complicated situations. In most cases you can get away by using the simpler DEFCE interface.
 
Regards,


--
--
IMPORTANT: T24/Globus posts are no longer accepted on this forum.

To post, send email to jB...@googlegroups.com
To unsubscribe, send email to jBASE-un...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en




Jim.cnt

unread,
Jun 21, 2012, 6:22:00 AM6/21/12
to jBASE
Hi,
Sorry! The code line 'STORE_BBS(strErrmsg, prtErrmsg); ' in simple.c
is redundant', so simple.c needn't include 'jsystem.h' header. I
delete this line, as follows

source Simple.c

#include "simple.h"
int VerifyPayCodeAAA(unsigned char* pClientPkg,unsigned char*
strErrmsg) {
char *prtErrmsg;
memcpy(strErrmsg, "hello, this is test", 30);
return 0;
}


After run the ksh script to compile and link, I run TESTCHK, the same
error message is thrown.

I will use DEFCE to test.

Do you think my ksh script is correct fully?.

Thanks & Regards,
> > ***************************************************************************-**********************
> >http://groups.google.com/group/jBASE?hl=en- 隐藏被引用文字 -
>
> - 显示引用的文字 -

Marco Manyevere

unread,
Jun 21, 2012, 8:32:30 AM6/21/12
to jb...@googlegroups.com
Hi,
 
I find it easier to compile the *.c and *.b into one shared library as follows (works for me in jBASE 5):
 
jcompile TEST.BP/CTest.c TEST.BP/Simple.c TEST.BP/VCHKXVERIFYPAYPWD.b -d -s xllib/TESTLIBRARY.so
Directories TEST.BP and xllib are off the current directory (bnk.run if T24) otherwise change accordingly. xllib is in your JBCOBJECTLIST. After successful compilation, log out of AIX and log back in then fire your test.
 
Regards,

Jim.cnt

unread,
Jun 25, 2012, 5:32:13 AM6/25/12
to jBASE
hi,
I have a question to ask you. if compile *.c,*.b into different
library, Is it feasible?
If feasible,how to do?
> > ***************************************************************************--**********************
> > > >http://groups.google.com/group/jBASE?hl=en-隐藏被引用文字 -
>
> > > - 显示引用的文字 -
>
> > --
> > --
> > IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>
> > To post, send email to jB...@googlegroups.com
> > To unsubscribe, send email to jBASE-un...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/jBASE?hl=en- Hide quoted text -
>
> - Show quoted text -

Jim.cnt

unread,
Jun 25, 2012, 5:23:21 AM6/25/12
to jBASE
Hi,
I use your way, the comile comand line is following:
jcompile ZFMM/ctest.c ZFMM/simple.c ZFMM/XVCHKXVERIFYPAYPWD.b -d -s ../
xllib/lib1.so

when i perform this command line, new error message is thrown as
follows

ZFMM/ctest.c:
ZFMM/simple.c:
../xllib/lib1.so.el: No such file or directory
jcompile: ZFMM/XVCHKXVERIFYPAYPWD.j deleted
jcompile: ZFMM/XVCHKXVERIFYPAYPWD.c deleted
jcompile: Returned an error code of 5


.el file, what file is this file?
> > ***************************************************************************--**********************
> > > >http://groups.google.com/group/jBASE?hl=en-隐藏被引用文字 -
>
> > > - 显示引用的文字 -
>
> > --
> > --
> > IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>
> > To post, send email to jB...@googlegroups.com
> > To unsubscribe, send email to jBASE-un...@googlegroups.com
> > For more options, visit this group at

Jim.cnt

unread,
Jun 25, 2012, 6:01:18 AM6/25/12
to jBASE
Hi,
I try to comiple ctest.c and simple.c into libCFUNCTIONS.so,I perform
the comand line succcessfully as follows,
jcompile ctest.c simple.c -d -s libCFUNCTIONS.so
And then I compile CHKXVERIFYPAYPWD.b and link libCFUNCTIONS as
follows,
jcompile XVCHKXVERIFYPAYPWD.b -L. -l CFUNCTION
when i perform this command line, error is thrown as follows,

ld: 0711-317 ERROR: Undefined symbol: jBASEMainFunctionPointer
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
xlc_r -qrtti=all -qro -qroconst -q64 -
qinfo=cmp:cns:cnv:eff:enu:ini:lan:ret -
qsuppress=1500-010:1500-029:1506-435:1540-1408:1540-5301:1540-1407:1540-5338:1540-5344:1506-446
-qcpluscmt -qthreaded -brtl -bnolibpath XVCHKXVERIFYPAYPWD.o /app/
t24core/bnk/TAFC/bin/jmainfunction.o -L/app/t24core/bnk/TAFC/lib -
lTAFCfrmwrk -lTAFCjbase -lTAFCutil -lTAFCjee -lm -lcurses -lrts -L. -
lCFUNCTIONS -oXVCHKXVERIFYPAYPWD failed , command returned a code of
8
jcompile: XVCHKXVERIFYPAYPWD.j deleted
jcompile: XVCHKXVERIFYPAYPWD.c deleted
jcompile: Returned an error code of 8

it shows Undefined symbol: jBASEMainFunctionPointer. why?
Do you meet this problem?

Regards,
Jim.cnt
> > ***************************************************************************--**********************
> > > >http://groups.google.com/group/jBASE?hl=en-隐藏被引用文字 -
>
> > > - 显示引用的文字 -
>
> > --
> > --
> > IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>
> > To post, send email to jB...@googlegroups.com
> > To unsubscribe, send email to jBASE-un...@googlegroups.com
> > For more options, visit this group at

Marco Manyevere

unread,
Jun 25, 2012, 7:52:12 AM6/25/12
to jb...@googlegroups.com
Hi,
 
Looks like an issue with directory structure. What is the path to xllib in relation to where you are running jcompile from? If xllib is a subdirectory of the current directory from which you run jcompile, then you should not have ../ in front of xllib.
 
Alternatively, do these steps:
1. cd ZFMM
2. jcompile ctest.c simple.c XVCHKXVERIFYPAYPWD.b -d -s lib1.so
3. use the cp (copy) command to copy the lib1.* files to xllib. (there should be 2 files lib1.so, lib1.so.el)
4. log out and login
5. run the test
 
Regards,

Reply all
Reply to author
Forward
0 new messages