| Author | 
		  Message
		 | 
		
		  | chandu.yalamanchili | 
		  
		    
			  
				 Posted: Wed Sep 23, 2009 12:43 pm    Post subject: Issue with security exist | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 29 Jun 2007 Posts: 29
  
  | 
		  
		    
			  
				Hi,
 
        I'm trying to compile and link on 32bit linux using the commands 
 
 
gcc -e MQStart -shared -I/opt/mqm/lib -L/usr/lib -lc -lnsl -ldl -lmqmzf_r  -o /var/mqm/exits/mquclw mquclw.c
 
 
 
seeing these errors after compiling it 
 
 
/usr/bin/ld: skipping incompatible /usr/lib/libmqmzf_r.so when searching for -lmqmzf_r
 
/usr/bin/ld: skipping incompatible /usr/lib/libmqmzf_r.so when searching for -lmqmzf_r
 
/usr/bin/ld: cannot find -lmqmzf_r
 
collect2: ld returned 1 exit status
 
 
Can anyone shed some on light on this.
 
 
Thanks
 
Chandu | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mvic | 
		  
		    
			  
				 Posted: Wed Sep 23, 2009 2:23 pm    Post subject: Re: Issue with security exist | 
				     | 
			   
			 
		   | 
		
		
		    Jedi
 
 Joined: 09 Mar 2004 Posts: 2080
  
  | 
		  
		    
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | chandu.yalamanchili | 
		  
		    
			  
				 Posted: Wed Sep 23, 2009 2:55 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 29 Jun 2007 Posts: 29
  
  | 
		  
		    
			  
				Thanks for your reply. It is a mistake operating system is 64 bit and used the command 
 
 
gcc -m64 -shared -fPIC -o /var/mqm/exits64/mquclw mquclw.c -I/opt/mqm/inc -L/opt/mqm/lib64-Wl,-rpath=/opt/mqm/lib64 -Wl,-rpath=/usr/lib64 -lmqm_r
 
 
 and seeing this error 
 
 
gcc -m64 -shared -fPIC -o /var/mqm/exits64/mquclw mquclw.c -I/opt/mqm/inc -L/opt/mqm/lib64-Wl,-rpath=/opt/mqm/lib64 -Wl,-rpath=/usr/lib64 -lmqm_r
 
/usr/bin/ld: skipping incompatible /usr/lib/libmqm_r.so when searching for -lmqm_r
 
/usr/bin/ld: cannot find -lmqm_r
 
collect2: ld returned 1 exit status
 
 
Please help | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mvic | 
		  
		    
			  
				 Posted: Wed Sep 23, 2009 3:24 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi
 
 Joined: 09 Mar 2004 Posts: 2080
  
  | 
		  
		    
			  
				
   
	| chandu.yalamanchili wrote: | 
   
  
	gcc -m64 -shared -fPIC -o /var/mqm/exits64/mquclw mquclw.c -I/opt/mqm/inc -L/opt/mqm/lib64-Wl,-rpath=/opt/mqm/lib64 -Wl,-rpath=/usr/lib64 -lmqm_r
 
/usr/bin/ld: skipping incompatible /usr/lib/libmqm_r.so when searching for -lmqm_r
 
/usr/bin/ld: cannot find -lmqm_r
 
collect2: ld returned 1 exit status
 
 
Please help | 
   
 
 
That command is not correct; it's missing some space characters. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | chandu.yalamanchili | 
		  
		    
			  
				 Posted: Wed Sep 23, 2009 4:30 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 29 Jun 2007 Posts: 29
  
  | 
		  
		    
			  
				| I' running same command as it is from the MQ Prog Guide. Can anyone suggest me how to set library path on linux server I think I might be one of the reason. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Mr Butcher | 
		  
		    
			  
				 Posted: Thu Sep 24, 2009 12:52 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Padawan
 
 Joined: 23 May 2005 Posts: 1716
  
  | 
		  
		    
			  
				i am not an expert in this area but 
 
 
   
	| Quote: | 
   
  
	| usr/bin/ld: skipping incompatible /usr/lib/libmqm_r.so when searching for -lmqm_r  | 
   
 
 
 
