<div dir="ltr">i&#39;m building freeswitch rpm from spec file<div><br></div><div style>i download <a href="http://files.freeswitch.org/freeswitch-1.4.7.tar.bz2" style="font-family:&#39;Times New Roman&#39;;font-size:medium">freeswitch-1.4.7.tar.bz2</a> from <a href="http://files.freeswitch.org/">http://files.freeswitch.org/</a></div>
<div style><br></div><div style>but during rpm building there is alot of errors like</div><div style><br></div><div style><div>making all mod_cdr_pg_csv</div><div>make[4]: Entering directory `/root/rpmbuild/BUILD/freeswitch-1.4.7/src/mod/event_handlers/mod_cdr_pg_csv&#39;</div>
<div>  CC     mod_cdr_pg_csv_la-mod_cdr_pg_csv.lo</div><div>mod_cdr_pg_csv.c:40:33: error: postgresql/libpq-fe.h: No such file or directory</div><div>mod_cdr_pg_csv.c:83: error: expected specifier-qualifier-list before &#39;PGconn&#39;</div>
<div>mod_cdr_pg_csv.c: In function &#39;config_validate_spool_dir&#39;:</div><div>mod_cdr_pg_csv.c:110: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;spool_dir&#39;</div><div>mod_cdr_pg_csv.c: At top level:</div>
<div>mod_cdr_pg_csv.c:121: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;legs&#39;</div><div>mod_cdr_pg_csv.c:122: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;spool_format&#39;</div>
<div>mod_cdr_pg_csv.c:123: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;rotate&#39;</div><div>mod_cdr_pg_csv.c:124: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;debug&#39;</div>
<div>mod_cdr_pg_csv.c:127: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;spool_dir&#39;</div><div>mod_cdr_pg_csv.c: In function &#39;do_rotate&#39;:</div><div>mod_cdr_pg_csv.c:167: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;rotate&#39;</div>
<div>mod_cdr_pg_csv.c:187: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;rotate&#39;</div><div>mod_cdr_pg_csv.c: In function &#39;insert_cdr&#39;:</div><div>mod_cdr_pg_csv.c:250: error: &#39;PGresult&#39; undeclared (first use in this function)</div>
<div>mod_cdr_pg_csv.c:250: error: (Each undeclared identifier is reported only once</div><div>mod_cdr_pg_csv.c:250: error: for each function it appears in.)</div><div>mod_cdr_pg_csv.c:250: error: &#39;res&#39; undeclared (first use in this function)</div>
<div>mod_cdr_pg_csv.c:250: error: invalid operands to binary * (have &#39;struct switch_xml_config_item_t *&#39; and &#39;struct switch_xml_config_item_t *&#39;)</div><div>cc1: warnings being treated as errors</div><div>mod_cdr_pg_csv.c:250: error: statement with no effect</div>
<div>mod_cdr_pg_csv.c:255: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;debug&#39;</div><div>mod_cdr_pg_csv.c:259: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;db_mutex&#39;</div>
<div>mod_cdr_pg_csv.c:259: error: passing argument 1 of &#39;switch_mutex_lock&#39; from incompatible pointer type</div><div>../../../../src/include/switch_apr.h:351: note: expected &#39;struct switch_mutex_t *&#39; but argument is of type &#39;struct switch_xml_config_item_t *&#39;</div>
<div>mod_cdr_pg_csv.c:261: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;db_online&#39;</div><div>mod_cdr_pg_csv.c:261: error: implicit declaration of function &#39;PQstatus&#39;</div><div>mod_cdr_pg_csv.c:261: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;db_connection&#39;</div>
<div>mod_cdr_pg_csv.c:261: error: &#39;CONNECTION_OK&#39; undeclared (first use in this function)</div><div>mod_cdr_pg_csv.c:261: error: comparison between pointer and integer</div><div>mod_cdr_pg_csv.c:262: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;db_connection&#39;</div>
<div>mod_cdr_pg_csv.c:262: error: implicit declaration of function &#39;PQconnectdb&#39;</div><div>mod_cdr_pg_csv.c:262: error: statement with no effect</div><div>mod_cdr_pg_csv.c:265: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;db_connection&#39;</div>
<div>mod_cdr_pg_csv.c:265: error: comparison between pointer and integer</div><div>mod_cdr_pg_csv.c:266: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;db_online&#39;</div><div>mod_cdr_pg_csv.c:266: error: statement with no effect</div>
<div>mod_cdr_pg_csv.c:268: error: implicit declaration of function &#39;PQerrorMessage&#39;</div><div>mod_cdr_pg_csv.c:268: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;db_connection&#39;</div><div>mod_cdr_pg_csv.c:268: error: format &#39;%s&#39; expects type &#39;char *&#39;, but argument 8 has type &#39;int&#39;</div>
<div>mod_cdr_pg_csv.c:272: error: implicit declaration of function &#39;PQexec&#39;</div><div>mod_cdr_pg_csv.c:272: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;db_connection&#39;</div><div>mod_cdr_pg_csv.c:272: error: statement with no effect</div>
<div>mod_cdr_pg_csv.c:273: error: implicit declaration of function &#39;PQresultStatus&#39;</div><div>mod_cdr_pg_csv.c:273: error: &#39;PGRES_COMMAND_OK&#39; undeclared (first use in this function)</div><div>mod_cdr_pg_csv.c:273: error: comparison between pointer and integer</div>
<div>mod_cdr_pg_csv.c:274: error: implicit declaration of function &#39;PQresultErrorMessage&#39;</div><div>mod_cdr_pg_csv.c:274: error: format &#39;%s&#39; expects type &#39;char *&#39;, but argument 8 has type &#39;int&#39;</div>
<div>mod_cdr_pg_csv.c:275: error: implicit declaration of function &#39;PQclear&#39;</div><div>mod_cdr_pg_csv.c:282: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;db_mutex&#39;</div><div>mod_cdr_pg_csv.c:282: error: passing argument 1 of &#39;switch_mutex_unlock&#39; from incompatible pointer type</div>
<div>../../../../src/include/switch_apr.h:357: note: expected &#39;struct switch_mutex_t *&#39; but argument is of type &#39;struct switch_xml_config_item_t *&#39;</div><div>mod_cdr_pg_csv.c:289: error: implicit declaration of function &#39;PQfinish&#39;</div>
<div>mod_cdr_pg_csv.c:289: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;db_connection&#39;</div><div>mod_cdr_pg_csv.c:290: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;db_online&#39;</div>
<div>mod_cdr_pg_csv.c:290: error: statement with no effect</div><div>mod_cdr_pg_csv.c:291: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;db_mutex&#39;</div><div>mod_cdr_pg_csv.c:291: error: passing argument 1 of &#39;switch_mutex_unlock&#39; from incompatible pointer type</div>
<div>../../../../src/include/switch_apr.h:357: note: expected &#39;struct switch_mutex_t *&#39; but argument is of type &#39;struct switch_xml_config_item_t *&#39;</div><div>mod_cdr_pg_csv.c:294: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;spool_format&#39;</div>
<div>mod_cdr_pg_csv.c:294: error: comparison between pointer and integer</div><div>mod_cdr_pg_csv.c:295: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;spool_dir&#39;</div><div>mod_cdr_pg_csv.c:299: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;spool_dir&#39;</div>
<div>mod_cdr_pg_csv.c: In function &#39;my_on_reporting&#39;:</div><div>mod_cdr_pg_csv.c:323: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;legs&#39;</div><div>mod_cdr_pg_csv.c:323: error: invalid operands to binary &amp; (have &#39;struct switch_xml_config_item_t *&#39; and &#39;int&#39;)</div>
<div>mod_cdr_pg_csv.c:323: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;legs&#39;</div><div>mod_cdr_pg_csv.c:323: error: invalid operands to binary &amp; (have &#39;struct switch_xml_config_item_t *&#39; and &#39;int&#39;)</div>
<div>mod_cdr_pg_csv.c:324: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;legs&#39;</div><div>mod_cdr_pg_csv.c:324: error: invalid operands to binary &amp; (have &#39;struct switch_xml_config_item_t *&#39; and &#39;int&#39;)</div>
<div>mod_cdr_pg_csv.c:335: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;spool_dir&#39;</div><div>mod_cdr_pg_csv.c:335: error: passing argument 1 of &#39;switch_dir_make_recursive&#39; from incompatible pointer type</div>
<div>../../../../src/include/switch_apr.h:898: note: expected &#39;const char *&#39; but argument is of type &#39;struct switch_xml_config_item_t *&#39;</div><div>mod_cdr_pg_csv.c:336: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;spool_dir&#39;</div>
<div>mod_cdr_pg_csv.c:336: error: format &#39;%s&#39; expects type &#39;char *&#39;, but argument 8 has type &#39;struct switch_xml_config_item_t *&#39;</div><div>mod_cdr_pg_csv.c:340: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;debug&#39;</div>
<div>mod_cdr_pg_csv.c:361: error: implicit declaration of function &#39;PQescapeString&#39;</div><div>mod_cdr_pg_csv.c: In function &#39;event_handler&#39;:</div><div>mod_cdr_pg_csv.c:411: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;db_online&#39;</div>
<div>mod_cdr_pg_csv.c:412: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;db_connection&#39;</div><div>mod_cdr_pg_csv.c:413: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;db_online&#39;</div>
<div>mod_cdr_pg_csv.c:413: error: statement with no effect</div><div>mod_cdr_pg_csv.c: In function &#39;load_config&#39;:</div><div>mod_cdr_pg_csv.c:444: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;db_online&#39;</div>
<div>mod_cdr_pg_csv.c:445: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;db_connection&#39;</div><div>mod_cdr_pg_csv.c:446: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;db_mutex&#39;</div>
<div>mod_cdr_pg_csv.c:446: error: passing argument 1 of &#39;switch_mutex_destroy&#39; from incompatible pointer type</div><div>../../../../src/include/switch_apr.h:344: note: expected &#39;struct switch_mutex_t *&#39; but argument is of type &#39;struct switch_xml_config_item_t *&#39;</div>
<div>mod_cdr_pg_csv.c:447: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;db_online&#39;</div><div>mod_cdr_pg_csv.c:447: error: statement with no effect</div><div>mod_cdr_pg_csv.c:452: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;db_mutex&#39;</div>
<div>mod_cdr_pg_csv.c:452: error: passing argument 1 of &#39;switch_mutex_init&#39; from incompatible pointer type</div><div>../../../../src/include/switch_apr.h:337: note: expected &#39;struct switch_mutex_t **&#39; but argument is of type &#39;struct switch_xml_config_item_t (*)[1]&#39;</div>
<div>mod_cdr_pg_csv.c: In function &#39;mod_cdr_pg_csv_load&#39;:</div><div>mod_cdr_pg_csv.c:528: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;spool_dir&#39;</div><div>mod_cdr_pg_csv.c:528: error: passing argument 1 of &#39;switch_dir_make_recursive&#39; from incompatible pointer type</div>
<div>../../../../src/include/switch_apr.h:898: note: expected &#39;const char *&#39; but argument is of type &#39;struct switch_xml_config_item_t *&#39;</div><div>mod_cdr_pg_csv.c:529: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;spool_dir&#39;</div>
<div>mod_cdr_pg_csv.c:529: error: format &#39;%s&#39; expects type &#39;char *&#39;, but argument 8 has type &#39;struct switch_xml_config_item_t *&#39;</div><div>mod_cdr_pg_csv.c: In function &#39;mod_cdr_pg_csv_shutdown&#39;:</div>
<div>mod_cdr_pg_csv.c:550: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;db_online&#39;</div><div>mod_cdr_pg_csv.c:551: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;db_connection&#39;</div>
<div>mod_cdr_pg_csv.c:552: error: &#39;struct &lt;anonymous&gt;&#39; has no member named &#39;db_online&#39;</div><div>mod_cdr_pg_csv.c:552: error: statement with no effect</div><div>make[4]: *** [mod_cdr_pg_csv_la-mod_cdr_pg_csv.lo] Error 1</div>
<div>make[4]: Leaving directory `/root/rpmbuild/BUILD/freeswitch-1.4.7/src/mod/event_handlers/mod_cdr_pg_csv&#39;</div><div>make[3]: *** [mod_cdr_pg_csv-all] Error 1</div><div>make[3]: Leaving directory `/root/rpmbuild/BUILD/freeswitch-1.4.7/src/mod&#39;</div>
<div>make[2]: *** [all-recursive] Error 1</div><div>make[2]: Leaving directory `/root/rpmbuild/BUILD/freeswitch-1.4.7/src&#39;</div><div>make[1]: *** [all-recursive] Error 1</div><div>make[1]: Leaving directory `/root/rpmbuild/BUILD/freeswitch-1.4.7&#39;</div>
<div>make: *** [all] Error 2</div><div>error: Bad exit status from /var/tmp/rpm-tmp.76GyR0 (%build)</div><div><br></div><div><br></div><div>RPM build errors:</div><div>    Bad exit status from /var/tmp/rpm-tmp.76GyR0 (%build)</div>
<div><br></div><div style>how can i solve it</div></div><div style><br></div></div>