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 » General IBM MQ Support » HP-UX security exit compile

Post new topic  Reply to topic
 HP-UX security exit compile « View previous topic :: View next topic » 
Author Message
bbburson
PostPosted: Tue Oct 12, 2004 11:56 am    Post subject: HP-UX security exit compile Reply with quote

Partisan

Joined: 06 Jan 2004
Posts: 378
Location: Nowhere near a queue manager

I'm trying to compile a channel security exit on HP-UX 11 using the commands shown in the Intercommunications manual:
Code:
$ c89 -c +z +e exit.c
$ ld -o exit exit.o +b : -c exit.exp +IMQStart +eMQStart -b


The link fails with
Code:
ld: Can't open exit.exp
ld: No such file or directory


I've also tried several other forms of compile/link that I've found in threads on this site; some of them give me executable files but none of them will work as an exit (my mqclient gets 2059 return whenever one of these exits is in place).

Any ideas what might be wrong?

Thanks
Back to top
View user's profile Send private message
Anirud
PostPosted: Tue Oct 12, 2004 12:42 pm    Post subject: Reply with quote

Master

Joined: 12 Feb 2004
Posts: 285
Location: Vermont

I wish I could help you on this, but I know nothing about it. I think you will get a better response if you post this under General Support forum. It doesn't mean to start another thread, but moderators can move it.

Regards
Back to top
View user's profile Send private message Visit poster's website
vennela
PostPosted: Tue Oct 12, 2004 12:49 pm    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

The compile issues are solved by clindsey

Mean time you may want to take a look at this thread.

http://www.mqseries.net/phpBB2/viewtopic.php?t=16702&highlight=compile

I didn't understand anything there but I blindly used the commands he gave me. It worked for me but it was a message exit.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bbburson
PostPosted: Tue Oct 12, 2004 1:16 pm    Post subject: Reply with quote

Partisan

Joined: 06 Jan 2004
Posts: 378
Location: Nowhere near a queue manager

vennela wrote:
The compile issues are solved by clindsey

Mean time you may want to take a look at this thread.

http://www.mqseries.net/phpBB2/viewtopic.php?t=16702&highlight=compile

I didn't understand anything there but I blindly used the commands he gave me. It worked for me but it was a message exit.


Yes, that's one of the ones I tried; no luck.
Back to top
View user's profile Send private message
Nigelg
PostPosted: Thu Oct 14, 2004 2:52 am    Post subject: Reply with quote

Grand Master

Joined: 02 Aug 2004
Posts: 1046

Here is a makefile that works on HPUX:

MQIDIR = /opt/mqm
MQILIBDIR = $(MQIDIR)/lib
MQIINCDIR = $(MQIDIR)/inc

LIBEXIT = -lmqm

ALL : clean MQCHLSRX

MQCHLSRX : mqchlsrx.o
ld -o MQCHLSRX -b mqchlsrx.o -c mqchlsrx.exp +IMQStart
cp MQCHLSRX /var/mqm/exits

mqchlsrx.o : mqchlsrx.c
cc -Aa -c +z mqchlsrx.c -I$(MQIINCDIR)

clean :
rm -f mqchlsrx.o MQCHLSRX

and the associated mqchlsrx.exp

#!
+e ChlSndExit
+e ChlRcvExit
+e MQStart
Back to top
View user's profile Send private message
bbburson
PostPosted: Fri Oct 15, 2004 11:53 am    Post subject: Got it compiled Reply with quote

Partisan

Joined: 06 Jan 2004
Posts: 378
Location: Nowhere near a queue manager

Thanks, Nigelg!

I had to remove "-c mqchlsrx.exp" from the link statement in your makefile (the exp file still does not get created during the compile), and then the exit compiled and linked successfully. And, most importantly of all, it runs and does what it's supposed to do.
Back to top
View user's profile Send private message
Nigelg
PostPosted: Mon Oct 18, 2004 1:34 am    Post subject: Reply with quote

Grand Master

Joined: 02 Aug 2004
Posts: 1046

Thanks for the feedback.

The point of the mqchlsrx.exp file is to define a list of exported functions in the shared library to the linker.

In the above example, as well as the obligatory function MQStart, necessary syntax for WMQ, the library also contains functions ChlSndExit and ChlRcvExit defined as exit functions. The mqchlsrx.exp file contains these definitions, which is why it is on the link line. Note that it is not necessary to have these functions in a separate file; the '+e functionname' can be added to the link line itself.

I found it necessary to export these explicitly in HPUX when building a shared library, otherwise the functions are not found when the library is loaded and searched.
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 » General IBM MQ Support » HP-UX security exit compile
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.