[Freeswitch-users] mod_amqp on RHEL

Hector Geraldino Hector.Geraldino at ipsoft.com
Tue Jun 30 22:15:46 MSD 2015


Final update:

Converting deb packages to RPM didn’t work. The correct way of doing this is:

1) Download the sources from the v0.5.2 tag (https://github.com/alanxz/rabbitmq-c/releases/tag/v0.5.2), and follow the instructions on how to compile and install it
2) Find the librabbitmq.pc file (it’s installed by default under /usr/local/lib/pkgconfig), and add it to the PKG_CONFIG path
3) Follow steps 6 and 7 of the previous email on this thread, and everything should work just fine.

Thanks again to everybody!

From: <freeswitch-users-bounces at lists.freeswitch.org<mailto:freeswitch-users-bounces at lists.freeswitch.org>> on behalf of Hector Geraldino <Hector.Geraldino at ipsoft.com<mailto:Hector.Geraldino at ipsoft.com>>
Reply-To: FreeSWITCH Users Help <freeswitch-users at lists.freeswitch.org<mailto:freeswitch-users at lists.freeswitch.org>>
Date: Tuesday, June 30, 2015 at 1:23 PM
To: FreeSWITCH Users Help <freeswitch-users at lists.freeswitch.org<mailto:freeswitch-users at lists.freeswitch.org>>
Subject: Re: [Freeswitch-users] mod_amqp on RHEL

Yes, that was the missing piece, I feel I’m almost there.

This is a summary of the steps that have worked so far for me:

1) Get the deb packages from debian jessie.
The version that worked for me is 0.5.2. Compiling he latest version from the github repository won’t work, as some methods have changed. When I did so I got:

Making all in src
make[2]: Entering directory `/apps/src/freeswitch-1.4.19/src'
Making all in mod
make[3]: Entering directory `/apps/src/freeswitch-1.4.19/src/mod'

making all mod_amqp
make[4]: Entering directory `/apps/src/freeswitch-1.4.19/src/mod/event_handlers/mod_amqp'
  CC     mod_amqp_la-mod_amqp_utils.lo
  CC     mod_amqp_la-mod_amqp_connection.lo
  CC     mod_amqp_la-mod_amqp_producer.lo
mod_amqp_producer.c: In function ‘mod_amqp_producer_create’:
mod_amqp_producer.c:322: error: incompatible type for argument 7 of ‘amqp_exchange_declare’
/usr/local/include/amqp_framing.h:798: note: expected ‘amqp_boolean_t’ but argument is of type ‘amqp_table_t’
mod_amqp_producer.c:322: error: too few arguments to function ‘amqp_exchange_declare’
mod_amqp_producer.c: In function ‘mod_amqp_producer_thread’:
mod_amqp_producer.c:442: error: incompatible type for argument 7 of ‘amqp_exchange_declare’
/usr/local/include/amqp_framing.h:798: note: expected ‘amqp_boolean_t’ but argument is of type ‘amqp_table_t’
mod_amqp_producer.c:442: error: too few arguments to function ‘amqp_exchange_declare’
make[4]: *** [mod_amqp_la-mod_amqp_producer.lo] Error 1
make[4]: Leaving directory `/apps/src/freeswitch-1.4.19/src/mod/event_handlers/mod_amqp'
make[3]: *** [mod_amqp-all] Error 1
make[3]: Leaving directory `/apps/src/freeswitch-1.4.19/src/mod'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/apps/src/freeswitch-1.4.19/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/apps/src/freeswitch-1.4.19'
make: *** [all] Error 2


2) Generate the RPM packages from deb (use the alien command)

3) Copy the RPMs over to the RHEL/Fedora server

4) Install the RPMs

5) Locate the librabbitmq.pc file and add it to the PKG_CONFIG_PATH environment variable. On my server I ran:
 export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig/

6)  Check if the library can be found by the pkg-config tool. Run:
# pkg-config librabbitmq --modversion
0.5.2

7) Go to the sources directory, run ./configure && make && make install. Everything should work

Right now, the mod_amqp.so is missing some linked libs (libssql and libcrypto), I hope I can find RPMs for those libraries and have them linked with ldconfig. If not, I’ll send an update.

Thanks Mike, William, Steve, Luis and all other whom take some time to help me figure this out.

Cheers

From: <freeswitch-users-bounces at lists.freeswitch.org<mailto:freeswitch-users-bounces at lists.freeswitch.org>> on behalf of Michael Jerris <mike at jerris.com<mailto:mike at jerris.com>>
Reply-To: FreeSWITCH Users Help <freeswitch-users at lists.freeswitch.org<mailto:freeswitch-users at lists.freeswitch.org>>
Date: Tuesday, June 30, 2015 at 11:59 AM
To: FreeSWITCH Users Help <freeswitch-users at lists.freeswitch.org<mailto:freeswitch-users at lists.freeswitch.org>>
Subject: Re: [Freeswitch-users] mod_amqp on RHEL

The key here is the configure detection.  it is using pkg-config to look for librabbitmq.pc  you can try this by way of

pkg-config librabbitmq --modversion

If that command does not return anything, your not ready to re run configure yet.


On Jun 30, 2015, at 11:08 AM, Hector Geraldino <Hector.Geraldino at ipsoft.com<mailto:Hector.Geraldino at ipsoft.com>> wrote:

I wish I could read/understand Makefiles, all I can see is just gibberish.

I installed the RPMs, and libraries were copied under /usr/lib/x86_64-linux-gnu, which might or might not be on the standard path. Nevertheless, I added the directory to the $PATH and $LD_LIBRARY_PATH environment variables, ran ./configure then make, and err was the same.

From: <freeswitch-users-bounces at lists.freeswitch.org<mailto:freeswitch-users-bounces at lists.freeswitch.org>> on behalf of Steven Ayre <steveayre at gmail.com<mailto:steveayre at gmail.com>>
Reply-To: FreeSWITCH Users Help <freeswitch-users at lists.freeswitch.org<mailto:freeswitch-users at lists.freeswitch.org>>
Date: Monday, June 29, 2015 at 4:54 PM
To: FreeSWITCH Users Help <freeswitch-users at lists.freeswitch.org<mailto:freeswitch-users at lists.freeswitch.org>>
Subject: Re: [Freeswitch-users] mod_amqp on RHEL

Did you install the runtime package librabbitmq as well as the development header package librabbitmq-devel?

You could also try installing librabbitmq from source. It's looking for the libraries/headers in the standard paths, not a formal package installed.

It's also possible though that the files are there but the compiler isn't looking at the correct path on your system, perhaps because of minor differences in paths between linux distributions despite FHS.

Steve

On 29 June 2015 at 16:55, Hector Geraldino <Hector.Geraldino at ipsoft.com<mailto:Hector.Geraldino at ipsoft.com>> wrote:
Greetings,

I’m trying to build a new FreeSWITCH instance from master, and I have to include the mod_amqp as we’ll be relying on RabbitMQ to deliver events. Anyway, this is not working for me on a RHEL 6.2 server due to this error:

make[3]: Entering directory `/apps/src/freeswitch-1.4.19/src/mod'