/usr/lib/ links to /opt/mqm/lib wich holds 32 bit libraries? what you may need is /opt/mqm/lib64 as you compile with 64 bit ?!?
 
 
Edit - sorry missed those missing blanks...... _________________ Regards, Butcher | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | chandu.yalamanchili | 
		  
		    
			  
				 Posted: Thu Sep 24, 2009 2:47 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 29 Jun 2007 Posts: 29
  
  | 
		  
		    
			  
				I had compiled the mquclw.c program and added module in qm.ini file
 
 
ServiceComponent:
 
   Name=mquclw.UNIX.auth.service
 
   Module=/var/mqm/exits/mquclw
 
   Service=AuthorizationService
 
   ComponentDataSize=0
 
 
and seeing below errors
 
 
AMQ5520: The system could not load the module '/var/mqm/exits/mquclw' for the
 
installable service 'AuthorizationService' component 'mquclw.auth.service'. 
 
The system return code was 536895861. The Queue Manager is continuing without
 
this component.
 
 
EXPLANATION:
 
The queue manager configuration data included a stanza for the installable
 
service 'AuthorizationService' component 'mquclw.auth.service' with the module
 
'/var/mqm/exits/mquclw'.  The system returned 536895861 when it tried to load
 
this module.  The Queue Manager is continuing without this component.
 
ACTION:
 
Make sure that the module can be loaded.  Put the module into a directory where
 
the system can load it, and specify its full path and name in the configuration
 
data .  Then stop and restart the queue manager.
 
 
Can anyone help me in this.
 
 
Thanks
 
Chandu | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | chandu.yalamanchili | 
		  
		    
			  
				 Posted: Fri Sep 25, 2009 12:56 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 29 Jun 2007 Posts: 29
  
  | 
		  
		    
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | chandu.yalamanchili | 
		  
		    
			  
				 Posted: Fri Sep 25, 2009 1:50 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 29 Jun 2007 Posts: 29
  
  | 
		  
		    
			  
				Enclosing complete error 
 
 
09/25/2009 03:48:21 PM - Process(22699.1) User(mqm) Program(amqzlaa0)
 
AMQ6175: The system could not dynamically load the shared library
 
'/var/mqm/exits/mquclw'. The system returned error message
 
'/var/mqm/exits/mquclw: undefined symbol: MQZEP'. The queue manager will
 
continue without this module.
 
 
EXPLANATION:
 
This message applies to UNIX systems. The shared library
 
'/var/mqm/exits/mquclw' failed to load correctly due to a problem with the
 
library.
 
ACTION:
 
Check the file access permissions and that the file has not been corrupted.
 
----- amqxufnx.c : 1156 -------------------------------------------------------
 
09/25/2009 03:48:21 PM - Process(22699.1) User(mqm) Program(amqzlaa0)
 
AMQ5520: The system could not load the module '/var/mqm/exits/mquclw' for the
 
installable service 'AuthorizationService' component
 
'mquclw.UNIX.auth.service'.  The system return code was 536895861. The Queue
 
Manager is continuing without this component.
 
 
EXPLANATION:
 
The queue manager configuration data included a stanza for the installable
 
service 'AuthorizationService' component 'mquclw.UNIX.auth.service' with the
 
module '/var/mqm/exits/mquclw'.  The system returned 536895861 when it tried to
 
load this module.  The Queue Manager is continuing without this component.
 
ACTION:
 
Make sure that the module can be loaded.  Put the module into a directory where
 
the system can load it, and specify its full path and name in the configuration
 
data .  Then stop and restart the queue manager.
 
 
 
 
and the permissions on the file is 
 
 
-rwxr-xr-x 1 mqm mqm 4859 Sep 25 15:06 mquclw 
 
 
and also enclosing the details of the qm.ini file 
 
#*******************************************************************#
 
#* Module Name: qm.ini                                             *#
 
