ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Installation/Configuration Support » 64 & 32 bit applications

Post new topic  Reply to topic
 64 & 32 bit applications « View previous topic :: View next topic » 
Author Message
jonesn
PostPosted: Thu Dec 17, 2009 7:09 am    Post subject: 64 & 32 bit applications Reply with quote

Apprentice

Joined: 09 Jan 2002
Posts: 47

Chaps,

I am trying to understand how executables (such as dspmq or even an in house written one) pick up the correct version of libraries at run time on AIX when running MQ 6.0.2.x.

I am happy with building an executable against a shared library & then using LIBPATH or LD_LIBRARY_PATH to resolve the correct version of the shared library at run time.

What I do not understand is how the executable locates the correct library when the MQ manuals instruct you to unset LIBPATH & LD_LIBRARY_PATH.

Is there another way to configure an application to look for its shared libraries?

Thanks
_________________
---

Nick Jones
IBM Certified Solutions Expert (WebSphere MQ Integrator)
Back to top
View user's profile Send private message
gunter
PostPosted: Thu Dec 17, 2009 7:31 am    Post subject: Reply with quote

Partisan

Joined: 21 Jan 2004
Posts: 307
Location: Germany, Frankfurt

IBM puts the mq-libs in the standard lib path(at least on Solaris).
The most binaries are using the setuid and/or setgid bit. LD_LIBRARY_PATH has no effect if this is set. Maybe it is the same on AIX.
_________________
Gunter Jeschawitz
IBM Certified System Administrator - Websphere MQ, 5.3
Back to top
View user's profile Send private message
jonesn
PostPosted: Thu Dec 17, 2009 8:45 am    Post subject: Reply with quote

Apprentice

Joined: 09 Jan 2002
Posts: 47

Gunter,

I am not sure how setuid & setgid has anything to do with how a program finds the shared libraries it needs at run time. Could you explain please?

Thanks
_________________
---

Nick Jones
IBM Certified Solutions Expert (WebSphere MQ Integrator)
Back to top
View user's profile Send private message
gunter
PostPosted: Thu Dec 17, 2009 11:51 pm    Post subject: Reply with quote

Partisan

Joined: 21 Jan 2004
Posts: 307
Location: Germany, Frankfurt

It's for security reasons. If you are able to change the library path, you are also able to call functions on modified libraries with the accessrights(maybe root) of the owner or group. Therefore it is a good idea not to allow changing the path if the setuid-, setguid bit is set. Only an admin is able to put such a library in the search path.
_________________
Gunter Jeschawitz
IBM Certified System Administrator - Websphere MQ, 5.3
Back to top
View user's profile Send private message
mvic
PostPosted: Tue Dec 22, 2009 4:29 pm    Post subject: Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

gunter wrote:
The most binaries are using the setuid and/or setgid bit.

This is only true of MQ product executables. But not true of user-written applications, which must load a few of the same libraries.
Back to top
View user's profile Send private message
mvic
PostPosted: Tue Dec 22, 2009 4:35 pm    Post subject: Re: 64 & 32 bit applications Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

jonesn wrote:
I am trying to understand how executables (such as dspmq or even an in house written one) pick up the correct version of libraries at run time on AIX when running MQ 6.0.2.x.

There are symlinks in /usr/lib.

Ah, you said "correct". So I guess you mean how does a 64-bit app get 64-bit libs.. then read on.

Quote:
Is there another way to configure an application to look for its shared libraries?

Thanks

I hope you found the parts of the manual that help with this.

Please search for the word lib64 at http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp

Ensure you
- check out the way of embedding search paths in your application programs at link time
- scroll down to the hits near the end entitled "Implications of a 64-bit queue manager"

If it's not all clear after that, please do follow up with further questions..

HTH
Back to top
View user's profile Send private message
gunter
PostPosted: Wed Dec 23, 2009 12:59 am    Post subject: Reply with quote

Partisan

Joined: 21 Jan 2004
Posts: 307
Location: Germany, Frankfurt

Sorry, I misunderstood your question.

In /usr/lib are only 32bit mq-libs, therefore IBM recommends to use a build-in library path to /opt/mqm/lib64 for your application. This is a compiler option (Solaris -R, xlc -Z ???). If you need to use LIBPATH or LD_LIBRARY_PATH, make sure /usr/lib is not in it or at least it's position is not the first place the compiler finds the mq-libs.

It's described in detail here:http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.amq1ac.doc/lq10400_.htm?resultof=%22%4c%44%5f%4c%49%42%52%41%52%59%5f%50%41%54%48%22%20
_________________
Gunter Jeschawitz
IBM Certified System Administrator - Websphere MQ, 5.3
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Installation/Configuration Support » 64 & 32 bit applications
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.