making all mod_amqp
make[4]: Entering directory `/apps/src/freeswitch-1.4.19/src/mod/event_handlers/mod_amqp'
Makefile:772: *** You must install librabbitmq1 and librabbitmq-dev to build this module.  Stop.
make[4]: Leaving directory `/apps/src/freeswitch-1.4.19/src/mod/event_handlers/mod_amqp'
make[3]: *** [mod_amqp-all] Error 1
make[3]: Leaving directory `/apps/src/freeswitch-1.4.19/src/mod'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/apps/src/freeswitch-1.4.19/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/apps/src/freeswitch-1.4.19'
make: *** [all] Error 2

The error is pretty obvious: it’s missing these two libraries listed there, but thing is that I cannot find those libraries (or any replacement for them) for the Red Hat/Fedora distros. I installled rabbitmq-server, no luck. Tried to install these:

http://rpm.pbone.net/index.php3/stat/4/idpl/26206777/dir/redhat_el_6/com/librabbitmq-devel-0.5.0-2.el6.x86_64.rpm.html
http://www.rpmfind.net/linux/rpm2html/search.php?query=librabbitmq-devel(x86-64)

No luck either. It was either I was missing some other dependencies, and then some more, and more, until I couldn’t find some of the rpms missing, or the RPMs, after installed, didn’t contain the same libs the debian-based pkg seems to have, as the module still didn’t compile.

Has anyone been able to compile this on a redhat based distro? (fedora,rhel,centos)

Thanks all for your time

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting at freeswitch.org<mailto:consulting at freeswitch.org>
http://www.freeswitchsolutions.com<http://www.freeswitchsolutions.com/>

Official FreeSWITCH Sites
http://www.freeswitch.org<http://www.freeswitch.org/>
http://confluence.freeswitch.org<http://confluence.freeswitch.org/>
http://www.cluecon.com<http://www.cluecon.com/>

FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org<mailto:FreeSWITCH-users at lists.freeswitch.org>
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org<http://www.freeswitch.org/>

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting at freeswitch.org<mailto:consulting at freeswitch.org>
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org<mailto:FreeSWITCH-users at lists.freeswitch.org>
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150630/ec8b1e1b/attachment-0001.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list