Author |
Message
|
reddy_kal |
Posted: Thu Sep 07, 2006 1:03 pm Post subject: Cannot run qload (MO03) on Linux and Cannot compile C Pgms |
|
|
Acolyte
Joined: 04 Nov 2002 Posts: 73
|
Hello,
I am facing two issues in our SUSE Linux ..
First:
I am not able to use qload program which is part of MQ Support Pac (MO03) on Suse Linux server (SLSE9).
When I try to compile it gives me
/opt/mqm/scripts>./qloadc
./qloadc: error while loading shared libraries: libmqic.so: cannot open shared object file: No such file or directory
Second:
I am not able to compile my C Programs which does MQPut and MQGet.
I am getting following error...
/MQTOOLS> gcc -o mqputfn mqputfn.c -l libmqic.so
mqputfn.c:209:17: warning: multi-character character constant
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: cannot find -llibmqic.so collect2: ld returned 1 exit status
/MQTOOLS> gcc -o mqputfn mqputfn.c -l libmqm.so
mqputfn.c:209:17: warning: multi-character character constant
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: cannot find -llibmqm.so collect2: ld returned 1 exit status
Can any of you please help me in resolving this issues.
-Reddy |
|
Back to top |
|
 |
reddy_kal |
Posted: Thu Sep 07, 2006 1:06 pm Post subject: |
|
|
Acolyte
Joined: 04 Nov 2002 Posts: 73
|
I did setup my environment variables (PATH, SHLIB, MQMLIB, CLASSPATH) to point to /opt/mqm/lib64 |
|
Back to top |
|
 |
wschutz |
Posted: Thu Sep 07, 2006 1:50 pm Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
|
Back to top |
|
 |
reddy_kal |
Posted: Fri Sep 08, 2006 5:31 am Post subject: |
|
|
Acolyte
Joined: 04 Nov 2002 Posts: 73
|
This is on X86. I didn't try those steps.
Let me try. |
|
Back to top |
|
 |
wschutz |
Posted: Fri Sep 08, 2006 6:00 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Ok, and for the library problem with qloadc, what does:
Quote: |
[wschutz@wschutz-t60p Linux]$ whereis libmqic.so
libmqic: /usr/lib/libmqic.so
[wschutz@wschutz-t60p Linux]$ ll /usr/lib/libmqic.so
lrwxrwxrwx 1 root root 23 Jul 27 10:06 /usr/lib/libmqic.so -> /opt/mqm/lib/libmqic.so
|
show? _________________ -wayne |
|
Back to top |
|
 |
reddy_kal |
Posted: Fri Sep 08, 2006 6:09 am Post subject: |
|
|
Acolyte
Joined: 04 Nov 2002 Posts: 73
|
Hello,
Sorry, I forgot to say Thank you for sending me that link.
I tried with 64 bit and 32 bit. But both didn't work Gave me same error.
For 32 bit:
/MQTOOLS> gcc -m32 -o mqiputfn mqputfn.c -I/opt/mqm/inc -L/opt/mqm/lib -Wl,-rpath=/opt/m
qm/lib -Wl,-rpath=/usr/lib -lmqic
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: cannot find -lmqic collect2: ld returned 1 exit status
For 64 bit:
/MQTOOLS> gcc -m64 -o mqiputfn mqputfn.c -I/opt/mqm/inc -L/opt/mqm/lib64 -Wl,-rpath=/opt/mqm/lib64 -Wl, -rpath=/usr/lib64 -lmqic
gcc: unrecognized option `-rpath=/usr/lib64'
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: : No such file: No such file or directory
collect2: ld returned 1 exit status
I am not sure if the problem is with the Linux Configuration or something I am doing wrong.
Can you please help me. |
|
Back to top |
|
 |
reddy_kal |
Posted: Fri Sep 08, 2006 11:23 am Post subject: |
|
|
Acolyte
Joined: 04 Nov 2002 Posts: 73
|
Hello,
It is working now. !!!!!!!!
Thank you for sending me the link.
It did help me.
I used
"gcc -m64 -o mqputfn mqputfn.c -I/opt/mqm/inc -L/opt/mqm/lib64 -Wl,-rpath=/opt/mqm/lib64 -lmqm"
just removed " -Wl, -rpath=/usr/lib64" and it compiled fine.
Thanks again. |
|
Back to top |
|
 |
reddy_kal |
Posted: Fri Sep 08, 2006 11:43 am Post subject: |
|
|
Acolyte
Joined: 04 Nov 2002 Posts: 73
|
Hello Wayne,
For qloadc, here is the output that I am getting
/opt/mqm/scripts>./qloadc
./qloadc: error while loading shared libraries: libmqic.so: cannot open shared object file: No such file or directory
/opt/mqm/scripts>whereis libmqic.so
libmqic:
/opt/mqm/scripts>ll /usr/lib/libmqic.so
/bin/ls: /usr/lib/libmqic.so: No such file or directory
I am not seeing that file in /usr/lib. Do we need the file in that directory. I see this file in in /opt/mqm/lib64.
Should I copy the file into /usr/lib?
-Reddy |
|
Back to top |
|
 |
|