Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

64-bit C-function using the MQ library

Status
Not open for further replies.

icecubegr

Programmer
Jul 27, 2006
26
Hi. I am back for a new problem I have :)))

We have a C program that gets all messages from the MQ queue and write them into a text file. Then another program was processing those messages one by one. The problem was that if for example there were 30 messages in the queue and the processing time for each message is about one second, the reply of the last message will be about 30 seconds!!!

In order to solve the above problem I modified this C program to a C function. After compiling the C function I created a test program but I got some errors like "rtld: 0712-001 Symbol MQCONN was referenced from module /gl/r07dev/bnk/bnk.run/lib/libInfMq.so(), but a runtime definition of the symbol was not found."

I used the dump utility and I saw that:
========================================================
dump -Tv -X32 lib/libInfMq.so

lib/libInfMq.so:
dump: lib/libInfMq.so: 0654-108 file is not valid in the current object file mod
e.
Use the -X option to specify the desired object mode.
========================================================
jsh r07dev ~ -->dump -Tv -X64 lib/libInfMq.so

lib/libInfMq.so:

***Loader Section***

***Loader Symbol Table Information***
[Index] Value Scn IMEX Sclass Type IMPid Name

[0] 0x20000640 .data RW SECdef [noIMid] __rtinit
[1] 0x0000f400 undef IMP XO EXTref libc.a(shr_64.o) ___memmove64
[2] 0x20000658 .data EXP DS SECdef [noIMid] InfMqGet
[3] 0x00000000 undef IMP DS EXTref .. MQCONN
[4] 0x00000000 undef IMP DS EXTref .. MQOPEN
[5] 0x00000000 undef IMP DS EXTref .. MQGET
[6] 0x00000000 undef IMP DS EXTref .. MQCLOSE
[7] 0x00000000 undef IMP DS EXTref .. MQDISC
========================================================
dump -Tv -X64 /usr/mqm/lib/libmqm.a
========================================================
dump -Tv -X32 /usr/mqm/lib/libmqm.a

/usr/mqm/lib/libmqm.a[libmqm.o]:

***Loader Section***

***Loader Symbol Table Information***
[Index] Value Scn IMEX Sclass Type IMPid Name

[0] 0x00000000 undef IMP RW EXTref libmqz.a(libmqz.o) CSCtrl
[1] 0x00000000 undef IMP DS EXTref libmqz.a(libmqz.o) xehRestore
SigActionsF
[2] 0x00000000 undef IMP DS EXTref libmqz.a(libmqz.o) xehSaveSig
ActionsF
[3] 0x00000000 undef IMP DS EXTref libmqz.a(libmqz.o) xcsFFST
.
.
.
========================================================
I do not put whole dump output for X32 for libmqm.a because it is too big, but as I can see the problem is that mqm is compiled in 32-bit, and my library in 64-bit. Am I correct?

What can I do in such case? I cannot compile my C function in 32-bit. Does anybody knows if there are 64-bit libraries for MQ?

Any other suggestions?

Regards,
George
 
Well, can't you link the MQ library into your program instead of using a runtime library?


HTH,

p5wizard
 
Even when when I compiled the 'libInfMq.so' with option -lmqm, I got the same error.

I did some research on internet and I saw that some people had similar problems and they solution is to use the 64bit libraries (in directory /usr/mqm/lib64). We do not have this directory here. Maybe we need to get a new version of mqseries (currently 5.3).

George
 
Or compile/linkedit it on a 32 bit installation?


HTH,

p5wizard
 
We do not have this option.

There are some core programs/functions for user interface, business functionality etc. What we do is to create C functions to enhance the core business functionality. Those functions will be automatically called by core programs so they need to be compiled in 64bit as the core.

George
 
I checked an installation here: the 64 bit library is in MQ version 6:

[tt]# lslpp -L |grep mqm.server
mqm.server.rte 6.0.2.1 C F WebSphere MQ Server
# lslpp -f mqm.server.rte|grep lib64/libmqm.a
/usr/mqm/lib64/libmqmxa_r.a
/usr/mqm/lib64/libmqm.a
/usr/mqm/lib64/libmqmxa.a
/usr/mqm/lib64/libmqmxa64_r.a
/usr/mqm/lib64/libmqmxa64.a[/tt]

So it looks like you'll need to upgrade...



HTH,

p5wizard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top