#* Type       : WebSphere MQ queue manager configuration file      *#
 
#  Function   : Define the configuration of a single queue manager *#
 
#*                                                                 *#
 
#*******************************************************************#
 
#* Notes      :                                                    *#
 
#* 1) This file defines the configuration of the queue manager     *#
 
#*                                                                 *#
 
#*******************************************************************#
 
ExitPath:
 
   ExitsDefaultPath=/var/mqm/exits
 
   ExitsDefaultPath64=/var/mqm/exits64/
 
#*                                                                 *#
 
#*                                                                 *#
 
Log:
 
   LogPrimaryFiles=3
 
   LogSecondaryFiles=6
 
   LogFilePages=10240
 
   LogType=CIRCULAR
 
   LogBufferPages=0
 
   LogPath=/var/mqm/log/EA3TEST/
 
   LogWriteIntegrity=TripleWrite
 
Service:
 
   Name=AuthorizationService
 
   EntryPoints=13
 
ServiceComponent:
 
   Service=AuthorizationService
 
   Name=MQSeries.UNIX.auth.service
 
   Module=/opt/mqm/lib/amqzfu
 
   ComponentDataSize=0
 
ServiceComponent:
 
    Service=AuthorizationService
 
    Name=mquclw.UNIX.auth.service
 
    Sequence=3
 
    Module=/var/mqm/exits/mquclw
 
    ComponentDataSize=0
 
Channels:
 
   MaxChannels=800
 
   MaxActiveChannels=800
 
   MQIBindType=STANDARD
 
 
Any thoughts why I'm seeing this error? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | RogerLacroix | 
		  
		    
			  
				 Posted: Fri Sep 25, 2009 3:21 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Knight
 
 Joined: 15 May 2001 Posts: 3265 Location: London, ON  Canada 
  | 
		  
		    
			  
				
   
	| chandu.yalamanchili wrote: | 
   
  
	The system returned error message
 
'/var/mqm/exits/mquclw: undefined symbol: MQZEP'. The queue manager will continue without this module. | 
   
 
 
Did you install 32-bit or 64-bit version of WMQ.  If you installed 64-bit version WMQ then why did you copy the shared library to '/var/mqm/exits/' ??  It should be in '/var/mqm/exits64/'
 
 
Secondly, you obviously had a link error that you ignored (missing MQZEP).  Do the following command:
 
 
and it will show you that you are missing stuff.
 
 
Finally, your compile & link command is incorrect. Read the WMQ Application Programming Guide (chapter 15 "Using and writing API exits") for the correct compile & link command (Authorization Service is the same API exit).
 
 
Developing MQ exits is an advanced level topic.  Unless you are an expert C programming with excellent MQ skills then you should not be doing it.  Having your queue manager crash at 2:00AM is not the way to impress your boss.
 
 
Regards,
 
Roger Lacroix
 
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
 
Connected to MQ!
 
Twitter | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | chandu.yalamanchili | 
		  
		    
			  
				 Posted: Mon Sep 28, 2009 9:51 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 29 Jun 2007 Posts: 29
  
  | 
		  
		    
			  
				Thanks for your reply Roger. I'm using MQ 32-bit on LINUX 64-bit. As you said I entered the command 
 
 
[root@mn1s34009 exits]# ldd mquclw
 
        linux-gate.so.1 =>  (0xffffe000)
 
        libmqm_r.so => /opt/mqm/lib/libmqm_r.so (0xf7f2e000)
 
        libc.so.6 => /lib/libc.so.6 (0xf7de0000)
 
        libmqz_r.so => /opt/mqm/lib/libmqz_r.so (0xf7c42000)
 
        libmqmcs_r.so => /opt/mqm/lib/libmqmcs_r.so (0xf79c1000)
 
        libmqmzse.so => /opt/mqm/lib/libmqmzse.so (0xf79be000)
 
        libpthread.so.0 => /lib/libpthread.so.0 (0xf79a7000)
 
        libdl.so.2 => /lib/libdl.so.2 (0xf79a3000)
 
        /lib/ld-linux.so.2 (0x0096a000)
 
 
