<div dir="ltr">That's great, but I have tried to install libmongo-client-devel and no package has been found in the repositories (default centos, epel, mongodb).<div><br></div><div>> No package libmongo-client-devel available.</div><div>> Error: Nothing to do</div><div><br></div><div>The OS version is:</div><div><div>CentOS release 6.7 (Final)</div><div>Kernel \r on an \m</div></div><div><br></div><div>Thank you.</div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 9, 2016 at 7:22 AM, George Joseph <span dir="ltr"><<a href="mailto:george.joseph@fairview5.com" target="_blank">george.joseph@fairview5.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div style="font-family:'arial narrow',sans-serif"><br></div><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Tue, Mar 8, 2016 at 2:39 PM, Catalin Stanciu <span dir="ltr"><<a href="mailto:catacsdev@gmail.com" target="_blank">catacsdev@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Thank you for your support, the help make me succeed, having now the package working in ubuntu.<div>Now I am testing the module in Centos 6. First I found that PKG_CONFIG_PATH is empty, so the AST_PKG_CONFIG_CHECK was not able to find the lib and include routes. I solved it exporting the pkgconfig routes:</div><div><br></div><div>export PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/src/mongo-c-driver-1.3.3/src/:/usr/local/lib/pkgconfig/<br></div></div></blockquote><div><br></div></span><div><div style="font-family:'arial narrow',sans-serif">​I think you need to install the ​libmongo-client-devel package rather than from source.</div></div><span class=""><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div></div><div><br></div><div>Everything seems to be correct since i found this problem when executing ./configure:</div><div><br></div><div><div>checking for pg_config... /usr/bin/pg_config</div><div>checking for PQescapeStringConn in -lpq... yes</div><div>checking for pg_encoding_to_char within Postgres headers... yes</div><div>./configure: line 43633: syntax error near unexpected token `$PJPROJECT_DIR'</div><div>./configure: line 43633: `       PJPROJECT_CONFIGURE($PJPROJECT_DIR)'</div></div><div><br></div></div></blockquote><div><br></div></span><div><div style="font-family:'arial narrow',sans-serif">​There's something in <a href="http://configure.ac" target="_blank">configure.ac</a>​ just before the error that's causing the issue.</div></div><span class=""><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div></div><div>My intuition told to install pjproject, so i did it, but output still the same.</div><div><br></div><div>PD: George, are you using any yum repo to install libmongo-client. After a bit of research I have installed the mongo driver form source, because i didn't found any other method to install it.</div></div></blockquote><div><br></div></span><div><div style="font-family:'arial narrow',sans-serif">​The package is libmongo-client-devel.​</div><br></div><div><div class="h5"><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>Than you all.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Mon, Mar 7, 2016 at 12:11 AM, Rafael Prado Rocchi <span dir="ltr"><<a href="mailto:prado@practis.com.br" target="_blank">prado@practis.com.br</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div>



<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif">
<div>
<div>Hello, </div>
<div>you are doing the right way, I'll put some basic information with examples to contribute.</div>
<div><br>
</div>
<div>When creating a MODULE that needs some dependency, there are two situations to check initially:</div>
<div><br>
</div>
<div>1) If the library is already present in <a href="http://configure.ac" target="_blank">configure.ac</a> (and detected when you run ./configure), then you just need to put the dependency inside the Module source using <depend> tag</div>
<div>2) If it is a NEW library not present in <a href="http://configure.ac" target="_blank">configure.ac</a>, then you have to change <a href="http://configure.ac" target="_blank">configure.ac</a> and recreate 'configure' script.</div>
<div><br>
</div>
<div><br>
</div>
<div>Supposing the new library included was for example 'openr2' </div>
<div>You can do a quick check running: </div>
<div><br>
</div>
<div>./configure |grep openr2</div>
<div><br>
</div>
<div><br>
</div>
<div>The result should make it clear if it was detected or nor detected, like the above example, that would give you this result:</div>
<div><br>
</div>
<div>
<div>checking for openr2_chan_new in -lopenr2... yes</div>
<div><br>
</div>
</div>
<div><br>
</div>
<div>The result "yes" above means the library was Found and it's ready for use. You correctly modified <a href="http://configure.ac" target="_blank">configure.ac</a> and recreated configure.</div>
<div>If you get a different result or no result, check the paths where the library lives in you linux distro and make the appropriate changes in <a href="http://configure.ac" target="_blank">configure.ac</a> because configure was not able to find them, also check the logfile.</div>
<div>
<div>Some types of library install theirselves in different places, and some linux distros have different places for them, special attention for 64bit distros vs 32bit distros.</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>After succeed with ./configure you can tie dependency in any module source code by using the <depend> tag inside the module you need.</div>
<div><br>
</div>
<div>example from chan_dahdi.c :</div>
<div><br>
</div>
<div>
<div>
<div>/*** MODULEINFO</div>
<div>        <depend>res_smdi</depend></div>
<div>        <depend>dahdi</depend></div>
<div>        <depend>tonezone</depend></div>
<div>        <depend>res_features</depend></div>
<div>        <use>pri</use></div>
<div>        <use>openr2</use></div>
<div> ***/</div>
</div>
</div>
<div><br>
</div>
<div><depend> means module will NOT compile if dependency is not satisfied.</div>
<div><use> means module can make use of the library or not, it's not essencial and it WILL compile without the library being detected by ./configure.</div>
<div><br>
</div>
<div><br>
</div>
<div>I hope you succeed.</div>
<div><br>
</div>
<div><br>
</div>
<div>Regards,</div>
<div>Rafael Prado</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div></div>
</div>
</div>
<div><br>
</div>
<span>
<div style="font-family:Calibri;font-size:12pt;text-align:left;color:black;border-width:1pt medium medium;border-style:solid none none;padding:3pt 0in 0in;border-top-color:rgb(181,196,223)">
<span style="font-weight:bold">De: </span><<a href="mailto:asterisk-dev-bounces@lists.digium.com" target="_blank">asterisk-dev-bounces@lists.digium.com</a>> em nome de Catalin Stanciu <<a href="mailto:catacsdev@gmail.com" target="_blank">catacsdev@gmail.com</a>><br>
<span style="font-weight:bold">Responder para: </span>Asterisk List <<a href="mailto:asterisk-dev@lists.digium.com" target="_blank">asterisk-dev@lists.digium.com</a>><br>
<span style="font-weight:bold">Data: </span>domingo, 6 de março de 2016 17:56<br>
<span style="font-weight:bold">Para: </span>Asterisk List <<a href="mailto:asterisk-dev@lists.digium.com" target="_blank">asterisk-dev@lists.digium.com</a>><br>
<span style="font-weight:bold">Assunto: </span>[asterisk-dev] Add module dependecy in build system<br>
</div><div><div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">Hello,
<div><br>
</div>
<div>I am trying to include a module dependency in  the asterisk build system, but after some hours of research I couldn't found any useful information.</div>
<div>To start I have followed the asterisk manual (<a href="https://wiki.asterisk.org/wiki/display/AST/Build+System+Architecture" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Build+System+Architecture</a>)</div>
<div><br>
</div>
<div>1. I have used the AST_EXT_LIB_SETUP and AST_EXT_LIB_CHECK functions to configure in
<a href="http://configure.ac" target="_blank">configure.ac</a></div>
<div>2. I have included in build_tools/<a href="http://menuselect-deps.in" target="_blank">menuselect-deps.in</a> the line similar to other dependencies</div>
<div>3. I have included in <a href="http://makeopts.in" target="_blank">makeopts.in</a>  two lines one for LIB and the other for INCLUDE.</div>
<div>4. Finally I have included in the module source code the lines with MODULEINFO</div>
<div><br>
</div>
<div>I don't know what I am doing wrong but I think the documentation for build  system architecture must have some examples with explanation of complex cases.</div>
<div><br>
</div>
<div>Thank you.</div>
</div>
</div>
</div>
</div></div></span>
</div>

<br></div></div><span>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br></span></blockquote></div><br></div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br></blockquote></div></div></div><br></div></div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br></blockquote></div><br></div></div></div>