Author |
Message
|
danny123 |
Posted: Fri Jul 07, 2006 1:45 am Post subject: Help BlockIP2 compiling on solaris 9!! |
|
|
Newbie
Joined: 07 Jul 2006 Posts: 1
|
Hi Folks,
I am trying to compile to BlockIp2 on solaris 9 on sun firewire v440 machine using gcc. I running the following command
Code: |
/usr/local/bin/gcc -G -I/opt/include -I/opt/mqm/inc -L/opt/mqm/lib -o BlockIP2 BlockIP2.c -lmqm_r -D_REENTRANT -DUNIX -DHNLUP -DSOLARIS
ld: fatal: library -lmqm_r: not found
ld: fatal: File processing errors. No output written to BlockIP2
collect2: ld returned 1 exit status
|
I cant seem to see where the lmqm_r library is.
Any help would be really appreciated
Thanks
Danny |
|
Back to top |
|
 |
Philip Morten |
Posted: Fri Jul 07, 2006 6:57 am Post subject: |
|
|
Master
Joined: 07 Mar 2002 Posts: 230 Location: Hursley Park
|
We don't ship libxxx_r variants of the libraries on Solaris. See the section entitled "Building your application on Solaris" in the Application Programming Guide for the linking requirements for different types of application programs. _________________ Philip Morten
The postings on this site are my own and do not necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
silentflute |
Posted: Mon Aug 07, 2006 6:40 am Post subject: Help BlockIP2 compiling on solaris 9!! |
|
|
 Apprentice
Joined: 14 Jul 2004 Posts: 32
|
Philip,
Like Danny I ran into the same problems.
I did look in the WMQ Application Programming Guide and found the libraries that you're speaking of. They are libmqm.so, libmqmcs.so, and libmqmzse.so.
But when I look in the WMQ Version 5.3 Intercommunications Guide for compiling a channel exit, it lists:
$ cc -c -KPIC exit.c
$ ld -G exit.o -o exit
$ cp exit /usr/xmp/lib # (or wherever you require)
no where do I see links for the above .so libraries. Is the WMQ Version 5.3 Intercommunications Guide in error?
further research, in the WMQ Version 6.0 Intercommunications Guide, I find:
cc -xarch=v9 -mt -G -o /var/mqm/exits64/exit exit.c -I/opt/mqm/inc -L/opt/mqm/lib64 -R/opt/mqm/lib64 -R/usr/lib/64 -lmqm -lmqmcs -lmqmzse -lsocket -lnsl -ldl
where the .so are a part of the link command.
Since I only have access to the gnu complier, and also used tried to use the compile command:
/usr/local/bin/gcc -G -I/opt/include -I/opt/mqm/inc -L/opt/mqm/lib -o BlockIP2 BlockIP2.c -lmqm_r -D_REENTRANT -DUNIX -DHNLUP -DSOLARIS
and it did not work. Since this command is linking with the mqm_r library that is not included in the Solaris distribution, is this command in error? Should it be removed from the documentation?
Would someone please share the proper gcc compile and link command for both the 5.3 version and the 6.0 version for the Solaris platform?
Thanks all! |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Aug 07, 2006 6:42 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
GCC isn't supported on Sun.
You might get it to work, though. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
HubertKleinmanns |
Posted: Tue Oct 10, 2006 7:21 am Post subject: |
|
|
 Shaman
Joined: 24 Feb 2004 Posts: 732 Location: Germany
|
Hi all,
I compiled BlockIP2 successfully on an Solaris 8 Sparc-server with the following commands:
MQv5.3:
Code: |
gcc -I/opt/mqm/inc -o BlockIP2 BlockIP2.c -G -lmqm -lthread -lsocket -lc -lnsl -ldl |
MQv6 (64 bit):
Code: |
gcc -I/opt/mqm/inc -m64 -o BlockIP2 BlockIP2.c -G -m64 -L /opt/mqm/lib64 -L /usr/lib/64 -lmqm -lthread -lsocket -lc -lnsl -ldl |
_________________ Regards
Hubert |
|
Back to top |
|
 |
nagak |
Posted: Tue Oct 24, 2006 10:32 pm Post subject: |
|
|
Novice
Joined: 14 Dec 2004 Posts: 11
|
For Solaris:
cc -c -KPIC BlockIP2.c
ld -G BlockIP2.o -o Block
cp BlockIP2 /var/mqm/exits
Thanks, |
|
Back to top |
|
 |
bbburson |
Posted: Wed Oct 25, 2006 5:13 am Post subject: |
|
|
Partisan
Joined: 06 Jan 2004 Posts: 378 Location: Nowhere near a queue manager
|
Shouldn't that be:
nagak wrote: |
For Solaris:
cc -c -KPIC BlockIP2.c
ld -G BlockIP2.o -o BlockIP2
cp BlockIP2 /var/mqm/exits
Thanks, |
? |
|
Back to top |
|
 |
|