How to install MQSeries Perl Extension for IBM WebSphere MQ


I was having some issues installing MQSeries Perl Extension 1.29 for IBM WebSphere MQ (WMQ). What actually I did was downloaded the MQSeries module from the CPAN, extracted it and ran the perl Makefile.PL. But it gave me the following error:

> perl Makefile.PL
Checking if your kit is complete…
Looks good
ERROR from evaluation of /root/MQSeries-1.29/MQClient/Makefile.PL: No such directory ‘/opt/mqm’
Compilation failed in require at ./Makefile.PL line 14.
# Looks like your test died before it could output anything.

This seem as it needs /opt/mqm directory to install to and its not creating it by itself. But this was foolish assumption, as most applications create the required directories itself when installing, but still there wasn’t any clear error message. Then somehow I came to know about the client and I installed the MQSeriesClient. Installing MQSeriesClient requires MQSeriesRuntime as well. This created two directories:

  • /opt/mqm and
  • /var/mqm

So, that means Perl Extension was unable to find the client, but instead it was complaining about the directory. Well I moved forward and tried again installing MQSeries Perl Extension. But what? again error?

> perl Makefile.PL
Checking if your kit is complete…
Looks good
ERROR from evaluation of /home/jawaid/MQSeries-1.29/MQClient/Makefile.PL: Missing inc or include directory in /opt/mqm
Compilation failed in require at ./Makefile.PL line 14.
# Looks like your test died before it could output anything.

dahhh!! Now its complaining about another directory inc or include in /opt/mqm. That means it requires something else as well. The name of the directory i.e include, sparked in my mind that it might requires some kind of SDK or something. Then I checked the RPMs came with WMQ. I found MQSeriesSDK. hmmm so I thought lets try installing this RPM and try my luck again with installing Perl Extension. So I installed MQSeriesSDK and then MQSeries Perl Extension. woala!! this time it generated the make file without any errors :)

> perl Makefile.PL
Checking if your kit is complete…
Looks good
Writing Makefile for MQClient::MQSeries
Writing Makefile for MQSeries::Message::DeadLetter
Writing Makefile for MQSeries::Message::PCF
Warning: Guessing NAME [MQSeries-OAM] from current directory name.
No libmqm server library found, MQServer disabled
Support for MQServer is disabled on this platform.
Warning: Guessing NAME [MQServer] from current directory name.
Writing Makefile for MQSeries

But hold your breath for more. You can expect anything now after happening all this. Anyway, I ran make successfully then ran make test… what?? it failed??  :'(

aaahhh!! now what?? never mind!! I just ran make install… guess what? no, you are wrong :) no errors this time, it got installed, even after failing the make test :)

To verify i tried to run the example perl script in examples directory of MQSeries Perl Extension to put message in the queue, and i got an error from the MQSeries library that it didn’t find the queue, obviously there were no queues at the moment, that means Perl module is installed correctly…whew!!

That means installing the run time and client are not enough. You need to install the WMQ SDK as well to install the MQSeries Perl Extension.

Since I wanted to play with the WebSphere MQ, so when I failed to install the Perl Extension first time, I decided to install the server first on another machine. Somehow I managed to install the server. Then I tried to install the MQSeries Perl Extension, but to no avail. Even after installing the Client. Then I moved to another machine and did the whole this thing from scratch, and at last it worked :)

Advertisements

2 thoughts on “How to install MQSeries Perl Extension for IBM WebSphere MQ

  1. Andy Piper says:

    Thanks for posting this. So it looks like the Perl extension (which is a 3rd party module, by the way) needs to specify the dependencies in its documentation – in this case the Runtime, SDK, and potentially Server and Client packages. You might want to contact the maintainer(s) to suggest that they modify the Prerequisites section on CPAN to be more specific about which elements of WMQ it requires for a build.

    Like

Ask J

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s