but all these files are there under /opt/mqm unable to understand why it has problems to get these lib files. I'm using the same command and link which is in the MQ APG. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | gbaddeley | 
		  
		    
			  
				 Posted: Mon Sep 28, 2009 3:51 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Knight
 
 Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia 
  | 
		  
		    
			  
				FWIW, 536895861 is hex 20006175. This error has also been reported in this post -> http://www.mqseries.net/phpBB/viewtopic.php?p=219747 .
 
 
AFAIK, from MQ 6.0 onwards, it needs to be a 64 bit module, and should be stored in /var/mqm/exits64. _________________ Glenn | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | RogerLacroix | 
		  
		    
			  
				 Posted: Wed Sep 30, 2009 12:33 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Knight
 
 Joined: 15 May 2001 Posts: 3265 Location: London, ON  Canada 
  | 
		  
		    
			  
				
   
	| chandu.yalamanchili wrote: | 
   
  
	| I'm using MQ 32-bit on LINUX 64-bit. | 
   
 
 
If you are using WMQ 32-bit version then you MUST build 32-bit shared library (exit).  Period. No exceptions.
 
 
   
	| chandu.yalamanchili wrote: | 
   
  
	| I'm using the same command and link which is in the MQ APG. | 
   
 
 
Really.    
 
 
This isn't from the manual (and it is building a 64-bit shared library which is wrong for your environment):
 
   
	| chandu.yalamanchili wrote: | 
   
  
	| gcc -m64 -shared -fPIC -o /var/mqm/exits64/mquclw mquclw.c -I/opt/mqm/inc -L/opt/mqm/lib64-Wl,-rpath=/opt/mqm/lib64 -Wl,-rpath=/usr/lib64 -lmqm_r | 
   
 
 
 
And neither is this:
 
   
	| chandu.yalamanchili wrote: | 
   
  
	| gcc -e MQStart -shared -I/opt/mqm/lib -L/usr/lib -lc -lnsl -ldl -lmqmzf_r  -o /var/mqm/exits/mquclw mquclw.c | 
   
 
 
 
Read the WMQ Application Programming Guide (chapter 15 "Using and writing API exits") for the correct compile & link command (Authorization Service is the same API exit).
 
 
   
	| gbaddeley wrote: | 
   
  
	| AFAIK, from MQ 6.0 onwards, it needs to be a 64 bit module, and should be stored in /var/mqm/exits64. | 
   
 
 
This is ONLY true if and only if you installed WMQ 64-bit for Linux.  If you install WMQ 32-bit for Linux then the user needs to build 32-bit shared libraries and store it in /var/mqm/exits/.
 
 
Glenn, as you know, for Intel x86, IBM makes available 2 releases of WMQ: 32-bit (C19LTML) and 64-bit (C19LUML) releases of WMQ.  
 
 
Regards,
 
Roger Lacroix
 
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
 
Connected to MQ!
 
Twitter | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | gbaddeley | 
		  
		    
			  
				 Posted: Wed Sep 30, 2009 4:53 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Knight
 
 Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia 
  | 
		  
		    
			  
				
   
	| RogerLacroix wrote: | 
   
  
	
 
   
	| gbaddeley wrote: | 
   
  
	| AFAIK, from MQ 6.0 onwards, it needs to be a 64 bit module, and should be stored in /var/mqm/exits64. | 
   
 
 
This is ONLY true if and only if you installed WMQ 64-bit for Linux.  If you install WMQ 32-bit for Linux then the user needs to build 32-bit shared libraries and store it in /var/mqm/exits/.
 
 
Glenn, as you know, for Intel x86, IBM makes available 2 releases of WMQ: 32-bit (C19LTML) and 64-bit (C19LUML) releases of WMQ.  
 
 
Regards,
 
Roger Lacroix
 
Capitalware Inc. | 
   
 
 
 
Roger, thanks for making that crystal clear. _________________ Glenn | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |