[rabbitmq-discuss] compatibility with legacy code
Dinabandhu Mitra
Dinabandhu.Mitra at tecnotree.com
Mon Jan 11 15:34:57 GMT 2010
Hi Alexis,
Yes :). At least managed to compile. Not tested though as yet.
This is complete set of steps that I followed ... it should (hopefully) work for anyone using RHEL 4.8
1. Downloaded rabbitmq-codegen from http://hg.rabbitmq.com/rabbitmq-codegen/archive/default.tar.gz
2. Downloaded rabbitmq-c from http://hg.rabbitmq.com/rabbitmq-c/archive/default.tar.gz
3. Copied both to /home/dinu [my home directory].
4. Download and install simplejson 2.0.5. from http://pypi.python.org/pypi/simplejson/2.0.5 .
[The current latest version 2.0.9 is dependent on Python 2.4+ and I don't know if it will
work on RHEL 4.8 which comes with python 2.3+.]
5. tar -xvzf rabbitmq-c-default.tar.gz
6. tar -xvzf rabbitmq-codegen-default.tar.gz
7. mv rabbitmq-c-default rabbitmq-c
8. mv rabbitmq-codegen-default rabbitmq-codegen
9. cd rabbitmq-c
10. Edit "configure.ac" file and make the following changes
#sibling_codegen_dir="$ac_abs_confdir/../rabbitmq-codegen"
sibling_codegen_dir="/home/dinu/rabbitmq-codegen"
Note that this step was required in my environment. But that may be due
to something broken in the server I am using and may not be necessary for everyone.
11. autoreconf -i
12. ./configure
13. Edit librabbitmq/Makefile* (three files) and make the following modification in each
#PYTHON=python2.5
PYTHON=python
14. make
15. make install [I logged in as root to do the install but may not be necessary]
Lastly, for people like me, for whom the word "python" relates only to a large serpent :),
this is how I built simplejson -
1. Download simplejson 2.0.5 source from http://pypi.python.org/pypi/simplejson/2.0.5
2. tar -xvzf simplejson-2.0.5.tar.gz
3. cd simplejson-2.0.5
4. python ez_setup.py [I am not sure if this is necessary but I did this]
5. python setup.py build
6. python setup.py install
7. I did above steps as root user.
As of now, the library seems to have built and installed correctly ... i.e. I can see
/usr/local/lib/librabbitmq.*
/usr/local/bin/amqp_* [I guess example binaries]
/usr/local/include/amqp*.h
I will test the installation and keep you posted.
Regards,
Dinabandhu
> -----Original Message-----
> From: Alexis Richardson [mailto:alexis.richardson at gmail.com]
> Sent: Monday, January 11, 2010 5:00 PM
> To: Dinabandhu Mitra
> Cc: rabbitmq-discuss at lists.rabbitmq.com
> Subject: Re: [rabbitmq-discuss] compatibility with legacy code
>
> Dinabandhu
>
> How are you getting on? Were you able to get the C client working?
>
> alexis
>
>
> On Fri, Jan 8, 2010 at 10:18 AM, Dinabandhu
> <dinabandhu.mitra at tecnotree.com> wrote:
> >
> > Hi Tony,
> >
> > I am trying to build this. I followed your links & instructions here.
> > configure still gives error saying it could not find AMQP spec file
> at
> > '/codegen/amqp-0.8.json'.
> >
> > This directory is of course wrong because the file is actually at
> > /home/dinu/rabbitmq-codegen.
> >
> > The variable $ac_abs_confdir is blank and that seems to be reason ...
> from
> > the configure script it looks like $ac_abs_confdir is expected to
> point to
> > the directory from where configure is being run. I don't know enough
> about
> > the autoconf tool chain to determine the root cause.
> >
> > I next modified configure.ac file to point sibling_codegen_dir to the
> > correct directory ...
> >
> > #sibling_codegen_dir="$ac_abs_confdir/../rabbitmq-codegen"
> > sibling_codegen_dir="/home/janus/dinu/rabbitmq-codegen"
> >
> > After this change the configure script went through. But make still
> fails
> > ...
> >
> > [dinu at j4 rabbitmq-c]$ make
> > make all-recursive
> > make[1]: Entering directory `/home/dinu/rabbitmq-c'
> > Making all in librabbitmq
> > make[2]: Entering directory `/home/dinu/rabbitmq-c/librabbitmq'
> > PYTHONPATH=/home/dinu/rabbitmq-codegen python2.5 ./codegen.py header
> > /home/dinu/rabbitmq-codegen/amqp-0.8.json amqp_framing.h
> > /bin/sh: python2.5: command not found
> > make[2]: *** [amqp_framing.h] Error 127
> > make[2]: Leaving directory `/home/dinu/rabbitmq-c/librabbitmq'
> > make[1]: *** [all-recursive] Error 1
> > make[1]: Leaving directory `/home/dinu/rabbitmq-c'
> > make: *** [all] Error 2
> >
> > I don't have python2.5. what is there on my machine is python2.3.
> >
> > I am using RHEL 4.8 64 bit. Does the library expect some other
> distribution?
> > 5.x?
> >
> > I will try by modifying the script files ... but if you can provide
> some
> > pointers it would be good.
> >
> > Regards,
> > Dinabandhu
> >
> >
> > Tony Garnock-Jones-2 wrote:
> >>
> >> Hi Jim,
> >>
> >> Jim Irrer wrote:
> >>> checking location of AMQP codegen directory... configure: error:
> could
> >>> not find AMQP spec file at "'/codegen/amqp-0.9.1.json'"
> >>
> >> The MD5sum is correct, b50fd568311a052a45157631ba17c2b5, but are you
> >> sure you're really building the one you just downloaded? For me,
> using
> >> the file with the MD5sum you provided, I get:
> >>
> >> checking location of AMQP codegen directory... configure: error:
> could
> >> not find AMQP spec file at
> >> "'/Users/tonyg/qq/rabbitmq-c-default/codegen/amqp-0.8.json'"
> >>
> >> Note the 0.8 version number.
> >>
> >>> Am I supposed to get that file from somewhere else, or should it be
> in
> >>> the tarball?
> >>
> >> You should retrieve rabbitmq-codegen as well. Sorry for the
> incomplete
> >> instructions, I really must write this up properly and check it in.
> >> Here's a complete recipe for building the C client and examples, on
> the
> >> 0-8 branch.
> >>
> >> curl http://hg.rabbitmq.com/rabbitmq-
> codegen/archive/default.tar.gz\
> >> | tar -zxf -
> >> curl http://hg.rabbitmq.com/rabbitmq-c/archive/default.tar.gz\
> >> | tar -zxf -
> >> mv rabbitmq-codegen-default rabbitmq-codegen
> >> mv rabbitmq-c-default rabbitmq-c
> >> cd rabbitmq-c
> >> autoreconf -i
> >> ./configure
> >> make
> >>
> >> Alternatively, if you have mercurial installed:
> >>
> >> hg clone http://hg.rabbitmq.com/rabbitmq-codegen
> >> hg clone http://hg.rabbitmq.com/rabbitmq-c
> >> cd rabbitmq-c
> >> autoreconf -i
> >> ./configure
> >> make
> >>
> >>> Also, I have doubts that this will work anyway, because the
> RabbitMQ
> >>> server
> >>> is running at version 0.8, so it won't be compatible with this
> client.
> >>
> >> The "default" branches of both the C client and the server are for
> 0-8,
> >> and do work together.
> >>
> >> Cheers,
> >> Tony
> >>
> >> _______________________________________________
> >> rabbitmq-discuss mailing list
> >> rabbitmq-discuss at lists.rabbitmq.com
> >> http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
> >>
> >>
> >
> > --
> > View this message in context: http://old.nabble.com/compatibility-
> with-legacy-code-tp26197670p27073885.html
> > Sent from the RabbitMQ mailing list archive at Nabble.com.
> >
> >
> > _______________________________________________
> > rabbitmq-discuss mailing list
> > rabbitmq-discuss at lists.rabbitmq.com
> > http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
> >
More information about the rabbitmq-discuss
mailing list